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 d778d29 commit aa2e806
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 18 deletions.
4 changes: 2 additions & 2 deletions .circleci/authReact.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ then
nodeTag=`cat fdi-node-map.json | jq '.["'$frontendDriverVersion'"]' | tr -d '"'`
fi

if [ $nodeTag == "null" ]
if [ "$nodeTag" == "null" ]
then
nodeVersionXY=`curl -s -X GET \
"https://api.supertokens.io/0/frontend-driver-interface/dependency/driver/latest?password=$SUPERTOKENS_API_KEY&mode=DEV&version=$frontendDriverVersion&driverName=node&frontendName=auth-react" \
Expand Down Expand Up @@ -76,7 +76,7 @@ then
frontendAuthReactTag=`cat fdi-auth-react-map.json | jq '.["'$frontendDriverVersion'"]' | tr -d '"'`
fi

if [ $frontendAuthReactTag == "null" ]
if [ "$frontendAuthReactTag" == "null" ]
then
frontendAuthReactVersionXY=`curl -s -X GET \
"https://api.supertokens.io/0/frontend-driver-interface/dependency/frontend/latest?password=$SUPERTOKENS_API_KEY&frontendName=auth-react&mode=DEV&version=$frontendDriverVersion&driverName=node" \
Expand Down
2 changes: 1 addition & 1 deletion .circleci/doUnitTests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ then
coreFree=`cat cdi-core-map.json | jq '.["'$coreDriverVersion'"]'`
fi

if [ $coreFree == "null" ]
if [ "$coreFree" == "null" ]
then
coreFree=`curl -s -X GET \
"https://api.supertokens.io/0/core-driver-interface/dependency/core/latest?password=$SUPERTOKENS_API_KEY&planType=FREE&mode=DEV&version=$coreDriverVersion&driverName=node" \
Expand Down
13 changes: 8 additions & 5 deletions .circleci/forceRunCI.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
auth=`cat .pat | base64`
branch=git rev-parse --abbrev-ref HEAD
auth=`cat .pat | base64 --wrap=0`
branch=`git rev-parse --abbrev-ref HEAD`

echo $auth
curl --request POST \
--url https://circleci.com/api/v2/project/gh/CircleCI-Public/api-preview-docs/pipeline \
--header 'authorization: Basic '$auth \
--verbose \
--url 'https://circleci.com/api/v2/project/gh/supertokens/supertokens-node/pipeline' \
--header "authorization: Basic $auth" \
--header 'content-type: application/json' \
--data '{"branch":"'$branch'","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 '{"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" } }}'
4 changes: 2 additions & 2 deletions .circleci/setupAndTestBackendSDKWithFreeCore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ coreVersionXY=$1
if [ -f "cdi-core-map.json" ]
then
coreTag=`cat cdi-core-map.json | jq '.["'$1'"]' | tr -d '"'`
if [ $coreTag != "null" ]
if [ "$coreTag" != "null" ]
then
coreVersion=$coreTag
coreVersionXY=$coreTag
Expand All @@ -26,7 +26,7 @@ fi
if [ -f "cdi-plugin-interface-map.json" ]
then
pluginInterfaceTag=`cat cdi-plugin-interface-map.json | jq '.["'$1'"]' | tr -d '"'`
if [ $pluginInterfaceTag != "null" ]
if [ "$pluginInterfaceTag" != "null" ]
then
pluginInterfaceVersionXY=$pluginInterfaceTag
pluginInterfaceVersion=$pluginInterfaceTag
Expand Down
4 changes: 2 additions & 2 deletions .circleci/setupAndTestWithAuthReact.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ coreVersionXY=$1
if [ -f "cdi-core-map.json" ]
then
coreTag=`cat cdi-core-map.json | jq '.["'$1'"]' | tr -d '"'`
if [ $coreTag != "null" ]
if [ "$coreTag" != "null" ]
then
coreVersion=$coreTag
coreVersionXY=$coreTag
Expand All @@ -26,7 +26,7 @@ fi
if [ -f "cdi-plugin-interface-map.json" ]
then
pluginInterfaceTag=`cat cdi-plugin-interface-map.json | jq '.["'$1'"]' | tr -d '"'`
if [ $pluginInterfaceTag != "null" ]
if [ "$pluginInterfaceTag" != "null" ]
then
pluginInterfaceVersionXY=$pluginInterfaceTag
pluginInterfaceVersion=$pluginInterfaceTag
Expand Down
4 changes: 2 additions & 2 deletions .circleci/setupAndTestWithFreeCore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ coreVersionXY=$1
if [ -f "cdi-core-map.json" ]
then
coreTag=`cat cdi-core-map.json | jq '.["'$1'"]' | tr -d '"'`
if [ $coreTag != "null" ]
if [ "$coreTag" != "null" ]
then
coreVersion=$coreTag
coreVersionXY=$coreTag
Expand All @@ -26,7 +26,7 @@ fi
if [ -f "cdi-plugin-interface-map.json" ]
then
pluginInterfaceTag=`cat cdi-plugin-interface-map.json | jq '.["'$1'"]' | tr -d '"'`
if [ $pluginInterfaceTag != "null" ]
if [ "$pluginInterfaceTag" != "null" ]
then
pluginInterfaceVersionXY=$pluginInterfaceTag
pluginInterfaceVersion=$pluginInterfaceTag
Expand Down
4 changes: 2 additions & 2 deletions .circleci/setupAndTestWithFrontend.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ coreVersionXY=$1
if [ -f "cdi-core-map.json" ]
then
coreTag=`cat cdi-core-map.json | jq '.["'$1'"]' | tr -d '"'`
if [ $coreTag != "null" ]
if [ "$coreTag" != "null" ]
then
coreVersion=$coreTag
coreVersionXY=$coreTag
Expand All @@ -26,7 +26,7 @@ fi
if [ -f "cdi-plugin-interface-map.json" ]
then
pluginInterfaceTag=`cat cdi-plugin-interface-map.json | jq '.["'$1'"]' | tr -d '"'`
if [ $pluginInterfaceTag != "null" ]
if [ "$pluginInterfaceTag" != "null" ]
then
pluginInterfaceVersionXY=$pluginInterfaceTag
pluginInterfaceVersion=$pluginInterfaceTag
Expand Down
4 changes: 2 additions & 2 deletions .circleci/website.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ then
frontendTag=`cat fdi-website-map.json | jq '.["'$frontendDriverVersion'"]' | tr -d '"'`
fi

if [ $frontendTag == "null" ]
if [ "$frontendTag" == "null" ]
then
frontendVersionXY=`curl -s -X GET \
"https://api.supertokens.io/0/frontend-driver-interface/dependency/frontend/latest?password=$SUPERTOKENS_API_KEY&frontendName=website&mode=DEV&version=$frontendDriverVersion&driverName=node" \
Expand Down Expand Up @@ -77,7 +77,7 @@ then
nodeTag=`cat fdi-node-map.json | jq '.["'$frontendDriverVersion'"]' | tr -d '"'`
fi

if [ $nodeTag == "null" ]
if [ "$nodeTag" == "null" ]
then
nodeVersionXY=`curl -s -X GET \
"https://api.supertokens.io/0/frontend-driver-interface/dependency/driver/latest?password=$SUPERTOKENS_API_KEY&mode=DEV&version=$frontendDriverVersion&driverName=node&frontendName=website" \
Expand Down

0 comments on commit aa2e806

Please sign in to comment.