Skip to content

Commit 137e915

Browse files
committed
chore: store hash and deploy_date into a circleci context
1 parent a35c2b9 commit 137e915

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

.circleci/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,14 @@ jobs:
3232
command: tar czf _gen.tar.gz _gen/*
3333
- store_artifacts:
3434
path: _gen.tar.gz
35+
- run:
36+
name: Install CircleCI CLI
37+
command: curl -fLSs https://raw.githubusercontent.com/CircleCI-Public/circleci-cli/main/install.sh | DESTDIR=/tmp bash
38+
- run:
39+
name: Store metadata
40+
command: |
41+
echo "$(jq -r '.hash' data/api/v2/meta/index.json)" | /tmp/circleci --token "$CIRCLECI_API_TOKEN_NARAMSIM" context store-secret --org-id "$CIRCLE_ORGANIZATION_ID" "pokeapi_$CIRCLE_BRANCH" hash
42+
echo "$(jq -r '.deploy_date' data/api/v2/meta/index.json)" | /tmp/circleci --token "$CIRCLECI_API_TOKEN_NARAMSIM" context store-secret --org-id "$CIRCLE_ORGANIZATION_ID" "pokeapi_$CIRCLE_BRANCH" deploy_date
3543
# Trigger a new build of the deploy job of the deploy project
3644
- run:
3745
name: Trigger a deploy of the deploy project passing the desired environment/location to deploy to

0 commit comments

Comments
 (0)