diff --git a/Jenkinsfile b/Jenkinsfile index a17e441..133ce8c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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' + } + } + } } } \ No newline at end of file