From 1bab305b33d2d0c9006983caa1544d09ac0816e5 Mon Sep 17 00:00:00 2001 From: devthejo Date: Mon, 18 Mar 2024 23:08:56 +0100 Subject: [PATCH] feat: provider output --- .github/actions/deploy-via-github/action.yaml | 4 ++++ .github/actions/deploy-via-github/entrypoint.sh | 6 +++++- packages/common/config/load-config.js | 3 +++ plugins/fabrique/extends/ovh.yaml | 1 + 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/actions/deploy-via-github/action.yaml b/.github/actions/deploy-via-github/action.yaml index 655d80fff6..a4bad83d47 100644 --- a/.github/actions/deploy-via-github/action.yaml +++ b/.github/actions/deploy-via-github/action.yaml @@ -42,6 +42,10 @@ inputs: description: "Set config values using dot notation. eg: my.config.key=value,another.config.key=value2" default: "" +outputs: + provider: + description: "Plateform provider" + runs: using: docker # image: Dockerfile diff --git a/.github/actions/deploy-via-github/entrypoint.sh b/.github/actions/deploy-via-github/entrypoint.sh index ae2285f2ad..5df3ef039c 100755 --- a/.github/actions/deploy-via-github/entrypoint.sh +++ b/.github/actions/deploy-via-github/entrypoint.sh @@ -27,16 +27,20 @@ else fi +cd $GITHUB_WORKSPACE if [ -n "$KS_DEPLOY_WRITE_OUTPUT_FILE" ]; then if [ "$KS_DEPLOY_WRITE_OUTPUT_FILE" = "true" ]; then export KS_DEPLOY_WRITE_OUTPUT_FILE="kontinuous-deployment-output.log" fi - cd $GITHUB_WORKSPACE script -e -q -f -c "kontinuous deploy" "$KS_DEPLOY_WRITE_OUTPUT_FILE" else kontinuous deploy fi +provider=$(kontinuous config provider) + +echo "provider=$provider" >> $GITHUB_OUTPUT + EXIT_CODE=$? mv "$KS_BUILD_PATH/manifests.yaml" \ diff --git a/packages/common/config/load-config.js b/packages/common/config/load-config.js index ce8f37ccd3..20253fd71a 100644 --- a/packages/common/config/load-config.js +++ b/packages/common/config/load-config.js @@ -489,6 +489,9 @@ const loadConfig = async ( env: "KS_ISLOCAL", defaultFunction: (config) => !config.ci, }, + provider: { + env: "KS_PROVIDER", + }, clusterEnvironments: { transform: (value) => ({ ...{ diff --git a/plugins/fabrique/extends/ovh.yaml b/plugins/fabrique/extends/ovh.yaml index d5777de882..26183cb9ca 100644 --- a/plugins/fabrique/extends/ovh.yaml +++ b/plugins/fabrique/extends/ovh.yaml @@ -1,5 +1,6 @@ config: kubeconfigContext: ovh + provider: ovh valuesCompilers: globalDefaults: