From 39bf47b728ff7de3d87079be6411f896e68a4dd6 Mon Sep 17 00:00:00 2001 From: seanriordan08 Date: Wed, 1 Mar 2023 11:16:03 -0700 Subject: [PATCH 1/4] add rough pipefitter config --- .circleci/config_old.yml | 123 ++++++++++++++++++++++++++++++++ .circleci/pipefitter-config.yml | 3 + .github/CODEOWNERS | 15 ++++ 3 files changed, 141 insertions(+) create mode 100644 .circleci/config_old.yml create mode 100644 .circleci/pipefitter-config.yml create mode 100644 .github/CODEOWNERS diff --git a/.circleci/config_old.yml b/.circleci/config_old.yml new file mode 100644 index 00000000..487c5024 --- /dev/null +++ b/.circleci/config_old.yml @@ -0,0 +1,123 @@ +--- + +version: 2.1 + +orbs: + gem: doximity/gem-publisher@0 + +executors: + ruby-latest: + resource_class: small + docker: + - image: circleci/ruby:2.7.2 + environment: + BUNDLE_VERSION: "~> 2.2.8" + +# yaml anchor filters +master_only: &master_only + filters: + branches: + only: master + tags: + ignore: /.*/ +pr_only: &pr_only + filters: + branches: + ignore: master + tags: + ignore: /.*/ +version_tags_only: &version_tags_only + filters: + branches: + ignore: /.*/ + tags: + only: /^v.*/ + +jobs: + build: + executor: ruby-latest + steps: + - checkout + - run: + name: Install Bundler specific version + command: | + gem install bundler --version "${BUNDLE_VERSION}" --force + - restore_cache: + keys: + - v1-bundle-{{ checksum "Gemfile.lock" }}- + - run: + name: Install Bundler specific version + command: | + gem install bundler --version "~> 1.17" --force + - run: + name: Install Ruby Dependencies + command: bundle check --path=vendor/bundle || bundle install + - save_cache: + key: v1-bundle-{{ checksum "Gemfile.lock" }}- + paths: + - vendor/bundle + - run: + name: Run Tests + command: bundle exec rake test + - store_test_results: + name: Store test results + path: tmp/test-results + - run: + name: Run StandardRB + command: bundle exec standardrb + - store_artifacts: + name: Saves documentation + path: doc + - persist_to_workspace: + root: . + paths: + - vendor/bundle + +workflows: + version: 2 + + pull-requests: + jobs: + - build: + <<: *pr_only + - gem/build: + executor: ruby-latest + requires: + - build + - pre-release-approval: + type: approval + requires: + - gem/build + - gem/publish: + to_nexus: true + pre_release: true + requires: + - pre-release-approval + context: artifact_publishing + + trunk: + jobs: + - build: + <<: *master_only + - gem/build: + executor: ruby-latest + requires: + - build + + final-release: + jobs: + - build: + <<: *version_tags_only + - gem/build: + <<: *version_tags_only + executor: ruby-latest + requires: + - build + - gem/publish: + <<: *version_tags_only + name: gem-publish + to_rubygems: true + pre_release: false + requires: + - gem/build + context: artifact_publishing diff --git a/.circleci/pipefitter-config.yml b/.circleci/pipefitter-config.yml new file mode 100644 index 00000000..49d640b8 --- /dev/null +++ b/.circleci/pipefitter-config.yml @@ -0,0 +1,3 @@ +ruby-versions: ["supported-versions"] +run-matrix-separately: true +test-job-name: "build" diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 00000000..023f32b2 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,15 @@ +# Lines starting with '#' are comments. +# Each line is a file pattern followed by one or more owners. + +# These owners will be the default owners for everything in the repo. +# * @username + +# Order is important. The last matching pattern has the most precedence. +# So if a pull request only touches javascript files, only these owners +# will be requested to review. + +# Primary repo owners + +# Infra Automation +/.circleci @doximity/infra_automation_reviewers +/.github/workflows @doximity/infra_automation_reviewers From 5920c36bb3defef82f452d88d49e4a7349e8f0cd Mon Sep 17 00:00:00 2001 From: seanriordan08 Date: Wed, 1 Mar 2023 11:18:32 -0700 Subject: [PATCH 2/4] rename old config --- .circleci/{config_old.yml => x_old.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .circleci/{config_old.yml => x_old.yml} (100%) diff --git a/.circleci/config_old.yml b/.circleci/x_old.yml similarity index 100% rename from .circleci/config_old.yml rename to .circleci/x_old.yml From dc43fe7aae8988f9c86805aac50ec75157eeb97c Mon Sep 17 00:00:00 2001 From: seanriordan08 Date: Wed, 1 Mar 2023 11:21:56 -0700 Subject: [PATCH 3/4] add generate config --- .circleci/config.yml | 121 ++----------------------------------------- 1 file changed, 5 insertions(+), 116 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 487c5024..87a50770 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,123 +1,12 @@ ---- - version: 2.1 -orbs: - gem: doximity/gem-publisher@0 - -executors: - ruby-latest: - resource_class: small - docker: - - image: circleci/ruby:2.7.2 - environment: - BUNDLE_VERSION: "~> 2.2.8" +setup: true -# yaml anchor filters -master_only: &master_only - filters: - branches: - only: master - tags: - ignore: /.*/ -pr_only: &pr_only - filters: - branches: - ignore: master - tags: - ignore: /.*/ -version_tags_only: &version_tags_only - filters: - branches: - ignore: /.*/ - tags: - only: /^v.*/ - -jobs: - build: - executor: ruby-latest - steps: - - checkout - - run: - name: Install Bundler specific version - command: | - gem install bundler --version "${BUNDLE_VERSION}" --force - - restore_cache: - keys: - - v1-bundle-{{ checksum "Gemfile.lock" }}- - - run: - name: Install Bundler specific version - command: | - gem install bundler --version "~> 1.17" --force - - run: - name: Install Ruby Dependencies - command: bundle check --path=vendor/bundle || bundle install - - save_cache: - key: v1-bundle-{{ checksum "Gemfile.lock" }}- - paths: - - vendor/bundle - - run: - name: Run Tests - command: bundle exec rake test - - store_test_results: - name: Store test results - path: tmp/test-results - - run: - name: Run StandardRB - command: bundle exec standardrb - - store_artifacts: - name: Saves documentation - path: doc - - persist_to_workspace: - root: . - paths: - - vendor/bundle +orbs: + pipefitter: doximity/pipefitter@0 workflows: - version: 2 - - pull-requests: - jobs: - - build: - <<: *pr_only - - gem/build: - executor: ruby-latest - requires: - - build - - pre-release-approval: - type: approval - requires: - - gem/build - - gem/publish: - to_nexus: true - pre_release: true - requires: - - pre-release-approval - context: artifact_publishing - - trunk: - jobs: - - build: - <<: *master_only - - gem/build: - executor: ruby-latest - requires: - - build - - final-release: + setup: jobs: - - build: - <<: *version_tags_only - - gem/build: - <<: *version_tags_only - executor: ruby-latest - requires: - - build - - gem/publish: - <<: *version_tags_only - name: gem-publish - to_rubygems: true - pre_release: false - requires: - - gem/build + - pipefitter/generate: context: artifact_publishing From d86d2d2ef43d7eadb4ea78f941c1e5adc1a87d56 Mon Sep 17 00:00:00 2001 From: seanriordan08 Date: Wed, 1 Mar 2023 11:23:07 -0700 Subject: [PATCH 4/4] trigger ci