# DO NOT MODIFY - this is managed by Git Reduce in goro and generated from build-matrix.json # --- version: 2 jobs: generate-and-push-docs: docker: - image: cimg/ruby:3.0.3 auth: username: "$DOCKERHUB_USERNAME" password: "$DOCKERHUB_PASSWORD" steps: - checkout - run: bundle config stitchfix01.jfrog.io $ARTIFACTORY_USER:$ARTIFACTORY_TOKEN - run: bundle install - run: name: Generate documentation command: ' if [[ $(bundle exec rake -T docs:generate:custom) ]]; then echo "Generating docs using rake task docs:generate:custom" ; bundle exec rake docs:generate:custom ; elif [[ $(bundle exec rake -T docs:generate) ]]; then echo "Generating docs using rake task docs:generate" ; bundle exec rake docs:generate ; else echo "Skipping doc generation" ; exit 0 ; fi ' - run: name: Push documentation to Unwritten command: if [[ $(bundle exec rake -T docs:push) ]]; then bundle exec rake docs:push; fi release: docker: - image: cimg/ruby:3.0.3 auth: username: "$DOCKERHUB_USERNAME" password: "$DOCKERHUB_PASSWORD" steps: - checkout - run: bundle config stitchfix01.jfrog.io $ARTIFACTORY_USER:$ARTIFACTORY_TOKEN - run: bundle install - run: name: Artifactory login command: mkdir -p ~/.gem && curl -u$ARTIFACTORY_USER:$ARTIFACTORY_TOKEN https://stitchfix01.jfrog.io/stitchfix01/api/gems/eng-gems/api/v1/api_key.yaml > ~/.gem/credentials && chmod 0600 ~/.gem/credentials - run: name: Build/release gem to artifactory command: bundle exec rake push_artifactory ruby-3.0.3-rails-7.0: docker: - image: cimg/ruby:3.0.3 auth: username: "$DOCKERHUB_USERNAME" password: "$DOCKERHUB_PASSWORD" environment: BUNDLE_GEMFILE: Gemfile.rails-7.0 - image: redis:2.8.12 auth: username: "$DOCKERHUB_USERNAME" password: "$DOCKERHUB_PASSWORD" - image: rabbitmq:3.5.6 auth: username: "$DOCKERHUB_USERNAME" password: "$DOCKERHUB_PASSWORD" working_directory: "~/pwwka" steps: - checkout - run: name: Check for Gemfile.lock presence command: ' if (test -f Gemfile.lock) then echo "Dont commit Gemfile.lock (see https://github.com/stitchfix/eng-wiki/blob/main/architecture-decisions/0009-rubygem-dependencies-will-be-managed-more-explicitly.md)" 1>&2 ; exit 1 ; else exit 0 ; fi ' - run: bundle config stitchfix01.jfrog.io $ARTIFACTORY_USER:$ARTIFACTORY_TOKEN - run: bundle install - run: bundle exec rspec --format RspecJunitFormatter --out /tmp/test-results/rspec.xml --format=doc - run: name: Run Additional CI Steps command: if [ -e bin/additional-ci-steps ]; then bin/additional-ci-steps; fi - run: name: Notify Pager Duty command: bundle exec y-notify "#eng-messaging-ops" when: on_fail - store_test_results: path: "/tmp/test-results" ruby-2.7.5-rails-7.0: docker: - image: cimg/ruby:2.7.5 auth: username: "$DOCKERHUB_USERNAME" password: "$DOCKERHUB_PASSWORD" environment: BUNDLE_GEMFILE: Gemfile.rails-7.0 - image: redis:2.8.12 auth: username: "$DOCKERHUB_USERNAME" password: "$DOCKERHUB_PASSWORD" - image: rabbitmq:3.5.6 auth: username: "$DOCKERHUB_USERNAME" password: "$DOCKERHUB_PASSWORD" working_directory: "~/pwwka" steps: - checkout - run: name: Check for Gemfile.lock presence command: ' if (test -f Gemfile.lock) then echo "Dont commit Gemfile.lock (see https://github.com/stitchfix/eng-wiki/blob/main/architecture-decisions/0009-rubygem-dependencies-will-be-managed-more-explicitly.md)" 1>&2 ; exit 1 ; else exit 0 ; fi ' - run: bundle config stitchfix01.jfrog.io $ARTIFACTORY_USER:$ARTIFACTORY_TOKEN - run: bundle install - run: bundle exec rspec --format RspecJunitFormatter --out /tmp/test-results/rspec.xml --format=doc - run: name: Run Additional CI Steps command: if [ -e bin/additional-ci-steps ]; then bin/additional-ci-steps; fi - run: name: Notify Pager Duty command: bundle exec y-notify "#eng-messaging-ops" when: on_fail - store_test_results: path: "/tmp/test-results" ruby-3.0.3-rails-6.1: docker: - image: cimg/ruby:3.0.3 auth: username: "$DOCKERHUB_USERNAME" password: "$DOCKERHUB_PASSWORD" environment: BUNDLE_GEMFILE: Gemfile.rails-6.1 - image: redis:2.8.12 auth: username: "$DOCKERHUB_USERNAME" password: "$DOCKERHUB_PASSWORD" - image: rabbitmq:3.5.6 auth: username: "$DOCKERHUB_USERNAME" password: "$DOCKERHUB_PASSWORD" working_directory: "~/pwwka" steps: - checkout - run: name: Check for Gemfile.lock presence command: ' if (test -f Gemfile.lock) then echo "Dont commit Gemfile.lock (see https://github.com/stitchfix/eng-wiki/blob/main/architecture-decisions/0009-rubygem-dependencies-will-be-managed-more-explicitly.md)" 1>&2 ; exit 1 ; else exit 0 ; fi ' - run: bundle config stitchfix01.jfrog.io $ARTIFACTORY_USER:$ARTIFACTORY_TOKEN - run: bundle install - run: bundle exec rspec --format RspecJunitFormatter --out /tmp/test-results/rspec.xml --format=doc - run: name: Run Additional CI Steps command: if [ -e bin/additional-ci-steps ]; then bin/additional-ci-steps; fi - run: name: Notify Pager Duty command: bundle exec y-notify "#eng-messaging-ops" when: on_fail - store_test_results: path: "/tmp/test-results" ruby-2.7.5-rails-6.1: docker: - image: cimg/ruby:2.7.5 auth: username: "$DOCKERHUB_USERNAME" password: "$DOCKERHUB_PASSWORD" environment: BUNDLE_GEMFILE: Gemfile.rails-6.1 - image: redis:2.8.12 auth: username: "$DOCKERHUB_USERNAME" password: "$DOCKERHUB_PASSWORD" - image: rabbitmq:3.5.6 auth: username: "$DOCKERHUB_USERNAME" password: "$DOCKERHUB_PASSWORD" working_directory: "~/pwwka" steps: - checkout - run: name: Check for Gemfile.lock presence command: ' if (test -f Gemfile.lock) then echo "Dont commit Gemfile.lock (see https://github.com/stitchfix/eng-wiki/blob/main/architecture-decisions/0009-rubygem-dependencies-will-be-managed-more-explicitly.md)" 1>&2 ; exit 1 ; else exit 0 ; fi ' - run: bundle config stitchfix01.jfrog.io $ARTIFACTORY_USER:$ARTIFACTORY_TOKEN - run: bundle install - run: bundle exec rspec --format RspecJunitFormatter --out /tmp/test-results/rspec.xml --format=doc - run: name: Run Additional CI Steps command: if [ -e bin/additional-ci-steps ]; then bin/additional-ci-steps; fi - run: name: Notify Pager Duty command: bundle exec y-notify "#eng-messaging-ops" when: on_fail - store_test_results: path: "/tmp/test-results" workflows: version: 2 on-commit: jobs: - release: context: org-global requires: - ruby-3.0.3-rails-7.0 - ruby-2.7.5-rails-7.0 - ruby-3.0.3-rails-6.1 - ruby-2.7.5-rails-6.1 filters: tags: only: /^[0-9]+\.[0-9]+\.[0-9]+(\.?(RC|rc)[-\.]?\w*)?$/ branches: ignore: /.*/ - generate-and-push-docs: context: org-global requires: - release filters: tags: only: /^[0-9]+\.[0-9]+\.[0-9]+(\.?(RC|rc)[-\.]?\w*)?$/ branches: ignore: /.*/ - ruby-3.0.3-rails-7.0: context: org-global filters: tags: only: &1 /.*/ - ruby-2.7.5-rails-7.0: context: org-global filters: tags: only: *1 - ruby-3.0.3-rails-6.1: context: org-global filters: tags: only: *1 - ruby-2.7.5-rails-6.1: context: org-global filters: tags: only: *1 scheduled: triggers: - schedule: cron: 17 19 * * 1,2,3,4,5 filters: branches: only: - main jobs: - ruby-3.0.3-rails-7.0: context: org-global - ruby-2.7.5-rails-7.0: context: org-global - ruby-3.0.3-rails-6.1: context: org-global - ruby-2.7.5-rails-6.1: context: org-global