Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
121 changes: 5 additions & 116 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions .circleci/pipefitter-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ruby-versions: ["supported-versions"]
run-matrix-separately: true
test-job-name: "build"
123 changes: 123 additions & 0 deletions .circleci/x_old.yml
Original file line number Diff line number Diff line change
@@ -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
15 changes: 15 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -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