Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Remove both, lint and review, from "test-deploy.yml" and replace the filter with an alias. #2

Merged
merged 2 commits into from
Mar 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
28 changes: 10 additions & 18 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,41 +4,33 @@ orbs:
orb-tools: circleci/orb-tools@11.1
shellcheck: circleci/shellcheck@3.1

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

workflows:
lint-pack:
jobs:
- orb-tools/lint:
filters:
tags:
only: /.*/
filters: *filters
- orb-tools/pack:
filters:
tags:
only: /.*/
filters: *filters
- orb-tools/review:
filters:
tags:
only: /.*/
filters: *filters
- shellcheck/check:
exclude: SC2148,SC2038,SC2086,SC2002,SC2016
filters:
tags:
only: /.*/
filters: *filters
- orb-tools/publish:
orb-name: <namespace>/<orb-name>
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: <publishing-context>
filters:
tags:
only: /.*/
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]
filters:
tags:
only: /.*/
filters: *filters
24 changes: 8 additions & 16 deletions .circleci/test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ version: 2.1
orbs:
<orb-name>: <namespace>/<orb-name>@dev:<<pipeline.git.revision>>
orb-tools: circleci/orb-tools@11.1

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

jobs:
# Create a job to test the commands of your orbs.
# You may want to add additional validation steps to ensure the commands are working as expected.
Expand All @@ -15,29 +20,16 @@ jobs:
workflows:
test-deploy:
jobs:
# Make sure to include "filters: *filters" in every test job you want to run as part of your deployment.
- command-tests:
filters:
tags:
only: /.*/
- orb-tools/lint:
filters:
tags:
only: /.*/
filters: *filters
- orb-tools/pack:
filters:
tags:
only: /.*/
- orb-tools/review:
filters:
tags:
only: /.*/
filters: *filters
- orb-tools/publish:
orb-name: <namespace>/<orb-name>
vcs-type: << pipeline.project.type >>
pub-type: production
requires:
- orb-tools/lint
- orb-tools/review
- orb-tools/pack
- command-tests
context: <publishing-context>
Expand Down