Skip to content

Commit

Permalink
ci: migrate to Orb Tools 12 (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
EricRibeiro authored Jul 26, 2023
1 parent ee205ad commit 4d1fb6c
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 23 deletions.
18 changes: 6 additions & 12 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: 2.1
setup: true
orbs:
orb-tools: circleci/orb-tools@11.4
orb-tools: circleci/orb-tools@12.0
shellcheck: circleci/[email protected]

filters: &filters
Expand All @@ -16,20 +16,14 @@ workflows:
- orb-tools/pack:
filters: *filters
- orb-tools/review:
exclude: RC010
filters: *filters
- shellcheck/check:
filters: *filters
- orb-tools/publish:
orb-name: circleci/gcp-gcr
vcs-type: << pipeline.project.type >>
requires:
[orb-tools/lint, orb-tools/review, orb-tools/pack, shellcheck/check]
# Use a context to hold your publishing token.
context: orb-publisher
filters: *filters
# Triggers the next workflow in the Orb Development Kit.
- orb-tools/continue:
pipeline-number: << pipeline.number >>
vcs-type: << pipeline.project.type >>
requires: [orb-tools/publish]
orb_name: gcp-gcr
pipeline_number: << pipeline.number >>
vcs_type: << pipeline.project.type >>
requires: [orb-tools/lint, orb-tools/review, orb-tools/pack, shellcheck/check]
filters: *filters
31 changes: 20 additions & 11 deletions .circleci/test-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
version: 2.1

orbs:
gcp-gcr: circleci/gcp-gcr@dev:<<pipeline.git.revision>>
orb-tools: circleci/[email protected]
gcp-gcr: {}
orb-tools: circleci/orb-tools@12

filters: &filters
tags:
only: /.*/

release-filters: &release-filters
branches:
ignore: /.*/
tags:
only: /^v[0-9]+\.[0-9]+\.[0-9]+$/

jobs:
integration-test:
executor: gcp-gcr/default
Expand All @@ -31,6 +40,7 @@ workflows:
test-deploy:
jobs:
- integration-test:
context: cpe-gcp
filters: *filters
- gcp-gcr/build-and-push-image:
name: build-and-push
Expand All @@ -40,6 +50,7 @@ workflows:
digest-path: /tmp/digest.txt
path: ~/project/sample/
docker-context: ~/project/sample/
context: cpe-gcp
filters: *filters
requires:
- integration-test
Expand All @@ -48,18 +59,16 @@ workflows:
command: |
echo "Digest is: $(</tmp/digest.txt)"
- orb-tools/pack:
filters: *filters
filters: *release-filters
- orb-tools/publish:
orb-name: circleci/gcp-gcr
vcs-type: << pipeline.project.type >>
pub-type: production
orb_name: circleci/gcp-gcr
vcs_type: << pipeline.project.type >>
pub_type: production
enable_pr_comment: true
github_token: GHI_TOKEN
requires:
- orb-tools/pack
- integration-test
- build-and-push
context: orb-publisher
filters:
branches:
ignore: /.*/
tags:
only: /^v[0-9]+\.[0-9]+\.[0-9]+$/
filters: *release-filters

0 comments on commit 4d1fb6c

Please sign in to comment.