Commit b717f377 by tingweiwang

Update Jenkinsfile

1 parent 53798fad
Showing with 33 additions and 14 deletions
def label = "mypod-${UUID.randomUUID().toString()}"
podTemplate(label: label, cloud: 'kubernetes') {
node('private') {
stage('Clone') {
pipeline{
agent{
label "private"
}
parameters {
gitParameter branchFilter: 'origin/(.*)', defaultValue: 'master', name: 'BRANCH', type: 'PT_BRANCH'
}
stages{
stage("clone code"){
steps{
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') {
sh "go version"
post{
always{
echo "========always========"
}
stage('docker test') {
sh "docker version"
success{
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!