-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate to orb-tools v11. Add orb-tools config files (#42)
* Add orb-tools config files * Fix greet.sh per shellcheck * Fix greet.sh per shellcheck. Try 2 * Exclude RC009 for long lines * Longer description in orb.yml * More correct changelog * Lowercase geos-esm per @KyleTryon * Turn off command-tests for now * Maybe this?
- Loading branch information
Showing
6 changed files
with
77 additions
and
121 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,95 +1,36 @@ | ||
version: 2.1 | ||
|
||
setup: true | ||
orbs: | ||
# Replace this with your own! | ||
circleci-tools: geos-esm/circleci-tools@<<pipeline.parameters.dev-orb-version>> | ||
orb-tools: circleci/[email protected] | ||
bats: circleci/[email protected] | ||
shellcheck: circleci/[email protected] | ||
|
||
# Pipeline Parameters | ||
## These parameters are used internally by orb-tools. Skip to the Jobs section. | ||
parameters: | ||
run-integration-tests: | ||
description: An internal flag to prevent integration test from running before a development version has been created. | ||
type: boolean | ||
default: false | ||
dev-orb-version: | ||
description: > | ||
The development version of the orb to test. | ||
This value is automatically adjusted by the "trigger-integration-tests-workflow" job to correspond with the specific version created by the commit and should not be edited. | ||
A "dev:alpha" version must exist for the initial pipeline run. | ||
type: string | ||
default: "dev:alpha" | ||
orb-tools: circleci/[email protected] | ||
shellcheck: circleci/[email protected] | ||
|
||
jobs: | ||
# Define one or more jobs which will utilize your orb's commands and parameters to validate your changes. | ||
integration-test-1: | ||
docker: | ||
- image: cimg/base:stable | ||
steps: | ||
- checkout | ||
# "greet" is a sample command packaged with this orb config. | ||
# This sample integration test will run as long as the greet command exists. Once you remove the greet command you should remove this line. | ||
# Push new changes first, before adding new tests to your config. | ||
#- circleci-tools/greet | ||
filters: &filters | ||
tags: | ||
only: /.*/ | ||
|
||
workflows: | ||
# Prior to producing a development orb (which requires credentials) basic validation, linting, and even unit testing can be performed. | ||
# This workflow will run on every commit | ||
test-pack: | ||
unless: << pipeline.parameters.run-integration-tests >> | ||
lint-pack: | ||
jobs: | ||
- orb-tools/lint # Lint Yaml files | ||
- orb-tools/pack # Pack orb source | ||
#- shellcheck/check: | ||
#dir: ./src/scripts | ||
#exclude: SC2148 | ||
# optional: Run BATS tests against your scripts | ||
- bats/run: | ||
path: ./src/tests | ||
# Publish development version(s) of the orb. | ||
- orb-tools/publish-dev: | ||
- orb-tools/lint: | ||
filters: *filters | ||
- orb-tools/pack: | ||
filters: *filters | ||
- orb-tools/review: | ||
exclude: 'RC009' | ||
filters: *filters | ||
- shellcheck/check: | ||
filters: *filters | ||
- orb-tools/publish: | ||
orb-name: geos-esm/circleci-tools | ||
context: orb-publishing # A restricted context containing your private publishing credentials. Will only execute if approved by an authorized user. | ||
requires: | ||
- orb-tools/lint | ||
- orb-tools/pack | ||
- bats/run | ||
#- shellcheck/check | ||
# Trigger an integration workflow to test the | ||
# dev:${CIRCLE_SHA1:0:7} version of your orb | ||
- orb-tools/trigger-integration-tests-workflow: | ||
name: trigger-integration-dev | ||
context: orb-publishing | ||
vcs-type: << pipeline.project.type >> | ||
requires: | ||
- orb-tools/publish-dev | ||
|
||
# This `integration-test_deploy` workflow will only run | ||
# when the run-integration-tests pipeline parameter is set to true. | ||
# It is meant to be triggered by the "trigger-integration-tests-workflow" | ||
# job, and run tests on <your orb>@dev:${CIRCLE_SHA1:0:7}. | ||
integration-test_deploy: | ||
when: << pipeline.parameters.run-integration-tests >> | ||
jobs: | ||
# Run any integration tests defined within the `jobs` key. | ||
- integration-test-1 | ||
# Publish a semver version of the orb. relies on | ||
# the commit subject containing the text "[semver:patch|minor|major|skip]" | ||
# as that will determine whether a patch, minor or major | ||
# version will be published or if publishing should | ||
# be skipped. | ||
# e.g. [semver:patch] will cause a patch version to be published. | ||
- orb-tools/dev-promote-prod-from-commit-subject: | ||
orb-name: geos-esm/circleci-tools | ||
[orb-tools/lint, orb-tools/review, orb-tools/pack, shellcheck/check] | ||
# Use a context to hold your publishing token. | ||
context: orb-publishing | ||
add-pr-comment: false | ||
fail-if-semver-not-indicated: true | ||
publish-version-tag: false | ||
requires: | ||
- integration-test-1 | ||
filters: | ||
branches: | ||
only: | ||
- master | ||
- main | ||
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: *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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
version: 2.1 | ||
orbs: | ||
circleci-tools: geos-esm/circleci-tools@dev:<<pipeline.git.revision>> | ||
orb-tools: circleci/[email protected] | ||
filters: &filters | ||
tags: | ||
only: /.*/ | ||
jobs: | ||
# Define one or more jobs which will utilize your orb's commands and parameters to validate your changes. | ||
integration-test-1: | ||
docker: | ||
- image: cimg/base:stable | ||
steps: | ||
- checkout | ||
# "greet" is a sample command packaged with this orb config. | ||
# This sample integration test will run as long as the greet command exists. Once you remove the greet command you should remove this line. | ||
# Push new changes first, before adding new tests to your config. | ||
#- circleci-tools/greet | ||
workflows: | ||
test-deploy: | ||
jobs: | ||
# Make sure to include "filters: *filters" in every test job you want to run as part of your deployment. | ||
- integration-test-1: | ||
filters: *filters | ||
- orb-tools/pack: | ||
filters: *filters | ||
- orb-tools/publish: | ||
orb-name: geos-esm/circleci-tools | ||
vcs-type: << pipeline.project.type >> | ||
pub-type: production | ||
requires: | ||
- orb-tools/pack | ||
- integration-test-1 | ||
context: orb-publishing | ||
filters: | ||
branches: | ||
ignore: /.*/ | ||
tags: | ||
only: /^v[0-9]+\.[0-9]+\.[0-9]+$/ |
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,3 +1,5 @@ | ||
#!/bin/bash | ||
|
||
Greet() { | ||
echo Hello "${PARAM_TO}" | ||
} | ||
|