From 9b9d79efe695936efdc01927bfeb8b1faf584582 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?T=C3=B5nis=20Ojandu?= Date: Mon, 25 Nov 2024 12:11:37 +0200 Subject: [PATCH 1/2] Unique version test images --- .github/workflows/release-for-testing.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-for-testing.yml b/.github/workflows/release-for-testing.yml index f439bf8..43f37e8 100644 --- a/.github/workflows/release-for-testing.yml +++ b/.github/workflows/release-for-testing.yml @@ -36,7 +36,7 @@ jobs: secrets: ${{ env.secrets }} - id: format-version name: "Format version" - uses: sympower/sympower-composite-actions/format-version@2024.11.15.11.12-d7db6c0 + uses: sympower/sympower-composite-actions/format-version@unique-versions-for-test-images with: style-as-release: ${{ env.IS_DEFAULT_BRANCH }} - id: build-and-upload-docker-image @@ -49,3 +49,11 @@ jobs: name: "Upload build artifacts" if: always() uses: sympower/sympower-composite-actions/upload-build-artifacts@2024.11.15.11.12-d7db6c0 + - id: deploy-staging + name: "Deploy to testing environment" + uses: sympower/sympower-composite-actions/deploy-to-environment@2024.11.15.11.12-d7db6c0 + with: + secrets: ${{ env.secrets }} + version: ${{ steps.format-version.outputs.version }} + deploy-group: testing + require-approval: false From 612c08e7085c9c2ac09d0501c590e0f1e2359514 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?T=C3=B5nis=20Ojandu?= Date: Thu, 5 Dec 2024 18:52:10 +0200 Subject: [PATCH 2/2] Unique version test images --- .github/workflows/release-for-testing.yml | 10 +++++----- .github/workflows/release-new-version.yml | 22 +++++++++++----------- README.md | 11 +++++++++++ 3 files changed, 27 insertions(+), 16 deletions(-) diff --git a/.github/workflows/release-for-testing.yml b/.github/workflows/release-for-testing.yml index 43f37e8..ebe41ce 100644 --- a/.github/workflows/release-for-testing.yml +++ b/.github/workflows/release-for-testing.yml @@ -31,27 +31,27 @@ jobs: steps: - id: setup-build-environment name: "Setup build environment" - uses: sympower/sympower-composite-actions/setup-build-environment@2024.11.15.11.12-d7db6c0 + uses: sympower/sympower-composite-actions/setup-build-environment@2024.12.05.16.28-2d0b46c with: secrets: ${{ env.secrets }} - id: format-version name: "Format version" - uses: sympower/sympower-composite-actions/format-version@unique-versions-for-test-images + uses: sympower/sympower-composite-actions/format-version@2024.12.05.16.28-2d0b46c with: style-as-release: ${{ env.IS_DEFAULT_BRANCH }} - id: build-and-upload-docker-image name: "Build and upload Docker Image" - uses: sympower/sympower-composite-actions/build-and-upload-docker-image@2024.11.15.11.12-d7db6c0 + uses: sympower/sympower-composite-actions/build-and-upload-docker-image@2024.12.05.16.28-2d0b46c with: version: ${{ steps.format-version.outputs.version }} additional-gradle-args: ${{ inputs.additional-gradle-args }} - id: upload-build-artifacts name: "Upload build artifacts" if: always() - uses: sympower/sympower-composite-actions/upload-build-artifacts@2024.11.15.11.12-d7db6c0 + uses: sympower/sympower-composite-actions/upload-build-artifacts@2024.12.05.16.28-2d0b46c - id: deploy-staging name: "Deploy to testing environment" - uses: sympower/sympower-composite-actions/deploy-to-environment@2024.11.15.11.12-d7db6c0 + uses: sympower/sympower-composite-actions/deploy-to-environment@2024.12.05.16.28-2d0b46c with: secrets: ${{ env.secrets }} version: ${{ steps.format-version.outputs.version }} diff --git a/.github/workflows/release-new-version.yml b/.github/workflows/release-new-version.yml index 995571e..2f29cca 100644 --- a/.github/workflows/release-new-version.yml +++ b/.github/workflows/release-new-version.yml @@ -39,22 +39,22 @@ jobs: steps: - id: setup-build-environment name: "Setup build environment" - uses: sympower/sympower-composite-actions/setup-build-environment@2024.11.15.11.12-d7db6c0 + uses: sympower/sympower-composite-actions/setup-build-environment@2024.12.05.16.28-2d0b46c with: secrets: ${{ env.secrets }} - id: format-version name: "Format version" - uses: sympower/sympower-composite-actions/format-version@2024.11.15.11.12-d7db6c0 + uses: sympower/sympower-composite-actions/format-version@2024.12.05.16.28-2d0b46c with: style-as-release: ${{ env.IS_DEFAULT_BRANCH }} - id: run-tests name: "Run tests" - uses: sympower/sympower-composite-actions/run-tests@2024.11.15.11.12-d7db6c0 + uses: sympower/sympower-composite-actions/run-tests@2024.12.05.16.28-2d0b46c with: additional-gradle-args: ${{ inputs.additional-gradle-args }} - id: code-analysis name: "Code analysis" - uses: sympower/sympower-composite-actions/code-analysis@2024.11.15.11.12-d7db6c0 + uses: sympower/sympower-composite-actions/code-analysis@2024.12.05.16.28-2d0b46c with: secrets: ${{ env.secrets }} additional-gradle-args: ${{ inputs.additional-gradle-args }} @@ -63,7 +63,7 @@ jobs: - id: build-and-upload-docker-image name: "Build and upload Docker Image" if: env.IS_DEFAULT_BRANCH == 'true' - uses: sympower/sympower-composite-actions/build-and-upload-docker-image@2024.11.15.11.12-d7db6c0 + uses: sympower/sympower-composite-actions/build-and-upload-docker-image@2024.12.05.16.28-2d0b46c with: version: ${{ steps.format-version.outputs.version }} additional-gradle-args: ${{ inputs.additional-gradle-args }} @@ -83,7 +83,7 @@ jobs: - id: upload-avro-schema name: "Upload Avro schema" if: env.IS_DEFAULT_BRANCH == 'true' - uses: sympower/sympower-composite-actions/upload-avro-schema@2024.11.15.11.12-d7db6c0 + uses: sympower/sympower-composite-actions/upload-avro-schema@2024.12.05.16.28-2d0b46c with: version: ${{ steps.format-version.outputs.version }} secrets: ${{ env.secrets }} @@ -92,7 +92,7 @@ jobs: - id: upload-openapi-schema name: "Upload OpenAPI schema" if: env.IS_DEFAULT_BRANCH == 'true' - uses: sympower/sympower-composite-actions/upload-openapi-schema@2024.11.15.11.12-d7db6c0 + uses: sympower/sympower-composite-actions/upload-openapi-schema@2024.12.05.16.28-2d0b46c with: version: ${{ steps.format-version.outputs.version }} secrets: ${{ env.secrets }} @@ -101,13 +101,13 @@ jobs: - id: upload-pacts name: "Upload pacts" if: env.IS_DEFAULT_BRANCH == 'true' - uses: sympower/sympower-composite-actions/upload-pacts@2024.11.15.11.12-d7db6c0 + uses: sympower/sympower-composite-actions/upload-pacts@2024.12.05.16.28-2d0b46c with: version: ${{ steps.format-version.outputs.version }} - id: deploy-staging name: "Deploy staging" if: env.IS_DEFAULT_BRANCH == 'true' - uses: sympower/sympower-composite-actions/deploy-to-environment@2024.11.15.11.12-d7db6c0 + uses: sympower/sympower-composite-actions/deploy-to-environment@2024.12.05.16.28-2d0b46c with: secrets: ${{ env.secrets }} version: ${{ steps.format-version.outputs.version }} @@ -116,7 +116,7 @@ jobs: - id: deploy-production name: "Deploy production" if: env.IS_DEFAULT_BRANCH == 'true' - uses: sympower/sympower-composite-actions/deploy-to-environment@2024.11.15.11.12-d7db6c0 + uses: sympower/sympower-composite-actions/deploy-to-environment@2024.12.05.16.28-2d0b46c with: secrets: ${{ env.secrets }} version: ${{ steps.format-version.outputs.version }} @@ -127,4 +127,4 @@ jobs: - id: upload-build-artifacts name: "Upload build artifacts" if: always() - uses: sympower/sympower-composite-actions/upload-build-artifacts@2024.11.15.11.12-d7db6c0 + uses: sympower/sympower-composite-actions/upload-build-artifacts@2024.12.05.16.28-2d0b46c diff --git a/README.md b/README.md index 243f056..abde6c1 100644 --- a/README.md +++ b/README.md @@ -88,6 +88,17 @@ jobs: schema artifact and Docker image without checking if the branch is main/master or not. This workflow is meant to be used for manually publishing testing images and schemas. +If you have added [auto-deployment JSON](https://github.com/sympower/sympower-composite-actions/blob/main/README.md#deploy-to-environment) +with `testing` deployment group then this workflow will auto-deploy the created image to the desired environment. +For example following `auto-deploy/testing.env.json` file would deploy the image created to `my-test-env` environment: + +```json +{ + "environment": "my-test-env", + "deployGroup": "testing" +} +``` + This workflow calls following composite actions: * [setup-build-environment](https://github.com/sympower/sympower-composite-actions/blob/main/README.md#setup-build-environment) * [format-version](https://github.com/sympower/sympower-composite-actions/blob/main/README.md#format-version)