.circleci/config.yml in ddtrace-0.50.0 vs .circleci/config.yml in ddtrace-0.51.0
- old
+ new
@@ -27,10 +27,11 @@
default: medium
edge:
description: Use latest version of dependencies during testing
type: boolean
default: false
+ resource_class: <<parameters.resource_class_to_use>>
- &container_base_environment
BUNDLE_GEMFILE: /app/Gemfile
JRUBY_OPTS: --dev # Faster JVM startup: https://github.com/jruby/jruby/wiki/Improving-startup-time#use-the---dev-flag
- &container_parameters_environment
- *container_base_environment
@@ -89,17 +90,27 @@
name: Check if we restored an exact cache of gems that this job requires
# CircleCI doesn't tell us if we had a perfect cache match or partial match.
# To accomplish such check, we save `bundle_checksum` alongside the cached
# gems. After gems are restored, we compare the restored `bundle_checksum`'s
# content with the current commit's `bundle_checksum`.
+ #
+ # Because we are using a "soft" approach to our gemset lock files, we allow
+ # for partial matches to lock files until a new release goes out.
+ # This means that we might install slightly out of date gems, instead of the
+ # very latest versions from RubyGems until the next gemset update commit.
command: |
! cmp -s .circleci/bundle_checksum /usr/local/bundle/bundle_checksum
echo "export CI_BUNDLE_CACHE_HIT=$?" >> $BASH_ENV
save_bundle_checksum: &save_bundle_checksum
run:
name: Save current bundle checksum alongside cached gems
- command: cp .circleci/bundle_checksum /usr/local/bundle/bundle_checksum
+ command: |
+ if [ "$CI_BUNDLE_CACHE_HIT" != 1 ]; then
+ # Recompute gemfiles/*.lock checksum, as it might have changed.
+ cat Gemfile Appraisals gemfiles/*.gemfile.lock | md5sum > .circleci/bundle_checksum
+ fi
+ cp .circleci/bundle_checksum /usr/local/bundle/bundle_checksum
step_bundle_install: &step_bundle_install
run:
name: Install gem dependencies
command: |
if [ "$CI_BUNDLE_CACHE_HIT" != 1 ]; then
@@ -123,31 +134,19 @@
step_appraisal_update: &step_appraisal_update
run:
name: Update Appraisal gems
command: | # Remove all generated gemfiles and lockfiles, resolve, and install dependencies again
bundle exec appraisal update
-ensure_lockfile_committed: &ensure_lockfile_committed
- run:
- name: Ensure Gem lock files are commited
- command: |
- CHANGED_FILES=$(git status gemfiles/ --porcelain)
- if [[ $CHANGED_FILES ]]
- then
- >&2 echo "Gem lock files were modified or new lock files were created during"
- >&2 echo "'bundle install' and 'bundle appraisal install' installation in CI."
- >&2 echo "You need to check in those changes in your branch."
- >&2 echo "Affected files:"
- >&2 echo $CHANGED_FILES
- >&2 GIT_PAGER=cat git diff HEAD
- exit 1
- fi
step_compute_bundle_checksum: &step_compute_bundle_checksum
run:
name: Compute bundle checksum
+ # This checksum leaves some leeway for changes to Gemfile.lock, as
+ # we have a "soft" approach to committing gemset changes until release, given
+ # updating the gemset lock files produces extremely large commits.
command: |
bundle lock # Create Gemfile.lock
- cat Gemfile.lock gemfiles/*.gemfile.lock | md5sum > .circleci/bundle_checksum
+ cat Gemfile Appraisals gemfiles/*.gemfile.lock | md5sum > .circleci/bundle_checksum
step_run_all_tests: &step_run_all_tests
run:
name: Run tests
command: |
echo "
@@ -200,11 +199,10 @@
condition:
not:
equal: [ << parameters.edge >>, true ]
steps:
- *step_appraisal_install # Run on a stable set of gems we integrate with
- - *ensure_lockfile_committed
- *save_bundle_checksum
- save_cache:
key: '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundled-repo-<<parameters.ruby_version>>-{{ .Environment.CIRCLE_SHA1 }}'
paths:
- /app
@@ -386,11 +384,11 @@
"deploy release":
<<: *job_defaults
docker:
- environment:
*container_base_environment
- image: marcotc/docker-library:ddtrace_rb_2_5_6
+ image: ivoanjo/docker-library:ddtrace_rb_2_5_9
steps:
- checkout
- run:
name: Install AWS CLI
command: |
@@ -407,11 +405,11 @@
"deploy prerelease Gem":
<<: *job_defaults
docker:
- environment:
*container_base_environment
- image: marcotc/docker-library:ddtrace_rb_2_5_6
+ image: ivoanjo/docker-library:ddtrace_rb_2_5_9
steps:
- run:
name: Check if this commit author has publishing credentials
command: |
if [[ -z "${AWS_ACCESS_KEY_ID}" ]]
@@ -445,59 +443,60 @@
job_configuration:
# MRI
- &config-2_1
<<: *filters_all_branches_and_tags
ruby_version: '2.1'
- image: palazzem/docker-library:ddtrace_rb_2_1_10
+ image: ivoanjo/docker-library:ddtrace_rb_2_1_10
- &config-2_2
<<: *filters_all_branches_and_tags
ruby_version: '2.2'
- image: palazzem/docker-library:ddtrace_rb_2_2_10
+ image: ivoanjo/docker-library:ddtrace_rb_2_2_10
- &config-2_3
<<: *filters_all_branches_and_tags
ruby_version: '2.3'
- image: palazzem/docker-library:ddtrace_rb_2_3_8
+ image: ivoanjo/docker-library:ddtrace_rb_2_3_8
- &config-2_4
<<: *filters_all_branches_and_tags
ruby_version: '2.4'
- image: palazzem/docker-library:ddtrace_rb_2_4_6
+ image: ivoanjo/docker-library:ddtrace_rb_2_4_10
- &config-2_5
<<: *filters_all_branches_and_tags
ruby_version: '2.5'
- image: marcotc/docker-library:ddtrace_rb_2_5_6
+ image: ivoanjo/docker-library:ddtrace_rb_2_5_9
- &config-2_6
<<: *filters_all_branches_and_tags
ruby_version: '2.6'
- image: marcotc/docker-library:ddtrace_rb_2_6_4
+ image: ivoanjo/docker-library:ddtrace_rb_2_6_7
- &config-2_7
<<: *filters_all_branches_and_tags
ruby_version: '2.7'
- image: marcotc/docker-library:ddtrace_rb_2_7_0
+ image: ivoanjo/docker-library:ddtrace_rb_2_7_3
- &config-3_0
<<: *filters_all_branches_and_tags
ruby_version: '3.0'
- image: marcotc/docker-library:ddtrace_rb_3.0.0
+ image: ivoanjo/docker-library:ddtrace_rb_3_0_1
- &config-3_0-jit
<<: *filters_all_branches_and_tags
ruby_version: '3.0'
- image: marcotc/docker-library:ddtrace_rb_3.0.0
+ image: ivoanjo/docker-library:ddtrace_rb_3_0_1
jit: true
# JRuby
- &config-jruby-9_2_0_0 # Oldest supported version
<<: *filters_all_branches_and_tags
ruby_version: 'jruby-9.2.0.0'
- image: marcotc/docker-library:ddtrace_rb_jruby_9_2_0_0
+ image: ivoanjo/docker-library:ddtrace_rb_jruby_9_2_0_0
+ resource_class_to_use: medium+
- &config-jruby-9_2-latest # More recent release of 9.2
<<: *filters_all_branches_and_tags
ruby_version: 'jruby-9.2-latest'
- image: marcotc/docker-library:ddtrace_rb_jruby_9_2_11_1
+ image: ivoanjo/docker-library:ddtrace_rb_jruby_9_2_18_0
# TruffleRuby
- &config-truffleruby-21_0_0
<<: *filters_all_branches_and_tags
ruby_version: 'truffleruby-21.0.0'
image: ivoanjo/docker-library:ddtrace_rb_truffleruby_21_0_0
- resource_class_to_use: large
+ resource_class_to_use: medium+
workflows:
version: 2
build-and-test:
jobs:
@@ -865,6 +864,6 @@
# name: build-truffleruby-21.0.0
# - orb/test:
# <<: *config-truffleruby-21_0_0
# name: test-truffleruby-21.0.0
# requires:
- # - build-truffleruby-21.0.0
\ No newline at end of file
+ # - build-truffleruby-21.0.0