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

refactor!: MIgrate to orb tools v12 #10

Merged
merged 1 commit into from
May 26, 2023
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ version: 2.1
- shellcheck/check

orbs:
orb-tools: circleci/orb-tools@10.0
orb-tools: circleci/orb-tools@12.0
shellcheck: circleci/shellcheck@2.0
aws-s3: circleci/aws-s3@3.1.1
circleci-cli: circleci/circleci-cli@0.1.9
Expand All @@ -46,6 +46,10 @@ commands:
name: Setup AWS region
command: |
echo "export AWS_REGION=eu-central-1" >> $BASH_ENV
- run:
name: Extract orb archive
command: |
tar -xvzf orb_source.tar.gz
- aws-s3/copy:
from: orb.yml
to: s3://${S3_BUCKET_NAME_ORB_RELEASES}/<<parameters.orb-slug>>/<<parameters.orb-name>>/<<parameters.orb-version>>/orb.yml
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.idea
.idea/
.vscode/
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
fail_fast: true
repos:
- repo: git://github.com/pre-commit/pre-commit-hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: check-json
Expand Down
12 changes: 6 additions & 6 deletions src/commands/trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ parameters:
type: string
description: Branch to trigger pipeline for
default: main
build-parameters:
build_parameters:
type: string
description: Build parameters in format key=value, separated by spaces
default: ""
vcs:
type: string
description: VCS Provider that is used in the target project
default: "github"
circleci-url:
circleci_url:
type: string
description: CircleCI url to use, without trailing slash
default: "https://circleci.com"
circleci-token:
circleci_token:
type: env_var_name
description: Name of the environment variable containing the CircleCI token to use for api calls
default: CIRCLE_TOKEN
Expand All @@ -36,8 +36,8 @@ steps:
command: |
<<parameters.script>> \
--branch <<parameters.branch>> \
`if [ ! -z "<<parameters.build-parameters>>" ]; then echo "--build-parameters <<parameters.build-parameters>>"; fi` \
`if [ ! -z "<<parameters.build_parameters>>" ]; then echo "--build-parameters <<parameters.build_parameters>>"; fi` \
--vcs <<parameters.vcs>> \
--circleci-url <<parameters.circleci-url>> \
--circleci-token $<<parameters.circleci-token>> \
--circleci-url <<parameters.circleci_url>> \
--circleci-token $<<parameters.circleci_token>> \
--slug <<parameters.slug>>
4 changes: 2 additions & 2 deletions src/examples/job-trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ usage:
- trigger-pipeline/trigger:
name: trigger-dev-deployment
branch: master
build-parameters: service=booking-api stage=dev triggering_workflow=${CIRCLE_WORKFLOW_ID}
circleci-token: CIRCLE_TOKEN_ANSIBLE_API_DEPLOYMENT
build_parameters: service=booking-api stage=dev triggering_workflow=${CIRCLE_WORKFLOW_ID}
circleci_token: CIRCLE_TOKEN_ANSIBLE_API_DEPLOYMENT
slug: ${CIRCLE_PROJECT_USERNAME}/ansible-api-deployment
script: <<parameters.script>>
context:
Expand Down
14 changes: 7 additions & 7 deletions src/jobs/trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ parameters:
type: string
description: Branch to trigger pipeline for
default: main
build-parameters:
build_parameters:
type: string
description: Build parameters in format key=value, separated by spaces
default: ""
vcs:
type: string
description: VCS Provider that is used in the target project
default: "github"
circleci-url:
circleci_url:
type: string
description: CircleCI url to use, without trailing slash
default: "https://circleci.com"
circleci-token:
circleci_token:
type: env_var_name
description: Name of the environment variable containing the CircleCI token to use for api calls
default: CIRCLE_TOKEN
Expand All @@ -33,12 +33,12 @@ parameters:
default: circleci-trigger-pipeline

steps:
- create-trigger-pipeline-script
- create_trigger_pipeline_script
- trigger:
branch: <<parameters.branch>>
build-parameters: <<parameters.build-parameters>>
build_parameters: <<parameters.build_parameters>>
vcs: <<parameters.vcs>>
circleci-url: <<parameters.circleci-url>>
circleci-token: <<parameters.circleci-token>>
circleci_url: <<parameters.circleci_url>>
circleci_token: <<parameters.circleci_token>>
slug: <<parameters.slug>>
script: <<parameters.script>>