Commit b717f377 by tingweiwang

Update Jenkinsfile

1 parent 53798fad
Showing with 33 additions and 14 deletions
def label = "mypod-${UUID.randomUUID().toString()}" pipeline{
podTemplate(label: label, cloud: 'kubernetes') { agent{
node('private') { label "private"
stage('Clone') { }
parameters {
gitParameter branchFilter: 'origin/(.*)', defaultValue: 'master', name: 'BRANCH', type: 'PT_BRANCH'
}
stages{
stage("clone code"){
steps{
echo "开始下载autodl项目代码" echo "开始下载autodl项目代码"
git url: "https://tingweiwang@gitlab.seetatech.com/tingweiwang/pipeline-test.git" git credentialsId: '2fbac80f-94b1-4dce-b91b-4776eef5701e',
url: 'https://tingweiwang@gitlab.seetatech.com/tingweiwang/pipeline-test.git'
} }
stage('go test') { post{
sh "go version" always{
echo "========always========"
} }
stage('docker test') { success{
sh "docker version" echo "========A executed successfully========"
}
failure{
echo "========A execution failed========"
}
}
}
}
post{
always{
echo "========always========"
}
success{
echo "========pipeline executed successfully ========"
}
failure{
echo "========pipeline execution failed========"
} }
stage('k8s test') {
sh "kubectl get node"
sh "sleep 1000000"
sh "make redeploy_all mode=dev"
} }
}
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!