Add when condition for infrastructure Jenkinsfile

This commit is contained in:
gavinfish 2019-10-30 15:58:24 +08:00
parent 354b5dd200
commit c85bed39e2

12
infra/Jenkinsfile vendored
View file

@ -15,6 +15,10 @@ pipeline {
}
stage('init_and_plan') {
when {
changeset "infra/terraform/*"
}
steps {
dir('infra/terraform') {
withCredentials([azureServicePrincipal(credentialsId: 'jenkins-sp',
@ -32,6 +36,10 @@ pipeline {
}
stage('apply_changes') {
when {
changeset "infra/terraform/*"
}
steps {
dir('infra/terraform') {
withCredentials([azureServicePrincipal(credentialsId: 'jenkins-sp',
@ -49,6 +57,10 @@ pipeline {
}
stage('setup_aks') {
when {
changeset "infra/terraform/*"
}
steps {
echo "$ACR_SECRET"
withCredentials([azureServicePrincipal(credentialsId: 'jenkins-sp',