-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34 from CircleCI-Public/refactor/orb-tools-12-mig…
…ration refactor!: orb tools 12 migration
- Loading branch information
Showing
5 changed files
with
230 additions
and
249 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,141 +1,28 @@ | ||
version: 2.1 | ||
|
||
setup: true | ||
orbs: | ||
orb-tools: circleci/[email protected] | ||
jq: circleci/jq@<<pipeline.parameters.dev-orb-version>> | ||
|
||
executors: | ||
docker-base: | ||
docker: | ||
- image: cimg/base:stable | ||
macos: | ||
macos: | ||
xcode: 14.2.0 | ||
machine: | ||
machine: | ||
image: ubuntu-2004:202101-01 | ||
# Pipeline parameters | ||
parameters: | ||
# These pipeline parameters are required by the "trigger-integration-tests-workflow" | ||
# job, by default. | ||
run-integration-tests: | ||
type: boolean | ||
default: false | ||
dev-orb-version: | ||
type: string | ||
default: "dev:alpha" | ||
|
||
jobs: | ||
install: | ||
parameters: | ||
executor: | ||
type: executor | ||
version: | ||
type: string | ||
default: latest | ||
|
||
executor: <<parameters.executor>> | ||
steps: | ||
- jq/install: | ||
version: <<parameters.version>> | ||
orb-tools: circleci/[email protected] | ||
shellcheck: circleci/[email protected] | ||
|
||
orb_prep_jobs: &orb_prep_jobs | ||
[ | ||
orb-tools/lint, | ||
orb-tools/pack | ||
] | ||
|
||
prod-deploy_requires: &prod-deploy_requires | ||
[ | ||
install-latest-alpine, | ||
install-latest-machine, | ||
install-latest-macos, | ||
install-latest-docker, | ||
install-latest-oracle, | ||
install-older-alpine, | ||
] | ||
filters: &filters | ||
tags: | ||
only: /.*/ | ||
|
||
workflows: | ||
lint_pack-validate_publish-dev: | ||
unless: << pipeline.parameters.run-integration-tests >> | ||
lint-pack: | ||
jobs: | ||
- orb-tools/lint | ||
|
||
- orb-tools/pack | ||
|
||
- orb-tools/publish-dev: | ||
context: orb-publisher | ||
orb-name: circleci/jq | ||
requires: *orb_prep_jobs | ||
|
||
- orb-tools/trigger-integration-tests-workflow: | ||
context: orb-publisher | ||
requires: [orb-tools/publish-dev] | ||
|
||
integration_tests-prod_deploy: | ||
when: << pipeline.parameters.run-integration-tests >> | ||
jobs: | ||
# latest | ||
- install: | ||
name: install-latest-alpine | ||
executor: orb-tools/alpine | ||
context: orb-publisher | ||
# Test that files are not left behind | ||
post-steps: | ||
- checkout | ||
|
||
- install: | ||
name: install-latest-machine | ||
executor: machine | ||
context: orb-publisher | ||
# Test that files are not left behind | ||
post-steps: | ||
- checkout | ||
|
||
- install: | ||
name: install-latest-macos | ||
executor: macos | ||
context: orb-publisher | ||
# Test that files are not left behind | ||
post-steps: | ||
- checkout | ||
|
||
- install: | ||
name: install-latest-docker | ||
executor: docker-base | ||
context: orb-publisher | ||
# Test that files are not left behind | ||
post-steps: | ||
- checkout | ||
|
||
- install: | ||
name: install-latest-oracle | ||
executor: orb-tools/oracle | ||
context: orb-publisher | ||
# Test that files are not left behind | ||
post-steps: | ||
- checkout | ||
|
||
# older jq | ||
- install: | ||
name: install-older-alpine | ||
executor: orb-tools/alpine | ||
version: jq-1.5 | ||
context: orb-publisher | ||
# Test that files are not left behind | ||
post-steps: | ||
- checkout | ||
- orb-tools/lint: | ||
filters: *filters | ||
- orb-tools/pack: | ||
filters: *filters | ||
- orb-tools/review: | ||
filters: *filters | ||
- shellcheck/check: | ||
filters: *filters | ||
- orb-tools/continue: | ||
orb_name: jq | ||
pipeline_number: << pipeline.number >> | ||
vcs_type: << pipeline.project.type >> | ||
requires: [orb-tools/lint, orb-tools/review, orb-tools/pack, shellcheck/check] | ||
filters: *filters | ||
|
||
- orb-tools/dev-promote-prod-from-commit-subject: | ||
ssh-fingerprints: 0c:0f:b7:32:1f:7e:55:1b:f9:e9:ba:93:f9:4f:e1:e3 | ||
context: orb-publisher | ||
orb-name: circleci/jq | ||
add-pr-comment: true | ||
bot-token-variable: GHI_TOKEN | ||
bot-user: orb-publisher | ||
fail-if-semver-not-indicated: true | ||
publish-version-tag: true | ||
requires: *prod-deploy_requires | ||
filters: | ||
branches: | ||
only: master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
version: 2.1 | ||
orbs: | ||
orb-tools: circleci/[email protected] | ||
jq: {} | ||
filters: &filters | ||
tags: | ||
only: /.*/ | ||
release-filters: &release-filters | ||
branches: | ||
ignore: /.*/ | ||
tags: | ||
only: /^v[0-9]+\.[0-9]+\.[0-9]+$/ | ||
executors: | ||
docker-base: | ||
docker: | ||
- image: cimg/base:stable | ||
alpine: | ||
docker: | ||
- image: alpine:latest | ||
macos: | ||
macos: | ||
xcode: 14.2.0 | ||
machine: | ||
machine: | ||
image: ubuntu-2004:202101-01 | ||
|
||
jobs: | ||
install: | ||
parameters: | ||
executor: | ||
type: executor | ||
version: | ||
type: string | ||
default: latest | ||
executor: <<parameters.executor>> | ||
steps: | ||
- jq/install: | ||
version: <<parameters.version>> | ||
|
||
workflows: | ||
integration_tests-prod_deploy: | ||
jobs: | ||
# latest | ||
- install: | ||
name: install-latest-alpine | ||
executor: alpine | ||
context: orb-publisher | ||
|
||
- install: | ||
name: install-latest-machine | ||
executor: machine | ||
context: orb-publisher | ||
|
||
- install: | ||
name: install-latest-macos | ||
executor: macos | ||
context: orb-publisher | ||
|
||
- install: | ||
name: install-latest-docker | ||
executor: docker-base | ||
context: orb-publisher | ||
|
||
# older jq | ||
- install: | ||
name: install-older-alpine | ||
executor: alpine | ||
version: jq-1.5 | ||
context: orb-publisher | ||
|
||
- orb-tools/pack: | ||
filters: *release-filters | ||
- orb-tools/publish: | ||
orb_name: circleci/jq | ||
vcs_type: << pipeline.project.type >> | ||
pub_type: production | ||
enable_pr_comment: true | ||
requires: [orb-tools/pack, ] | ||
context: orb-publisher | ||
filters: *release-filters |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.