Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
5cb4894a
Unverified
Commit
5cb4894a
authored
Apr 13, 2022
by
ShylajaDevadiga
Committed by
GitHub
Apr 13, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes and updates to jenkinsfile (#5370)
Signed-off-by:
Shylaja Devadiga
<
shylaja.devadiga@suse.com
>
Signed-off-by:
Shylaja Devadiga
<
shylaja@rancher.com
>
parent
6f8f6bb2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
7 deletions
+10
-7
Dockerfile.build
tests/terraform/Dockerfile.build
+3
-4
createcluster.go
tests/terraform/createcluster.go
+2
-2
jenkinsfile
tests/terraform/jenkinsfile
+1
-1
testutils.go
tests/terraform/testutils.go
+4
-0
No files found.
tests/terraform/Dockerfile.build
View file @
5cb4894a
...
...
@@ -7,11 +7,10 @@ ENV TERRAFORM_VERSION=$TERRAFORM_VERSION
RUN apk update && \
apk upgrade --update-cache --available && \
apk add curl git jq bash openssh unzip gcc g++ make ca-certificates && \
RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl && \
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" && \
chmod +x ./kubectl && \
mv ./kubectl /usr/local/bin
RUN
mkdir tmp && \
mv ./kubectl /usr/local/bin
&& \
mkdir tmp && \
curl "https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip" -o tmp/terraform.zip && \
unzip tmp/terraform.zip -d /usr/local/bin && \
chmod +x /usr/local/bin/terraform && \
...
...
tests/terraform/createcluster.go
View file @
5cb4894a
...
...
@@ -33,11 +33,11 @@ func BuildCluster(nodeOs, clusterType, externalDb, resourceName string, t *testi
vDir
=
"/config/"
+
nodeOs
+
externalDb
+
".tfvars"
}
tfDir
,
_
:=
filepath
.
Abs
(
tDir
)
tfDir
,
err
:=
filepath
.
Abs
(
tDir
)
if
err
!=
nil
{
return
""
,
""
,
""
,
err
}
varDir
,
_
:=
filepath
.
Abs
(
vDir
)
varDir
,
err
:=
filepath
.
Abs
(
vDir
)
if
err
!=
nil
{
return
""
,
""
,
""
,
err
}
...
...
tests/terraform/jenkinsfile
View file @
5cb4894a
...
...
@@ -12,7 +12,7 @@ pipeline {
stages
{
stage
(
'Git Checkout'
)
{
steps
{
git
branch:
'
add_automation_using_tf'
,
url:
'https://github.com/ShylajaDevadiga
/k3s.git'
git
branch:
'
master'
,
url:
'https://github.com/k3s-io
/k3s.git'
script
{
dir
(
"${WORKSPACE}/tests/terraform"
)
{
if
(
env
.
AWS_SSH_PEM_KEY
&&
env
.
AWS_SSH_KEY_NAME
)
{
...
...
tests/terraform/testutils.go
View file @
5cb4894a
...
...
@@ -78,6 +78,10 @@ func runsshCommand(cmd string, conn *ssh.Client) (string, error) {
var
stderrBuf
bytes
.
Buffer
session
.
Stdout
=
&
stdoutBuf
session
.
Stderr
=
&
stderrBuf
if
err
:=
session
.
Run
(
cmd
);
err
!=
nil
{
log
.
Println
(
session
.
Stdout
)
log
.
Fatal
(
"Error on command execution"
,
err
.
Error
())
}
return
fmt
.
Sprintf
(
"%s"
,
stdoutBuf
.
String
()),
err
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment