Created
May 8, 2017 16:17
-
-
Save cdenneen/de238bdb90b3be63e40d43c3eac03194 to your computer and use it in GitHub Desktop.
Nested Pipeline Matrix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/groovy | |
@Library('github.com/cdenneen/jenkins-shared@master') _ | |
node { | |
deleteDir() | |
stage 'Checkout' | |
git branch: 'production', url: 'https://github.com/cdenneen/control-repo.git' | |
def stashName = "${env.JOB_NAME}_${env.BUILD_NUMBER}" | |
stash stashName | |
gitCommit = sh(returnStdout: true, script: 'git rev-parse HEAD').trim() | |
// short SHA, possibly better for chat notifications, etc. | |
shortCommit = gitCommit.take(6) | |
sh "echo $shortCommit" | |
ansiColor('xterm'){ | |
stage("Puppet Testing") { | |
rubyTesting{ | |
unstash stashName | |
puppetTesting {} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Console output