ci: 增加部署到 K8s 的 stage
This commit is contained in:
8
Jenkinsfile
vendored
8
Jenkinsfile
vendored
@@ -42,5 +42,13 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
stage('部署到 K8s') {
|
||||||
|
steps {
|
||||||
|
container('kubectl') {
|
||||||
|
sh 'kubectl -n demo set image deploy/demo-app demo-app=$HARBOR/$PROJECT/$IMAGE_NAME:$IMAGE_TAG'
|
||||||
|
sh 'kubectl -n demo rollout status deploy/demo-app --timeout=120s'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user