Skip to content

Commit

Permalink
branch detection, stability
Browse files Browse the repository at this point in the history
  • Loading branch information
bharathkkb committed Mar 26, 2020
1 parent 3b1c7b9 commit 7e24e49
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 4 additions & 2 deletions example-pipelines/example-create/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ pipeline {
}
stages {
stage('TF init & validate') {
when { anyOf {branch "prod";branch "dev";changeRequest() } }
steps {
container('terraform') {
sh '''cd example-pipelines/example-create
Expand All @@ -29,6 +30,7 @@ pipeline {
}
}
stage('TF plan') {
when { anyOf {branch "prod";branch "dev";changeRequest() } }
steps {
container('terraform') {
sh '''cd example-pipelines/example-create
Expand All @@ -37,15 +39,15 @@ pipeline {
}
}
stage('Wait for Appproval') {
when { branch "master" }
when { anyOf {branch "prod";branch "dev" } }
steps {
script {
def userInput = input(id: 'confirm', message: 'Apply Terraform?', parameters: [ [$class: 'BooleanParameterDefinition', defaultValue: false, description: 'Apply terraform', name: 'confirm'] ])
}
}
}
stage('TF Apply') {
when { branch "master" }
when { anyOf {branch "prod";branch "dev" } }
steps {
container('terraform') {
sh '''cd example-pipelines/example-create
Expand Down
5 changes: 2 additions & 3 deletions jenkins-gke/jenkins-helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,8 @@ master:
- emptyDirVolume:
memory: false
mountPath: "/tmp"
idleMinutes: "1"
podRetention: "never"
activeDeadlineSeconds: "240"
activeDeadlineSeconds: "300"
slaveConnectTimeout: "1000"
credentials: |
credentials:
Expand Down Expand Up @@ -147,7 +146,7 @@ master:
buildOriginBranchWithPR(false)
buildOriginBranch(true)
buildOriginPRMerge(true)
buildForkPRMerge(true)
includes("dev prod PR*")
}
}
orphanedItemStrategy {
Expand Down

0 comments on commit 7e24e49

Please sign in to comment.