Skip to content

Commit

Permalink
feat!: Orb Tools v12
Browse files Browse the repository at this point in the history
feat: orb tools 12
  • Loading branch information
KyleTryon authored May 9, 2023
2 parents 3223775 + e4a273e commit cb052b2
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 26 deletions.
9 changes: 5 additions & 4 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.5
orb-tools: circleci/orb-tools@12.0
shellcheck: circleci/[email protected]

filters: &filters
Expand Down Expand Up @@ -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
43 changes: 26 additions & 17 deletions .circleci/test-deploy.yml
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:
Expand All @@ -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
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 <organization>
Copyright (c) 2023 <organization>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Orb Template

<!---
[![CircleCI Build Status](https://circleci.com/gh/<organization>/<project-name>.svg?style=shield "CircleCI Build Status")](https://circleci.com/gh/<organization>/<project-name>) [![CircleCI Orb Version](https://badges.circleci.com/orbs/<namespace>/<orb-name>.svg)](https://circleci.com/orbs/registry/orb/<namespace>/<orb-name>) [![GitHub License](https://img.shields.io/badge/license-MIT-lightgrey.svg)](https://raw.githubusercontent.com/<organization>/<project-name>/master/LICENSE) [![CircleCI Community](https://img.shields.io/badge/community-CircleCI%20Discuss-343434.svg)](https://discuss.circleci.com/c/ecosystem/orbs)
[![CircleCI Build Status](https://circleci.com/gh/<organization>/<project-name>.svg?style=shield "CircleCI Build Status")](https://circleci.com/gh/<organization>/<project-name>) [![CircleCI Orb Version](https://badges.circleci.com/orbs/<namespace>/<orb-name>.svg)](https://circleci.com/developer/orbs/orb/<namespace>/<orb-name>) [![GitHub License](https://img.shields.io/badge/license-MIT-lightgrey.svg)](https://raw.githubusercontent.com/<organization>/<project-name>/master/LICENSE) [![CircleCI Community](https://img.shields.io/badge/community-CircleCI%20Discuss-343434.svg)](https://discuss.circleci.com/c/ecosystem/orbs)
--->

Expand All @@ -15,9 +15,9 @@ _**Edit this area to include a custom title and description.**_

## Resources

[CircleCI Orb Registry Page](https://circleci.com/orbs/registry/orb/<namespace>/<orb-name>) - The official registry page of this orb for all versions, executors, commands, and jobs described.
[CircleCI Orb Registry Page](https://circleci.com/developer/orbs/orb/<namespace>/<orb-name>) - The official registry page of this orb for all versions, executors, commands, and jobs described.

[CircleCI Orb Docs](https://circleci.com/docs/2.0/orb-intro/#section=configuration) - Docs for using, creating, and publishing CircleCI Orbs.
[CircleCI Orb Docs](https://circleci.com/docs/orb-intro/#section=configuration) - Docs for using, creating, and publishing CircleCI Orbs.

### How to Contribute

Expand Down
6 changes: 5 additions & 1 deletion src/scripts/greet.sh
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}!"

0 comments on commit cb052b2

Please sign in to comment.