Skip to content

Commit

Permalink
Merge pull request #8 from ankorstore/fix/pass-fast
Browse files Browse the repository at this point in the history
fix: fix pass-fast
  • Loading branch information
ankorstore-haddowg authored Mar 10, 2023
2 parents f8c0ca7 + c972459 commit e263af1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 19 deletions.
3 changes: 0 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@ workflows:
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: orb-publishing
filters: *filters
# Triggers the next workflow in the Orb Development Kit.
- orb-tools/continue:
pipeline-number: << pipeline.number >>
vcs-type: << pipeline.project.type >>
Expand Down
1 change: 0 additions & 1 deletion .circleci/test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ filters: &filters
workflows:
test-deploy:
jobs:
# Make sure to include "filters: *filters" in every test job you want to run as part of your deployment.
- orb-tools/pack:
filters: *filters
- orb-tools/publish:
Expand Down
18 changes: 5 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,8 @@ A set of tools for crafting re-usable workflows
We welcome [issues](https://github.com/ankorstore/orb-toolbelt/issues) to and [pull requests](https://github.com/ankorstore/orb-toolbelt/pulls) against this repository!

### How to Publish An Update
1. Merge pull requests with desired changes to the main branch.
- For the best experience, squash-and-merge and use [Conventional Commit Messages](https://conventionalcommits.org/).
2. Find the current version of the orb.
- You can run `circleci orb info ankorstore/toolbelt | grep "Latest"` to see the current version.
3. Create a [new Release](https://github.com/ankorstore/orb-toolbelt/releases/new) on GitHub.
- Click "Choose a tag" and _create_ a new [semantically versioned](http://semver.org/) tag. (ex: v1.0.0)
- We will have an opportunity to change this before we publish if needed after the next step.
4. Click _"+ Auto-generate release notes"_.
- This will create a summary of all of the merged pull requests since the previous release.
- If you have used _[Conventional Commit Messages](https://conventionalcommits.org/)_ it will be easy to determine what types of changes were made, allowing you to ensure the correct version tag is being published.
5. Now ensure the version tag selected is semantically accurate based on the changes included.
6. Click _"Publish Release"_.
- This will push a new tag and trigger your publishing pipeline on CircleCI.
1. Create pull requests with desired changes to the main branch.
- Please use [Conventional Commit Messages](https://conventionalcommits.org/).
2. Label your PR with an appropriate Semver label, either `patch`, `minor`, or `major`
3. Merge your pr when its CI checks are green or enable `Auto-merge` to do this for you.
4. A new release will created and published with the appropriate semver version.
4 changes: 2 additions & 2 deletions src/scripts/pass-fast/restore.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
# Get workflows for the current pipeline and extract the previous execution of the current workflows name if there is one
get_workflows_in_pipeline() {
local WORKFLOW_ENDPOINT="https://circleci.com/api/v2/workflow/$CIRCLE_WORKFLOW_ID"
local WORKFLOW_ENDPOINT="https://circleci.com/api/v2/workflow/$CIRCLE_WORKFLOW_ID?circle-token=$CIRCLE_TOKEN"
curl -f -s --retry 3 "$WORKFLOW_ENDPOINT" > /tmp/aks/current_wf.json
local CIRCLE_WORKFLOW_NAME
CIRCLE_WORKFLOW_NAME=$(jq -r '.name ' /tmp/aks/current_wf.json)
Expand All @@ -23,7 +23,7 @@ get_artifacts_for_job() {
local ARTIFACTS_URL="https://circleci.com/api/v2/project/gh/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/$JOB_NUM/artifacts?circle-token=$CIRCLE_TOKEN"
curl -f -s --retry 3 "$ARTIFACTS_URL" > /tmp/aks/artifacts.json
local REQUIRED_ARTIFACTS
REQUIRED_ARTIFACTS=$(jq -r --argjson node_index "${CIRCLE_NODE_INDEX:0}" '.items[] | select(.node_index == $node_index) | "\(.url) \(.path)"' /tmp/aks/artifacts.json)
REQUIRED_ARTIFACTS=$(jq -r --argjson node_index "${CIRCLE_NODE_INDEX:-0}" '.items[] | select(.node_index == $node_index) | "\(.url) \(.path)"' /tmp/aks/artifacts.json)

if [ -z "$REQUIRED_ARTIFACTS" ]; then
echo "No Artifacts found."
Expand Down

0 comments on commit e263af1

Please sign in to comment.