-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: orb tools 12
- Loading branch information
Showing
5 changed files
with
40 additions
and
26 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,7 +1,7 @@ | ||
version: 2.1 | ||
setup: true | ||
orbs: | ||
orb-tools: circleci/orb-tools@11.5 | ||
orb-tools: circleci/orb-tools@12.0 | ||
shellcheck: circleci/[email protected] | ||
|
||
filters: &filters | ||
|
@@ -29,7 +29,8 @@ workflows: | |
filters: *filters | ||
# Triggers the next workflow in the Orb Development Kit. | ||
- orb-tools/continue: | ||
pipeline-number: << pipeline.number >> | ||
vcs-type: << pipeline.project.type >> | ||
pipeline_number: << pipeline.number >> | ||
vcs_type: << pipeline.project.type >> | ||
orb_name: <orb-name> | ||
requires: [orb-tools/publish] | ||
filters: *filters | ||
filters: *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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,28 @@ | ||
version: 2.1 | ||
orbs: | ||
<orb-name>: <namespace>/<orb-name>@dev:<<pipeline.git.revision>> | ||
orb-tools: circleci/[email protected] | ||
# Your orb will be automatically injected here during the pipeline. | ||
# Reference your orb's jobs and commands below as they will exist when built. | ||
orb-tools: circleci/[email protected] | ||
# The orb definition is intentionally not included here. It will be injected into the pipeline. | ||
<orb-name>: {} | ||
|
||
# Use this tag to ensure test jobs always run, | ||
# even though the downstream publish job will only run on release tags. | ||
filters: &filters | ||
tags: | ||
only: /.*/ | ||
|
||
# Filter for release tags. | ||
release-filters: &release-filters | ||
branches: | ||
ignore: /.*/ | ||
tags: | ||
only: /^v[0-9]+\.[0-9]+\.[0-9]+$/ | ||
|
||
jobs: | ||
# Create a job to test the commands of your orbs. | ||
# Create jobs to test the commands of your orbs. | ||
# You may want to add additional validation steps to ensure the commands are working as expected. | ||
command-tests: | ||
command-test: | ||
docker: | ||
- image: cimg/base:current | ||
steps: | ||
|
@@ -21,22 +33,19 @@ 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: | ||
# Test your orb's commands in a custom job and test your orb's jobs directly as a part of this workflow. | ||
- command-test: | ||
filters: *filters | ||
# The orb must be re-packed for publishing, and saved to the workspace. | ||
- orb-tools/pack: | ||
filters: *filters | ||
filters: *release-filters | ||
- orb-tools/publish: | ||
orb-name: <namespace>/<orb-name> | ||
vcs-type: << pipeline.project.type >> | ||
pub-type: production | ||
orb_name: <namespace>/<orb-name> | ||
vcs_type: << pipeline.project.type >> | ||
pub_type: production | ||
# Ensure this job requires all test jobs and the pack job. | ||
requires: | ||
- orb-tools/pack | ||
- command-tests | ||
- command-test | ||
context: <publishing-context> | ||
filters: | ||
branches: | ||
ignore: /.*/ | ||
tags: | ||
only: /^v[0-9]+\.[0-9]+\.[0-9]+$/ | ||
|
||
# VS Code Extension Version: 1.4.0 | ||
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
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,2 +1,6 @@ | ||
#!/bin/bash | ||
echo Hello "${PARAM_TO}" | ||
# This example uses envsubst to support variable substitution in the string parameter type. | ||
# https://circleci.com/docs/orbs-best-practices/#accepting-parameters-as-strings-or-environment-variables | ||
TO=$(circleci env subst "${PARAM_TO}") | ||
# If for any reason the TO variable is not set, default to "World" | ||
echo "Hello ${TO:-World}!" |