Skip to content
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 10 commits into from Sep 29, 2017
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions Dockerfile
Expand Up @@ -10,7 +10,7 @@ COPY conjur-cli.gemspec conjur-cli.gemspec
COPY lib/conjur/version.rb lib/conjur/version.rb

# Make sure only one version of bundler is available
RUN gem uninstall bundler -i /usr/local/lib/ruby/gems/${RUBY_VERSION}.0 bundler || true && \
gem uninstall bundler -aIx && \
RUN gem uninstall bundler -i /usr/local/lib/ruby/gems/${RUBY_VERSION} bundler || true && \
Copy link
Contributor

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?

Copy link
Member Author

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.

gem uninstall bundler -aIx || true && \
gem install bundler -v 1.11.2 && \
bundle install
2 changes: 1 addition & 1 deletion Gemfile
Expand Up @@ -8,4 +8,4 @@ gemspec

gem 'activesupport', '~> 4.2'

gem 'conjur-api', git: 'https://github.com/conjurinc/api-ruby.git', branch: 'possum'
gem 'conjur-api', '~> 5.0.0'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can shorten this to '~> 5

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shortened.

6 changes: 3 additions & 3 deletions Jenkinsfile
Expand Up @@ -9,7 +9,7 @@ pipeline {
stages {
stage('Test 2.2') {
Copy link
Contributor

Choose a reason for hiding this comment

The 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.0'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of 0s - often buggy releases - we should use the latest y versions, for ruby versions 2.x.y. This ensures that we're running against recent Rubies

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to most recent 2.x version.

}

steps {
Expand All @@ -23,7 +23,7 @@ pipeline {

stage('Test 2.3') {
environment {
RUBY_VERSION = '2.3'
RUBY_VERSION = '2.3.0'
}

steps {
Expand All @@ -35,7 +35,7 @@ pipeline {

stage('Test 2.4') {
environment {
RUBY_VERSION = '2.4'
RUBY_VERSION = '2.4.0'
}

steps {
Expand Down
7 changes: 4 additions & 3 deletions test.sh
@@ -1,6 +1,9 @@
#!/bin/bash -ex

: ${RUBY_VERSION=2.2}
: ${RUBY_VERSION=2.2.5}

# My local RUBY_VERSION is set to ruby-#.#.# so this allows running locally.
RUBY_VERSION=$(cut -d '-' -f 2 <<< $RUBY_VERSION)

main() {
build
Expand All @@ -17,11 +20,9 @@ build() {
sed "s/\${RUBY_VERSION}/$RUBY_VERSION/" Dockerfile > Dockerfile.$RUBY_VERSION

docker-compose build --pull

}

start_possum() {

docker-compose pull pg possum

env CONJUR_DATA_KEY="$(docker-compose run -T --no-deps possum data-key generate)" \
Expand Down