Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
tingweiwang
/
ksyun-CICD-test
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit a39404f9
authored
May 06, 2020
by
tingweiwang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
1 parent
a793cb33
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
12 deletions
Jenkinsfile
deploy.sh
Jenkinsfile
0 → 100644
View file @
a39404f
def label = "mypod-${UUID.randomUUID().toString()}"
podTemplate(label: label, cloud: 'kubernetes') {
node('go-pod-template') {
stage('Clone') {
echo "开始下载autodl项目代码"
git url: "https://tingweiwang@gitlab.seetatech.com/tingweiwang/jenkins-slave-test.git"
git credentialsId: '52ec3b82-77e2-4230-93a8-0b9e6381d8d2' }
stage('go test') {
sh "go version"
}
stage('docker test') {
sh "docker ps"
}
stage('测试切换36集群') {
sh "ls -la /root/.kube/config"
sh "sleep 1000000"
sh "make redeploy_all mode=dev"
}
}
}
deploy.sh
View file @
a39404f
...
@@ -30,19 +30,7 @@ kubectl apply -f k8s_yaml
...
@@ -30,19 +30,7 @@ kubectl apply -f k8s_yaml
##########################################
##########################################
deploy_test
()
deploy_test
()
{
{
sudo scp -r
$WORKSPACE
$JOB_NAME
root@
$test_host
:
$project_workspace
}
}
:<<!
if
[[
$DEPLOY_ENV
=
"dev"
]]
then
echo
"当前部署环境是开发环境"
elif
[[
$DEPLOY_ENV
=
"test"
]]
then
echo
"当前部署环境是测试环境"
else
echo
"你没有选择环境 && exit 111"
fi
!
case
$1
in
case
$1
in
test
)
test
)
deploy_test
deploy_test
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment