Skip to content

Commit

Permalink
feat: parametrize rancher API endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
pameladelgado authored Jul 20, 2021
1 parent 8088ef4 commit 46a5155
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/pull-request-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ jobs:
RENKU_VALUES: ${{ secrets.CI_RENKU_VALUES }}
RENKUBOT_KUBECONFIG: ${{ secrets.RENKUBOT_DEV_KUBECONFIG }}
RENKUBOT_RANCHER_BEARER_TOKEN: ${{ secrets.RENKUBOT_RANCHER_BEARER_TOKEN }}
RANCHER_DEV_API_ENDPOINT: ${{ secrets.RANCHER_DEV_API_ENDPOINT }}
TEST_ARTIFACTS_PATH: "tests-artifacts-${{ github.sha }}"
renku: "@${{ github.head_ref }}"
renku_core: "${{ needs.check-deploy.outputs.renku-core }}"
Expand Down
8 changes: 4 additions & 4 deletions actions/deploy-renku/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,26 +39,26 @@ if [[ -n "$RANCHER_PROJECT_ID" ]]; then
NAMESPACE_EXISTS=$( curl -s -H "Authorization: Bearer $RENKUBOT_RANCHER_BEARER_TOKEN" \
-X GET \
-d "projectId=<${RANCHER_PROJECT_ID}" \
'https://rancher.iac.dev.renku.ch/v3/cluster/c-nmhfg/namespaces'| grep $RENKU_NAMESPACE)
"${RANCHER_DEV_API_ENDPOINT}/namespaces"| grep $RENKU_NAMESPACE)
if [[ -n NAMESPACE_EXISTS ]]; then
curl -s -H "Authorization: Bearer $RENKUBOT_RANCHER_BEARER_TOKEN" \
-X POST \
-d "name=${RENKU_NAMESPACE}" \
-d "projectId=${RANCHER_PROJECT_ID}" \
'https://rancher.iac.dev.renku.ch/v3/cluster/c-nmhfg/namespaces'
"${RANCHER_DEV_API_ENDPOINT}/namespaces"
fi
if [[ $RENKU_ANONYMOUS_SESSIONS = "true" ]]; then
NAMESPACE_EXISTS=$( curl -s -H "Authorization: Bearer $RENKUBOT_RANCHER_BEARER_TOKEN" \
-X GET \
-d "projectId=<${RANCHER_PROJECT_ID}" \
'https://rancher.iac.dev.renku.ch/v3/cluster/c-nmhfg/namespaces'| grep $RENKU_TMP_NAMESPACE)
"${RANCHER_DEV_API_ENDPOINT}/namespaces"| grep $RENKU_TMP_NAMESPACE)
if [[ -n NAMESPACE_EXISTS ]]; then

curl -s -H "Authorization: Bearer $RENKUBOT_RANCHER_BEARER_TOKEN" \
-X POST \
-d "name=${RENKU_TMP_NAMESPACE}" \
-d "projectId=${RANCHER_PROJECT_ID}" \
'https://rancher.iac.dev.renku.ch/v3/cluster/c-nmhfg/namespaces'
"${RANCHER_DEV_API_ENDPOINT}/namespaces"
fi
fi
fi
Expand Down

0 comments on commit 46a5155

Please sign in to comment.