Commit a39404f9 by tingweiwang

fix

1 parent a793cb33
Showing with 21 additions and 12 deletions
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"
}
}
}
......@@ -30,19 +30,7 @@ kubectl apply -f k8s_yaml
##########################################
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
test)
deploy_test
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!