diff --git a/.github/workflows/example-build-deploy-dockerfile-google.yml b/.github/workflows/example-build-deploy-dockerfile-google.yml index e93298b..b945bc6 100644 --- a/.github/workflows/example-build-deploy-dockerfile-google.yml +++ b/.github/workflows/example-build-deploy-dockerfile-google.yml @@ -26,7 +26,7 @@ concurrency: env: APPLICATION_NAME: 'demo-api-go' SYSTEM_NAME: 'core' - HELM_VALUES_PATH: '.github/test-go/deploy/values.yml' + HELM_VALUES_FILE: '.github/test-go/deploy/values.yml' PROJECT_FILE: '.github/test-go/Dockerfile' jobs: @@ -71,7 +71,7 @@ jobs: name: ${{ env.APPLICATION_NAME }} namespace: ${{ env.SYSTEM_NAME }} environment: 'dev' - helm-values-path: ${{ env.HELM_VALUES_PATH }} + helm-values-file: ${{ env.HELM_VALUES_FILE }} runtime-cloud-provider: 'GKE' # Will post to the Slack channel of your system if the deployment fails. # Can be commented out if you don't want this. @@ -98,7 +98,7 @@ jobs: name: ${{ env.APPLICATION_NAME }} namespace: ${{ env.SYSTEM_NAME }} environment: 'test' - helm-values-path: ${{ env.HELM_VALUES_PATH }} + helm-values-file: ${{ env.HELM_VALUES_FILE }} runtime-cloud-provider: 'GKE' # Will post to the Slack channel of your system if the deployment fails. # Can be commented out if you don't want this. @@ -125,7 +125,7 @@ jobs: name: ${{ env.APPLICATION_NAME }} namespace: ${{ env.SYSTEM_NAME }} environment: 'prod' - helm-values-path: ${{ env.HELM_VALUES_PATH }} + helm-values-file: ${{ env.HELM_VALUES_FILE }} runtime-cloud-provider: 'GKE' # Will post to the Slack channel of your system if the deployment fails. # Can be commented out if you don't want this. diff --git a/.github/workflows/example-build-deploy-dockerfile.yml b/.github/workflows/example-build-deploy-dockerfile.yml index 5702eb6..6898de2 100644 --- a/.github/workflows/example-build-deploy-dockerfile.yml +++ b/.github/workflows/example-build-deploy-dockerfile.yml @@ -26,7 +26,7 @@ concurrency: env: APPLICATION_NAME: 'demo-api-go' SYSTEM_NAME: 'core' - HELM_VALUES_PATH: '.github/test-go/deploy/values.yml' + HELM_VALUES_FILE: '.github/test-go/deploy/values.yml' PROJECT_FILE: '.github/test-go/Dockerfile' jobs: @@ -71,7 +71,7 @@ jobs: name: ${{ env.APPLICATION_NAME }} namespace: ${{ env.SYSTEM_NAME }} environment: 'dev' - helm-values-path: ${{ env.HELM_VALUES_PATH }} + helm-values-file: ${{ env.HELM_VALUES_FILE }} # Will post to the Slack channel of your system if the deployment fails. # Can be commented out if you don't want this. slack-channel: '#team-${{ env.SYSTEM_NAME }}-alerts' @@ -96,7 +96,7 @@ jobs: name: ${{ env.APPLICATION_NAME }} namespace: ${{ env.SYSTEM_NAME }} environment: 'test' - helm-values-path: ${{ env.HELM_VALUES_PATH }} + helm-values-file: ${{ env.HELM_VALUES_FILE }} # Will post to the Slack channel of your system if the deployment fails. # Can be commented out if you don't want this. slack-channel: '#team-${{ env.SYSTEM_NAME }}-alerts' @@ -121,7 +121,7 @@ jobs: name: ${{ env.APPLICATION_NAME }} namespace: ${{ env.SYSTEM_NAME }} environment: 'prod' - helm-values-path: ${{ env.HELM_VALUES_PATH }} + helm-values-file: ${{ env.HELM_VALUES_FILE }} # Will post to the Slack channel of your system if the deployment fails. # Can be commented out if you don't want this. slack-channel: '#team-${{ env.SYSTEM_NAME }}-alerts' diff --git a/.github/workflows/example-build-deploy-dotnet-google.yml b/.github/workflows/example-build-deploy-dotnet-google.yml index 3ff8ddb..4fa6a07 100644 --- a/.github/workflows/example-build-deploy-dotnet-google.yml +++ b/.github/workflows/example-build-deploy-dotnet-google.yml @@ -26,7 +26,7 @@ concurrency: env: APPLICATION_NAME: 'demo-api' SYSTEM_NAME: 'core' - HELM_VALUES_PATH: '.github/test/deploy/values.yml' + HELM_VALUES_FILE: '.github/test/deploy/values.yml' PROJECT_FILE: '.github/test/src/core-demo-api.csproj' jobs: @@ -109,7 +109,7 @@ jobs: name: ${{ env.APPLICATION_NAME }} namespace: ${{ env.SYSTEM_NAME }} environment: 'dev' - helm-values-path: ${{ env.HELM_VALUES_PATH }} + helm-values-file: ${{ env.HELM_VALUES_FILE }} runtime-cloud-provider: 'GKE' # Will post to the Slack channel of your system if the deployment fails. # Can be commented out if you don't want this. @@ -134,7 +134,7 @@ jobs: name: ${{ env.APPLICATION_NAME }} namespace: ${{ env.SYSTEM_NAME }} environment: 'test' - helm-values-path: ${{ env.HELM_VALUES_PATH }} + helm-values-file: ${{ env.HELM_VALUES_FILE }} runtime-cloud-provider: 'GKE' # Will post to the Slack channel of your system if the deployment fails. # Can be commented out if you don't want this. @@ -159,7 +159,7 @@ jobs: name: ${{ env.APPLICATION_NAME }} namespace: ${{ env.SYSTEM_NAME }} environment: 'prod' - helm-values-path: ${{ env.HELM_VALUES_PATH }} + helm-values-file: ${{ env.HELM_VALUES_FILE }} runtime-cloud-provider: 'GKE' # Will post to the Slack channel of your system if the deployment fails. # Can be commented out if you don't want this. diff --git a/.github/workflows/example-build-deploy-dotnet-iss.yml b/.github/workflows/example-build-deploy-dotnet-iss.yml index 4aef74f..b321f9a 100644 --- a/.github/workflows/example-build-deploy-dotnet-iss.yml +++ b/.github/workflows/example-build-deploy-dotnet-iss.yml @@ -26,7 +26,7 @@ concurrency: env: APPLICATION_NAME: 'demo-api' SYSTEM_NAME: 'iss' - HELM_VALUES_PATH: '.github/test/deploy/values.yml' + HELM_VALUES_FILE: '.github/test/deploy/values.yml' PROJECT_FILE: '.github/test/src/core-demo-api.csproj' jobs: @@ -134,7 +134,7 @@ jobs: name: ${{ env.APPLICATION_NAME }} namespace: ${{ env.SYSTEM_NAME }} environment: 'dev' - helm-values-path: ${{ env.HELM_VALUES_PATH }} + helm-values-file: ${{ env.HELM_VALUES_FILE }} runtime-cloud-provider: 'ISS' # Will post to the Slack channel of your system if the deployment fails. # Can be commented out if you don't want this. @@ -157,7 +157,7 @@ jobs: name: ${{ env.APPLICATION_NAME }} namespace: ${{ env.SYSTEM_NAME }} environment: 'test' - helm-values-path: ${{ env.HELM_VALUES_PATH }} + helm-values-file: ${{ env.HELM_VALUES_FILE }} runtime-cloud-provider: 'ISS' # Will post to the Slack channel of your system if the deployment fails. # Can be commented out if you don't want this. @@ -180,7 +180,7 @@ jobs: name: ${{ env.APPLICATION_NAME }} namespace: ${{ env.SYSTEM_NAME }} environment: 'prod' - helm-values-path: ${{ env.HELM_VALUES_PATH }} + helm-values-file: ${{ env.HELM_VALUES_FILE }} runtime-cloud-provider: 'ISS' # Will post to the Slack channel of your system if the deployment fails. # Can be commented out if you don't want this. diff --git a/.github/workflows/example-build-deploy-dotnet.yml b/.github/workflows/example-build-deploy-dotnet.yml index 2b1f5fc..57791b0 100644 --- a/.github/workflows/example-build-deploy-dotnet.yml +++ b/.github/workflows/example-build-deploy-dotnet.yml @@ -26,7 +26,7 @@ concurrency: env: APPLICATION_NAME: 'demo-api' SYSTEM_NAME: 'core' - HELM_VALUES_PATH: '.github/test/deploy/values.yml' + HELM_VALUES_FILE: '.github/test/deploy/values.yml' PROJECT_FILE: '.github/test/src/core-demo-api.csproj' jobs: @@ -109,7 +109,7 @@ jobs: name: ${{ env.APPLICATION_NAME }} namespace: ${{ env.SYSTEM_NAME }} environment: 'dev' - helm-values-path: ${{ env.HELM_VALUES_PATH }} + helm-values-file: ${{ env.HELM_VALUES_FILE }} # Will post to the Slack channel of your system if the deployment fails. # Can be commented out if you don't want this. slack-channel: '#team-${{ env.SYSTEM_NAME }}-alerts' @@ -132,7 +132,7 @@ jobs: name: ${{ env.APPLICATION_NAME }} namespace: ${{ env.SYSTEM_NAME }} environment: 'test' - helm-values-path: ${{ env.HELM_VALUES_PATH }} + helm-values-file: ${{ env.HELM_VALUES_FILE }} # Will post to the Slack channel of your system if the deployment fails. # Can be commented out if you don't want this. slack-channel: '#team-${{ env.SYSTEM_NAME }}-alerts' @@ -155,7 +155,7 @@ jobs: name: ${{ env.APPLICATION_NAME }} namespace: ${{ env.SYSTEM_NAME }} environment: 'prod' - helm-values-path: ${{ env.HELM_VALUES_PATH }} + helm-values-file: ${{ env.HELM_VALUES_FILE }} # Will post to the Slack channel of your system if the deployment fails. # Can be commented out if you don't want this. slack-channel: '#team-${{ env.SYSTEM_NAME }}-alerts' diff --git a/.github/workflows/example-build-deploy-go-google.yml b/.github/workflows/example-build-deploy-go-google.yml index 7ab9206..2cc4ed2 100644 --- a/.github/workflows/example-build-deploy-go-google.yml +++ b/.github/workflows/example-build-deploy-go-google.yml @@ -26,7 +26,7 @@ concurrency: env: APPLICATION_NAME: 'demo-api-go' SYSTEM_NAME: 'core' - HELM_VALUES_PATH: '.github/test-go/deploy/values.yml' + HELM_VALUES_FILE: '.github/test-go/deploy/values.yml' PROJECT_FILE: '.github/test-go/go.mod' jobs: @@ -82,7 +82,7 @@ jobs: name: ${{ env.APPLICATION_NAME }} namespace: ${{ env.SYSTEM_NAME }} environment: 'dev' - helm-values-path: ${{ env.HELM_VALUES_PATH }} + helm-values-file: ${{ env.HELM_VALUES_FILE }} runtime-cloud-provider: 'GKE' # Will post to the Slack channel of your system if the deployment fails. # Can be commented out if you don't want this. @@ -109,7 +109,7 @@ jobs: name: ${{ env.APPLICATION_NAME }} namespace: ${{ env.SYSTEM_NAME }} environment: 'test' - helm-values-path: ${{ env.HELM_VALUES_PATH }} + helm-values-file: ${{ env.HELM_VALUES_FILE }} runtime-cloud-provider: 'GKE' # Will post to the Slack channel of your system if the deployment fails. # Can be commented out if you don't want this. @@ -136,7 +136,7 @@ jobs: name: ${{ env.APPLICATION_NAME }} namespace: ${{ env.SYSTEM_NAME }} environment: 'prod' - helm-values-path: ${{ env.HELM_VALUES_PATH }} + helm-values-file: ${{ env.HELM_VALUES_FILE }} runtime-cloud-provider: 'GKE' # Will post to the Slack channel of your system if the deployment fails. # Can be commented out if you don't want this. diff --git a/.github/workflows/example-build-deploy-go.yml b/.github/workflows/example-build-deploy-go.yml index 2b4dc80..e2e52c8 100644 --- a/.github/workflows/example-build-deploy-go.yml +++ b/.github/workflows/example-build-deploy-go.yml @@ -26,7 +26,7 @@ concurrency: env: APPLICATION_NAME: 'demo-api-go' SYSTEM_NAME: 'core' - HELM_VALUES_PATH: '.github/test-go/deploy/values.yml' + HELM_VALUES_FILE: '.github/test-go/deploy/values.yml' PROJECT_FILE: '.github/test-go/go.mod' jobs: @@ -82,7 +82,7 @@ jobs: name: ${{ env.APPLICATION_NAME }} namespace: ${{ env.SYSTEM_NAME }} environment: 'dev' - helm-values-path: ${{ env.HELM_VALUES_PATH }} + helm-values-file: ${{ env.HELM_VALUES_FILE }} # Will post to the Slack channel of your system if the deployment fails. # Can be commented out if you don't want this. slack-channel: '#team-${{ env.SYSTEM_NAME }}-alerts' @@ -107,7 +107,7 @@ jobs: name: ${{ env.APPLICATION_NAME }} namespace: ${{ env.SYSTEM_NAME }} environment: 'test' - helm-values-path: ${{ env.HELM_VALUES_PATH }} + helm-values-file: ${{ env.HELM_VALUES_FILE }} # Will post to the Slack channel of your system if the deployment fails. # Can be commented out if you don't want this. slack-channel: '#team-${{ env.SYSTEM_NAME }}-alerts' @@ -132,7 +132,7 @@ jobs: name: ${{ env.APPLICATION_NAME }} namespace: ${{ env.SYSTEM_NAME }} environment: 'prod' - helm-values-path: ${{ env.HELM_VALUES_PATH }} + helm-values-file: ${{ env.HELM_VALUES_FILE }} # Will post to the Slack channel of your system if the deployment fails. # Can be commented out if you don't want this. slack-channel: '#team-${{ env.SYSTEM_NAME }}-alerts' diff --git a/.github/workflows/test-actions.yml b/.github/workflows/test-actions.yml index 0c7ef07..c378a8d 100644 --- a/.github/workflows/test-actions.yml +++ b/.github/workflows/test-actions.yml @@ -7,9 +7,8 @@ on: - '.github/workflows/test-actions.yml' - '.github/test/**' - '.github/test-go/**' + - '.github/test-docker/**' - '**/action.yml' - - '**/requirements.txt' - - '**/*.py' - '!README.md' workflow_dispatch: inputs: @@ -81,11 +80,11 @@ jobs: "application-name": ["${{ env.APPLICATION_BASE_NAME }}", "${{ env.APPLICATION_BASE_NAME }}-go"], "include": [ { - "helm-values-path": ".github/test/deploy/values.yml" + "helm-values-file": ".github/test/deploy/values.yml" }, { "application-name": "${{ env.APPLICATION_BASE_NAME }}-go", - "helm-values-path": ".github/test-go/deploy/values.yml" + "helm-values-file": ".github/test-go/deploy/values.yml" } ] } @@ -221,7 +220,7 @@ jobs: name: ${{ matrix.application-name }} namespace: ${{ env.SYSTEM_NAME }} environment: 'dev' - helm-values-path: ${{ matrix.helm-values-path }} + helm-values-file: ${{ matrix.helm-values-file }} slack-channel: '#team-core-alerts-muted' AZURE_CLIENT_ID: ${{ vars.AKS_CLIENT_ID }} @@ -249,7 +248,7 @@ jobs: name: ${{ matrix.application-name }} namespace: ${{ env.SYSTEM_NAME }} environment: 'dev' - helm-values-path: ${{ matrix.helm-values-path }} + helm-values-file: ${{ matrix.helm-values-file }} runtime-cloud-provider: 'GKE' GC_SERVICE_ACCOUNT: ${{ vars.GC_SERVICE_ACCOUNT }} GC_WORKLOAD_IDENTITY_PROVIDER: ${{ vars.GC_WORKLOAD_IDENTITY_PROVIDER }} diff --git a/.github/workflows/update-starter-workflows.yml b/.github/workflows/update-starter-workflows.yml index 2f3809f..9939bb2 100644 --- a/.github/workflows/update-starter-workflows.yml +++ b/.github/workflows/update-starter-workflows.yml @@ -62,7 +62,7 @@ jobs: sed -i "s/ APPLICATION_NAME: '.*'/ APPLICATION_NAME: ''/g" "$new_workflow_path" sed -i "s/ SYSTEM_NAME: '.*'/ SYSTEM_NAME: ''/g" "$new_workflow_path" - sed -i "s/ HELM_VALUES_PATH: '.*'/ HELM_VALUES_PATH: '.github\/deploy\/values.yml'/g" "$new_workflow_path" + sed -i "s/ HELM_VALUES_FILE: '.*'/ HELM_VALUES_FILE: '.github\/deploy\/values.yml'/g" "$new_workflow_path" sed -i "s/ PROJECT_FILE: '.*'/ PROJECT_FILE: ''/g" "$new_workflow_path" sed -i "s/# pull_request:/ pull_request:/g" "$new_workflow_path" sed -i 's/# branches:/ branches:/g' "$new_workflow_path" diff --git a/build/action.yml b/build/action.yml index 0fb00de..84e41ad 100644 --- a/build/action.yml +++ b/build/action.yml @@ -191,7 +191,7 @@ runs: - name: Install 3lv CLI uses: 3lvia/cli/setup@trunk with: - version: '0.16.0' # TODO: remove this (which will get latest version) when 3lv CLI is stable + version: '0.17.2' # TODO: remove this (which will get latest version) when 3lv CLI is stable - name: Handle deprecated inputs shell: bash diff --git a/deploy/action.yml b/deploy/action.yml index 979058a..5b48915 100644 --- a/deploy/action.yml +++ b/deploy/action.yml @@ -15,6 +15,11 @@ inputs: description: 'Environment to deploy to.' required: true helm-values-path: + description: 'Path to Helm values file, relative to the root of the repository.' + required: false + deprecationMessage: | + Please use `helm-values-file` instead, which is a drop-in replacement. `helm-values-path` will be removed in the future. + helm-values-file: description: 'Path to Helm values file, relative to the root of the repository.' required: false default: '.github/deploy/values.yml' @@ -135,14 +140,14 @@ runs: - name: Install 3lv CLI uses: 3lvia/cli/setup@trunk with: - version: '0.16.0' # TODO: remove this (which will get latest version) when 3lv CLI is stable + version: '0.17.2' # TODO: remove this (which will get latest version) when 3lv CLI is stable - name: Deploy shell: bash run: | 3lv deploy \ --system-name '${{ inputs.namespace }}' \ - --helm-values-file '${{ inputs.helm-values-path }}' \ + --helm-values-file "$HELM_VALUES_FILE" \ --environment '${{ inputs.environment }}' \ --workload-type '${{ inputs.workload-type }}' \ --runtime-cloud-provider '${{ inputs.runtime-cloud-provider }}' \ @@ -153,6 +158,9 @@ runs: --run-id '${{ github.run_id }}' \ '${{ inputs.name }}' env: + HELM_VALUES_FILE: ${{ inputs.helm-values-path == '' && inputs.helm-values-file || inputs.helm-values-path }} + # Pass optional inputs as environment variables, since they can be empty. + # The CLI does not accept empty strings passed to the flags, e.g. `--gke-project-id ''` will cause an error. 3LV_AZURE_TENANT_ID: ${{ inputs.AZURE_TENANT_ID }} 3LV_AZURE_CLIENT_ID: ${{ inputs.AZURE_CLIENT_ID }} 3LV_AZURE_FEDERATED_TOKEN: ${{ steps.get-federated-token.outputs.token }}