Created
April 3, 2017 14:38
-
-
Save cdenneen/e089d1373893c7c23461fa617fde0b01 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
node { | |
stage 'Checkout' | |
git branch: 'logging5', credentialsId: 'XXX', url: 'YYY' | |
stage 'Test' | |
gitCommit = sh(returnStdout: true, script: 'git rev-parse HEAD').trim() | |
// short SHA, possibly better for chat notifications, etc. | |
shortCommit = gitCommit.take(6) | |
def versions = [:] | |
def rubyVersion = ['2.1', '2.3'] | |
for (int x = 0; x < rubyVersion.size(); x++) { | |
def puppetVersion = ['4.7.1', '4.8.1', '4.9.4'] | |
for (int i = 0; i < puppetVersion.size(); i++) { | |
versions["version_r${rubyVersion[x]}_p${puppetVersion[i]}"] = { | |
println rubyVersion[x] + " " + puppetVersion[i] | |
RUBY_VERSION = rubyVersion[x] | |
PUPPET_GEM_VERSION = puppetVersion[i] | |
sh("rvm use $RUBY_VERSION") | |
sh("PUPPET_GEM_VERSION=$PUPPET_GEM_VERSION bundle install") | |
sh("PUPPET_GEM_VERSION=$PUPPET_GEM_VERSION bundle exec rake lint") | |
} | |
} | |
} | |
parallel versions | |
stage 'Build' | |
} |
This file contains hidden or 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
[Pipeline] [version_r2.1_p4.7.1] { (Branch: version_r2.1_p4.7.1) | |
[Pipeline] [version_r2.1_p4.8.1] { (Branch: version_r2.1_p4.8.1) | |
[Pipeline] [version_r2.1_p4.9.4] { (Branch: version_r2.1_p4.9.4) | |
[Pipeline] [version_r2.3_p4.7.1] { (Branch: version_r2.3_p4.7.1) | |
[Pipeline] [version_r2.3_p4.8.1] { (Branch: version_r2.3_p4.8.1) | |
[Pipeline] [version_r2.3_p4.9.4] { (Branch: version_r2.3_p4.9.4) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment