Sha256: fa61ce6a88da4c3dbb22363e3768b4d7884fb7e20610e1c993734aedb8f7ebc1
Contents?: true
Size: 800 Bytes
Versions: 22
Compression:
Stored size: 800 Bytes
Contents
#!/bin/bash -ex # Constants RUBY_VERSION_DEFAULT="2.2.4" # Arguments RUBY_VERSION=${1-${RUBY_VERSION_DEFAULT}} # Script # Clones 'Dockerfile' and updates the Ruby version in FROM, returning the cloned file's path function dockerfile_path { echo "Setting Ruby version as ${RUBY_VERSION}" >&2 cp "Dockerfile" "Dockerfile.${RUBY_VERSION}" sed -i -e "s/${RUBY_VERSION_DEFAULT}/${RUBY_VERSION}/g" Dockerfile.${RUBY_VERSION} echo "Dockerfile.${RUBY_VERSION}" } rm -f Gemfile.lock # Needed for bundle to work right IMAGE_NAME="cli-ruby:${RUBY_VERSION}" # The tag is the version of Ruby tested against docker build -t ${IMAGE_NAME} -f $(dockerfile_path) . docker run --rm \ -v $PWD:/src \ ${IMAGE_NAME} \ bash -c ''' bundle update bundle exec rake jenkins bundle exec rake build '''
Version data entries
22 entries across 22 versions & 1 rubygems