Skip to content

Commit

Permalink
feat: provider output
Browse files Browse the repository at this point in the history
  • Loading branch information
devthejo committed Mar 18, 2024
1 parent 4441a61 commit 1bab305
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/actions/deploy-via-github/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion .github/actions/deploy-via-github/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand Down
3 changes: 3 additions & 0 deletions packages/common/config/load-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,9 @@ const loadConfig = async (
env: "KS_ISLOCAL",
defaultFunction: (config) => !config.ci,
},
provider: {
env: "KS_PROVIDER",
},
clusterEnvironments: {
transform: (value) => ({
...{
Expand Down
1 change: 1 addition & 0 deletions plugins/fabrique/extends/ovh.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
config:
kubeconfigContext: ovh
provider: ovh

valuesCompilers:
globalDefaults:
Expand Down

0 comments on commit 1bab305

Please sign in to comment.