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
30fc9095
Unverified
Commit
30fc9095
authored
Aug 10, 2022
by
ShylajaDevadiga
Committed by
GitHub
Aug 10, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update run scripts (#5979)
Signed-off-by:
Shylaja Devadiga
<
shylaja@rancher.com
>
parent
a30971ef
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
18 deletions
+13
-18
Jenkinsfile
tests/e2e/scripts/Jenkinsfile
+3
-8
run_tests.sh
tests/e2e/scripts/run_tests.sh
+10
-10
No files found.
tests/e2e/scripts/Jenkinsfile
View file @
30fc9095
pipeline
{
pipeline
{
agent
any
agent
any
environment
{
environment
{
AWS_SSH_PEM_KEY
=
credentials
(
'AWS_SSH_PEM_KEY'
)
AWS_SSH_PEM_KEY
=
credentials
(
'AWS_SSH_PEM_KEY'
)
VPN_ENCODED_LOGIN
=
credentials
(
'VPN_ENCODED_LOGIN'
)
EXTERNAL_ENCODED_VPN
=
credentials
(
'EXTERNAL_ENCODED_VPN'
)
}
}
stages
{
stages
{
...
@@ -21,7 +23,6 @@ pipeline {
...
@@ -21,7 +23,6 @@ pipeline {
stage
(
'Build Cluster'
){
stage
(
'Build Cluster'
){
steps
{
steps
{
script
{
script
{
try
{
sh
"""
sh
"""
cd ${WORKSPACE}/tests/e2e/
cd ${WORKSPACE}/tests/e2e/
/usr/bin/docker build -f ./scripts/Dockerfile --build-arg EXTERNAL_ENCODED_VPN="$EXTERNAL_ENCODED_VPN" \
/usr/bin/docker build -f ./scripts/Dockerfile --build-arg EXTERNAL_ENCODED_VPN="$EXTERNAL_ENCODED_VPN" \
...
@@ -32,12 +33,6 @@ pipeline {
...
@@ -32,12 +33,6 @@ pipeline {
/usr/bin/docker exec createcluster_${BUILD_NUMBER} ./run_tests.sh ${AWS_SSH_KEY_NAME} ${USER} ${NODEIP} \
/usr/bin/docker exec createcluster_${BUILD_NUMBER} ./run_tests.sh ${AWS_SSH_KEY_NAME} ${USER} ${NODEIP} \
${NODEOS} ${SERVERCOUNT} ${AGENTCOUNT} ${DB} ${HARDENED}
${NODEOS} ${SERVERCOUNT} ${AGENTCOUNT} ${DB} ${HARDENED}
"""
"""
}
catch
(
error
)
{
echo
"First build failed, let's retry if accepted"
retry
(
2
)
{
build
'k3s_nightly_automation'
}
}
}
}
}
}
}
}
...
...
tests/e2e/scripts/run_tests.sh
View file @
30fc9095
...
@@ -11,22 +11,22 @@ E2E_EXTERNAL_DB=$db && export E2E_EXTERNAL_DB
...
@@ -11,22 +11,22 @@ E2E_EXTERNAL_DB=$db && export E2E_EXTERNAL_DB
eval
openvpn
--daemon
--config
external.ovpn &>/dev/null &
eval
openvpn
--daemon
--config
external.ovpn &>/dev/null &
sleep
10
sleep
10
ssh
-i
"
$1
"
-o
'StrictHostKeyChecking no'
$2
@
$3
'cd k3s && git pull --rebase origin master'
ssh
-i
"
$1
"
-o
"StrictHostKeyChecking no"
$2
@
$3
'cd k3s && git pull --rebase origin master'
ssh
-i
"
$1
"
-o
'StrictHostKeyChecking no'
$2
@
$3
'/usr/local/go/bin/go get github.com/onsi/ginkgo/v2'
ssh
-i
"
$1
"
-o
"StrictHostKeyChecking no"
$2
@
$3
'/usr/local/go/bin/go get github.com/onsi/ginkgo/v2'
ssh
-i
"
$1
"
-o
'StrictHostKeyChecking no'
$2
@
$3
'/usr/local/go/bin/go get github.com/onsi/gomega'
ssh
-i
"
$1
"
-o
"StrictHostKeyChecking no"
$2
@
$3
'/usr/local/go/bin/go get github.com/onsi/gomega'
ssh
-i
"
$1
"
-o
'StrictHostKeyChecking no'
$2
@
$3
'/usr/local/go/bin/go get github.com/k3s-io/k3s/tests/e2e'
ssh
-i
"
$1
"
-o
"StrictHostKeyChecking no"
$2
@
$3
'/usr/local/go/bin/go get github.com/k3s-io/k3s/tests/e2e'
echo
'RUNNING CLUSTER VALIDATION TEST'
echo
'RUNNING CLUSTER VALIDATION TEST'
ssh
-i
"
$1
"
-o
'StrictHostKeyChecking no'
$2
@
$3
'cd k3s/tests/e2e/validatecluster && vagrant destroy -f'
ssh
-i
"
$1
"
-o
"StrictHostKeyChecking no"
$2
@
$3
'cd k3s/tests/e2e/validatecluster && vagrant destroy -f'
ssh
-i
"
$1
"
-o
'StrictHostKeyChecking no'
$2
@
$3
"cd k3s/tests/e2e && E2E_HARDENED=
$hardened
/usr/local/go/bin/go test -v validatecluster/validatecluster_test.go -nodeOS="
$4
" -serverCount=
$((
servercount
))
-agentCount=
$((
agentcount
))
-timeout=1h"
ssh
-i
"
$1
"
-o
"StrictHostKeyChecking no"
$2
@
$3
"cd k3s/tests/e2e && E2E_HARDENED="
$hardened
"
/usr/local/go/bin/go test -v validatecluster/validatecluster_test.go -nodeOS="
$4
" -serverCount=
$((
servercount
))
-agentCount=
$((
agentcount
))
-timeout=1h"
echo
'RUNNING SECRETS ENCRYPTION TEST'
echo
'RUNNING SECRETS ENCRYPTION TEST'
#ssh -i "$1" -o 'StrictHostKeyChecking no'
$2@$3 'cd k3s/tests/e2e/secretsencryption && vagrant destroy -f'
ssh
-i
"
$1
"
-o
"StrictHostKeyChecking no"
$2
@
$3
'cd k3s/tests/e2e/secretsencryption && vagrant destroy -f'
#ssh -i "$1" -o 'StrictHostKeyChecking no'
$2@$3 "cd k3s/tests/e2e && /usr/local/go/bin/go test -v secretsencryption/secretsencryption_test.go -nodeOS="$4" -serverCount=$((servercount)) -timeout=1h"
ssh
-i
"
$1
"
-o
"StrictHostKeyChecking no"
$2
@
$3
"cd k3s/tests/e2e && /usr/local/go/bin/go test -v secretsencryption/secretsencryption_test.go -nodeOS="
$4
" -serverCount=
$((
servercount
))
-timeout=1h"
E2E_RELEASE_VERSION
=
$k3s_version
&&
export
E2E_RELEASE_VERSION
E2E_RELEASE_VERSION
=
$k3s_version
&&
export
E2E_RELEASE_VERSION
E2E_RELEASE_CHANNEL
=
$k3s_channel
&&
export
E2E_RELEASE_CHANNEL
E2E_RELEASE_CHANNEL
=
$k3s_channel
&&
export
E2E_RELEASE_CHANNEL
echo
'RUNNING CLUSTER UPGRADE TEST'
echo
'RUNNING CLUSTER UPGRADE TEST'
#ssh -i "$1" -o 'StrictHostKeyChecking no'
$2@$3 'cd k3s/tests/e2e/upgradecluster && vagrant destroy -f'
ssh
-i
"
$1
"
-o
"StrictHostKeyChecking no"
$2
@
$3
'cd k3s/tests/e2e/upgradecluster && vagrant destroy -f'
#ssh -i "$1" -o 'StrictHostKeyChecking no'
$2@$3 "cd k3s/tests/e2e && /usr/local/go/bin/go test -v upgradecluster/upgradecluster_test.go -nodeOS="$4" -serverCount=$((servercount)) -agentCount=$((agentcount)) -timeout=1h"
ssh
-i
"
$1
"
-o
"StrictHostKeyChecking no"
$2
@
$3
"cd k3s/tests/e2e && /usr/local/go/bin/go test -v upgradecluster/upgradecluster_test.go -nodeOS="
$4
" -serverCount=
$((
servercount
))
-agentCount=
$((
agentcount
))
-timeout=1h"
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