Commit b717f377 by tingweiwang

Update Jenkinsfile

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