Skip to content

Commit

Permalink
ci: experiment with manually runnable ci with pre-set branchnames
Browse files Browse the repository at this point in the history
  • Loading branch information
porcellus committed Sep 26, 2024
1 parent aa2e806 commit 446c38f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
18 changes: 15 additions & 3 deletions .circleci/forceRunCI.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
auth=`cat .pat | base64 --wrap=0`
branch=`git rev-parse --abbrev-ref HEAD`

echo $auth
cdiCoreMap='{ "5.1": "feat/oauth-provider-base" }'
cdiPluginInterfaceMap='{ "5.1": "feat/oauth-provider-base" }'
fdiNodeMap='{ "3.1": "/feat/oauth2/base" }'
fdiWebsiteMap='{ "3.1": "master" }'
fdiAuthReactMap='{ "3.1": "/feat/oauth2/base" }'

data=`jq -cn --arg branch "$branch" \
--arg cdiCoreMap "$cdiCoreMap" \
--arg cdiPluginInterfaceMap "$cdiPluginInterfaceMap" \
--arg fdiNodeMap "$fdiNodeMap" \
--arg fdiWebsiteMap "$fdiWebsiteMap" \
--arg fdiAuthReactMap "$fdiAuthReactMap" \
'{ branch: $ARGS.named.branch, parameters: { force: true, "cdi-core-map": $ARGS.named.cdiCoreMap, "cdi-plugin-interface-map": $ARGS.named.cdiPluginInterfaceMap, "fdi-node-map": $ARGS.named.fdiNodeMap, "fdi-website-map": $ARGS.named.fdiWebsiteMap, "fdi-auth-react-map": $ARGS.named.fdiAuthReactMap }}'`

curl --request POST \
--verbose \
--url 'https://circleci.com/api/v2/project/gh/supertokens/supertokens-node/pipeline' \
--header "authorization: Basic $auth" \
--header 'content-type: application/json' \
--data '{"branch": "ci/manual_ci_runs","parameters":{ "force": true, "cdi-core-map": { "5.1": "feat/oauth-provider-base" }, "cdi-plugin-interface-map": { "5.1": "feat/oauth-provider-base" }, "fdi-node-map": { "3.1": "/feat/oauth2/base" }, "fdi-website-map": { "3.1": "master" }, "fdi-auth-react-map": { "3.1": "/feat/oauth2/base" } }}'
--data "$data"
2 changes: 1 addition & 1 deletion .circleci/setupAndTestBackendSDKWithFreeCore.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
coreVersionXY=$1
coreVersionXY=`echo $1 | tr -d '"'`
if [ -f "cdi-core-map.json" ]
then
coreTag=`cat cdi-core-map.json | jq '.["'$1'"]' | tr -d '"'`
Expand Down

0 comments on commit 446c38f

Please sign in to comment.