This repository has been archived by the owner on Dec 7, 2023. It is now read-only.
Fix Possum branch CI build #182
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
b623d75
pin api version and make ruby versions more explicit
0ab89dd
add bundler uninstall back in
5e564e0
remove unnecessary or true
b2f44a0
pass ruby version as cli arg
6de4d5d
switch back to using env vars
5f222c3
restore Jenkinsfile from possum branch
fbeb4d6
make ruby versions explicit
8e7ba3a
update API and gem versions
bebb98e
Run tests in parallel, use publish.sh
dustinmm80 c879c0a
Run tests in serial for now
dustinmm80 File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,51 +3,45 @@ pipeline { | |
|
||
options { | ||
timestamps() | ||
buildDiscarder(logRotator(numToKeepStr: '30')) | ||
} | ||
buildDiscarder(logRotator(daysToKeepStr: '30')) | ||
} | ||
|
||
stages { | ||
stage('Test 2.2') { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should run these stages in parallel. I can add a commit to this PR showing how. |
||
environment { | ||
RUBY_VERSION = '2.2' | ||
RUBY_VERSION = '2.2.8' | ||
} | ||
|
||
steps { | ||
milestone(1) | ||
|
||
sh './test.sh' | ||
|
||
junit 'spec/reports/*.xml, features/reports/*.xml' | ||
} | ||
} | ||
|
||
stage('Test 2.3') { | ||
environment { | ||
RUBY_VERSION = '2.3' | ||
RUBY_VERSION = '2.3.5' | ||
} | ||
|
||
steps { | ||
sh './test.sh' | ||
|
||
junit 'spec/reports/*.xml, features/reports/*.xml' | ||
} | ||
} | ||
|
||
stage('Test 2.4') { | ||
environment { | ||
RUBY_VERSION = '2.4' | ||
RUBY_VERSION = '2.4.2' | ||
} | ||
|
||
steps { | ||
sh './test.sh' | ||
|
||
junit 'spec/reports/*.xml, features/reports/*.xml' | ||
} | ||
} | ||
|
||
// Only publish to RubyGems if branch is 'master' | ||
// AND someone confirms this stage within 5 minutes | ||
stage('Publish to RubyGems?') { | ||
agent { label 'releaser-v2' } | ||
|
||
when { | ||
allOf { | ||
branch 'master' | ||
|
@@ -72,20 +66,19 @@ pipeline { | |
} | ||
} | ||
steps { | ||
milestone(2) | ||
build(job: 'release-rubygems', parameters: [ | ||
string(name: 'GEM_NAME', value: 'conjur-api'), | ||
string(name: 'GEM_BRANCH', value: "${env.BRANCH_NAME}") | ||
]) | ||
milestone(3) | ||
sh './publish.sh' | ||
// Clean up this workspace | ||
sh 'docker run -i --rm -v $PWD:/src -w /src alpine/git clean -fxd' | ||
deleteDir() | ||
} | ||
} | ||
} | ||
|
||
post { | ||
always { | ||
sh 'docker run -i --rm -v $PWD:/src -w /src alpine/git clean -fxd' | ||
} | ||
deleteDir() | ||
} | ||
failure { | ||
slackSend(color: 'danger', message: "${env.JOB_NAME} #${env.BUILD_NUMBER} FAILURE (<${env.BUILD_URL}|Open>)") | ||
} | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
#!/bin/bash -e | ||
|
||
distribution=$1 | ||
component=${2:-`echo $GIT_BRANCH | sed 's/^origin\///' | tr '/' '.'`} | ||
docker pull registry.tld/conjurinc/publish-rubygem | ||
|
||
exec summon -f ci/secrets/publish.yml ./ci/publish.sh $distribution $component | ||
summon --yaml "RUBYGEMS_API_KEY: !var rubygems/api-key" \ | ||
docker run --rm --env-file @SUMMONENVFILE -v "$(pwd)":/opt/src \ | ||
registry.tld/conjurinc/publish-rubygem conjur-cli |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we have to run
gem uninstall bundler
twice here?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure, but it looks like it's once for the currently selected gemset and once for the version-specific gemset. No idea why this is necessary. Could try without the latter, perhaps.