From 92f81929aaeb5e4259a865d655e232a4b514192e Mon Sep 17 00:00:00 2001 From: Lennart Dohmann Date: Thu, 28 Sep 2023 10:52:46 +0200 Subject: [PATCH] Fix pipeline conditions for environments --- .github/workflows/ci-dotnet.yaml | 8 ++++---- .github/workflows/ci-golang.yaml | 8 ++++---- .github/workflows/ci-java-legacy.yaml | 8 ++++---- .github/workflows/ci-java.yaml | 8 ++++---- .github/workflows/ci-python.yaml | 8 ++++---- .github/workflows/ci-ruby.yaml | 8 ++++---- .github/workflows/ci-rust.yaml | 8 ++++---- .github/workflows/ci-typescript.yaml | 8 ++++---- 8 files changed, 32 insertions(+), 32 deletions(-) diff --git a/.github/workflows/ci-dotnet.yaml b/.github/workflows/ci-dotnet.yaml index 97972226..9f718893 100644 --- a/.github/workflows/ci-dotnet.yaml +++ b/.github/workflows/ci-dotnet.yaml @@ -26,12 +26,12 @@ on: env: CLIENT_ID: ${{ secrets.CLIENT_ID }} - CLIENT_SECRET: ${{ (inputs.environment == 'production' || startsWith(github.ref, 'refs/tags/cs')) && secrets.CLIENT_SECRET || secrets.STAGING_CLIENT_SECRET }} - VAAS_URL: ${{ (inputs.environment == 'production' || startsWith(github.ref, 'refs/tags/cs')) && 'wss://gateway.production.vaas.gdatasecurity.de' || 'wss://gateway.staging.vaas.gdatasecurity.de' }} - TOKEN_URL: ${{ (inputs.environment == 'production' || startsWith(github.ref, 'refs/tags/cs')) && 'https://account.gdata.de/realms/vaas-production/protocol/openid-connect/token' || 'https://account-staging.gdata.de/realms/vaas-staging/protocol/openid-connect/token' }} + CLIENT_SECRET: ${{ (inputs.environment == 'production' || inputs.environment == null || startsWith(github.ref, 'refs/tags/cs')) && secrets.CLIENT_SECRET || secrets.STAGING_CLIENT_SECRET }} + VAAS_URL: ${{ (inputs.environment == 'production' || inputs.environment == null || startsWith(github.ref, 'refs/tags/cs')) && 'wss://gateway.production.vaas.gdatasecurity.de' || 'wss://gateway.staging.vaas.gdatasecurity.de' }} + TOKEN_URL: ${{ (inputs.environment == 'production' || inputs.environment == null || startsWith(github.ref, 'refs/tags/cs')) && 'https://account.gdata.de/realms/vaas-production/protocol/openid-connect/token' || 'https://account-staging.gdata.de/realms/vaas-staging/protocol/openid-connect/token' }} VAAS_CLIENT_ID: ${{ secrets.VAAS_CLIENT_ID }} VAAS_USER_NAME: ${{ secrets.VAAS_USER_NAME }} - VAAS_PASSWORD: ${{ (inputs.environment == 'production' || startsWith(github.ref, 'refs/tags/cs')) && secrets.VAAS_PASSWORD || secrets.STAGING_VAAS_PASSWORD }} + VAAS_PASSWORD: ${{ (inputs.environment == 'production' || inputs.environment == null || startsWith(github.ref, 'refs/tags/cs')) && secrets.VAAS_PASSWORD || secrets.STAGING_VAAS_PASSWORD }} jobs: build-dotnet: diff --git a/.github/workflows/ci-golang.yaml b/.github/workflows/ci-golang.yaml index c080e3ca..a2fa7d9e 100644 --- a/.github/workflows/ci-golang.yaml +++ b/.github/workflows/ci-golang.yaml @@ -26,12 +26,12 @@ on: env: CLIENT_ID: ${{ secrets.CLIENT_ID }} - CLIENT_SECRET: ${{ (inputs.environment == 'production' || startsWith(github.ref, 'refs/tags/go')) && secrets.CLIENT_SECRET || secrets.STAGING_CLIENT_SECRET }} - VAAS_URL: ${{ (inputs.environment == 'production' || startsWith(github.ref, 'refs/tags/go')) && 'wss://gateway.production.vaas.gdatasecurity.de' || 'wss://gateway.staging.vaas.gdatasecurity.de' }} - TOKEN_URL: ${{ (inputs.environment == 'production' || startsWith(github.ref, 'refs/tags/go')) && 'https://account.gdata.de/realms/vaas-production/protocol/openid-connect/token' || 'https://account-staging.gdata.de/realms/vaas-staging/protocol/openid-connect/token' }} + CLIENT_SECRET: ${{ (inputs.environment == 'production' || inputs.environment == null || startsWith(github.ref, 'refs/tags/go')) && secrets.CLIENT_SECRET || secrets.STAGING_CLIENT_SECRET }} + VAAS_URL: ${{ (inputs.environment == 'production' || inputs.environment == null || startsWith(github.ref, 'refs/tags/go')) && 'wss://gateway.production.vaas.gdatasecurity.de' || 'wss://gateway.staging.vaas.gdatasecurity.de' }} + TOKEN_URL: ${{ (inputs.environment == 'production' || inputs.environment == null || startsWith(github.ref, 'refs/tags/go')) && 'https://account.gdata.de/realms/vaas-production/protocol/openid-connect/token' || 'https://account-staging.gdata.de/realms/vaas-staging/protocol/openid-connect/token' }} VAAS_CLIENT_ID: ${{ secrets.VAAS_CLIENT_ID }} VAAS_USER_NAME: ${{ secrets.VAAS_USER_NAME }} - VAAS_PASSWORD: ${{ (inputs.environment == 'production' || startsWith(github.ref, 'refs/tags/go')) && secrets.VAAS_PASSWORD || secrets.STAGING_VAAS_PASSWORD }} + VAAS_PASSWORD: ${{ (inputs.environment == 'production' || inputs.environment == null || startsWith(github.ref, 'refs/tags/go')) && secrets.VAAS_PASSWORD || secrets.STAGING_VAAS_PASSWORD }} jobs: build-golang: diff --git a/.github/workflows/ci-java-legacy.yaml b/.github/workflows/ci-java-legacy.yaml index d2c49d6e..aeee5f73 100644 --- a/.github/workflows/ci-java-legacy.yaml +++ b/.github/workflows/ci-java-legacy.yaml @@ -26,12 +26,12 @@ on: env: CLIENT_ID: ${{ secrets.CLIENT_ID }} - CLIENT_SECRET: ${{ (inputs.environment == 'production' || startsWith(github.ref, 'refs/tags/java')) && secrets.CLIENT_SECRET || secrets.STAGING_CLIENT_SECRET }} - VAAS_URL: ${{ (inputs.environment == 'production' || startsWith(github.ref, 'refs/tags/java')) && 'wss://gateway.production.vaas.gdatasecurity.de' || 'wss://gateway.staging.vaas.gdatasecurity.de' }} - TOKEN_URL: ${{ (inputs.environment == 'production' || startsWith(github.ref, 'refs/tags/java')) && 'https://account.gdata.de/realms/vaas-production/protocol/openid-connect/token' || 'https://account-staging.gdata.de/realms/vaas-staging/protocol/openid-connect/token' }} + CLIENT_SECRET: ${{ (inputs.environment == 'production' || inputs.environment == null || startsWith(github.ref, 'refs/tags/java')) && secrets.CLIENT_SECRET || secrets.STAGING_CLIENT_SECRET }} + VAAS_URL: ${{ (inputs.environment == 'production' || inputs.environment == null || startsWith(github.ref, 'refs/tags/java')) && 'wss://gateway.production.vaas.gdatasecurity.de' || 'wss://gateway.staging.vaas.gdatasecurity.de' }} + TOKEN_URL: ${{ (inputs.environment == 'production' || inputs.environment == null || startsWith(github.ref, 'refs/tags/java')) && 'https://account.gdata.de/realms/vaas-production/protocol/openid-connect/token' || 'https://account-staging.gdata.de/realms/vaas-staging/protocol/openid-connect/token' }} VAAS_CLIENT_ID: ${{ secrets.VAAS_CLIENT_ID }} VAAS_USER_NAME: ${{ secrets.VAAS_USER_NAME }} - VAAS_PASSWORD: ${{ (inputs.environment == 'production' || startsWith(github.ref, 'refs/tags/java')) && secrets.VAAS_PASSWORD || secrets.STAGING_VAAS_PASSWORD }} + VAAS_PASSWORD: ${{ (inputs.environment == 'production' || inputs.environment == null || startsWith(github.ref, 'refs/tags/java')) && secrets.VAAS_PASSWORD || secrets.STAGING_VAAS_PASSWORD }} jobs: build-java-legacy: diff --git a/.github/workflows/ci-java.yaml b/.github/workflows/ci-java.yaml index 2b5b076d..91daac4e 100644 --- a/.github/workflows/ci-java.yaml +++ b/.github/workflows/ci-java.yaml @@ -26,12 +26,12 @@ on: env: CLIENT_ID: ${{ secrets.CLIENT_ID }} - CLIENT_SECRET: ${{ (inputs.environment == 'production' || startsWith(github.ref, 'refs/tags/java')) && secrets.CLIENT_SECRET || secrets.STAGING_CLIENT_SECRET }} - VAAS_URL: ${{ (inputs.environment == 'production' || startsWith(github.ref, 'refs/tags/java')) && 'wss://gateway.production.vaas.gdatasecurity.de' || 'wss://gateway.staging.vaas.gdatasecurity.de' }} - TOKEN_URL: ${{ (inputs.environment == 'production' || startsWith(github.ref, 'refs/tags/java')) && 'https://account.gdata.de/realms/vaas-production/protocol/openid-connect/token' || 'https://account-staging.gdata.de/realms/vaas-staging/protocol/openid-connect/token' }} + CLIENT_SECRET: ${{ (inputs.environment == 'production' || inputs.environment == null || startsWith(github.ref, 'refs/tags/java')) && secrets.CLIENT_SECRET || secrets.STAGING_CLIENT_SECRET }} + VAAS_URL: ${{ (inputs.environment == 'production' || inputs.environment == null || startsWith(github.ref, 'refs/tags/java')) && 'wss://gateway.production.vaas.gdatasecurity.de' || 'wss://gateway.staging.vaas.gdatasecurity.de' }} + TOKEN_URL: ${{ (inputs.environment == 'production' || inputs.environment == null || startsWith(github.ref, 'refs/tags/java')) && 'https://account.gdata.de/realms/vaas-production/protocol/openid-connect/token' || 'https://account-staging.gdata.de/realms/vaas-staging/protocol/openid-connect/token' }} VAAS_CLIENT_ID: ${{ secrets.VAAS_CLIENT_ID }} VAAS_USER_NAME: ${{ secrets.VAAS_USER_NAME }} - VAAS_PASSWORD: ${{ (inputs.environment == 'production' || startsWith(github.ref, 'refs/tags/java')) && secrets.VAAS_PASSWORD || secrets.STAGING_VAAS_PASSWORD }} + VAAS_PASSWORD: ${{ (inputs.environment == 'production' || inputs.environment == null || startsWith(github.ref, 'refs/tags/java')) && secrets.VAAS_PASSWORD || secrets.STAGING_VAAS_PASSWORD }} jobs: build-java: diff --git a/.github/workflows/ci-python.yaml b/.github/workflows/ci-python.yaml index 7e1ea00e..e1856f1a 100644 --- a/.github/workflows/ci-python.yaml +++ b/.github/workflows/ci-python.yaml @@ -26,12 +26,12 @@ on: env: CLIENT_ID: ${{ secrets.CLIENT_ID }} - CLIENT_SECRET: ${{ (inputs.environment == 'production' || startsWith(github.ref, 'refs/tags/py')) && secrets.CLIENT_SECRET || secrets.STAGING_CLIENT_SECRET }} - VAAS_URL: ${{ (inputs.environment == 'production' || startsWith(github.ref, 'refs/tags/py')) && 'wss://gateway.production.vaas.gdatasecurity.de' || 'wss://gateway.staging.vaas.gdatasecurity.de' }} - TOKEN_URL: ${{ (inputs.environment == 'production' || startsWith(github.ref, 'refs/tags/py')) && 'https://account.gdata.de/realms/vaas-production/protocol/openid-connect/token' || 'https://account-staging.gdata.de/realms/vaas-staging/protocol/openid-connect/token' }} + CLIENT_SECRET: ${{ (inputs.environment == 'production' || inputs.environment == null || startsWith(github.ref, 'refs/tags/py')) && secrets.CLIENT_SECRET || secrets.STAGING_CLIENT_SECRET }} + VAAS_URL: ${{ (inputs.environment == 'production' || inputs.environment == null || startsWith(github.ref, 'refs/tags/py')) && 'wss://gateway.production.vaas.gdatasecurity.de' || 'wss://gateway.staging.vaas.gdatasecurity.de' }} + TOKEN_URL: ${{ (inputs.environment == 'production' || inputs.environment == null || startsWith(github.ref, 'refs/tags/py')) && 'https://account.gdata.de/realms/vaas-production/protocol/openid-connect/token' || 'https://account-staging.gdata.de/realms/vaas-staging/protocol/openid-connect/token' }} VAAS_CLIENT_ID: ${{ secrets.VAAS_CLIENT_ID }} VAAS_USER_NAME: ${{ secrets.VAAS_USER_NAME }} - VAAS_PASSWORD: ${{ (inputs.environment == 'production' || startsWith(github.ref, 'refs/tags/py')) && secrets.VAAS_PASSWORD || secrets.STAGING_VAAS_PASSWORD }} + VAAS_PASSWORD: ${{ (inputs.environment == 'production' || inputs.environment == null || startsWith(github.ref, 'refs/tags/py')) && secrets.VAAS_PASSWORD || secrets.STAGING_VAAS_PASSWORD }} jobs: build-python: diff --git a/.github/workflows/ci-ruby.yaml b/.github/workflows/ci-ruby.yaml index 61d1e493..77b970cf 100644 --- a/.github/workflows/ci-ruby.yaml +++ b/.github/workflows/ci-ruby.yaml @@ -26,12 +26,12 @@ on: env: CLIENT_ID: ${{ secrets.CLIENT_ID }} - CLIENT_SECRET: ${{ (inputs.environment == 'production' || startsWith(github.ref, 'refs/tags/rb')) && secrets.CLIENT_SECRET || secrets.STAGING_CLIENT_SECRET }} - VAAS_URL: ${{ (inputs.environment == 'production' || startsWith(github.ref, 'refs/tags/rb')) && 'wss://gateway.production.vaas.gdatasecurity.de' || 'wss://gateway.staging.vaas.gdatasecurity.de' }} - TOKEN_URL: ${{ (inputs.environment == 'production' || startsWith(github.ref, 'refs/tags/rb')) && 'https://account.gdata.de/realms/vaas-production/protocol/openid-connect/token' || 'https://account-staging.gdata.de/realms/vaas-staging/protocol/openid-connect/token' }} + CLIENT_SECRET: ${{ (inputs.environment == 'production' || inputs.environment == null || startsWith(github.ref, 'refs/tags/rb')) && secrets.CLIENT_SECRET || secrets.STAGING_CLIENT_SECRET }} + VAAS_URL: ${{ (inputs.environment == 'production' || inputs.environment == null || startsWith(github.ref, 'refs/tags/rb')) && 'wss://gateway.production.vaas.gdatasecurity.de' || 'wss://gateway.staging.vaas.gdatasecurity.de' }} + TOKEN_URL: ${{ (inputs.environment == 'production' || inputs.environment == null || startsWith(github.ref, 'refs/tags/rb')) && 'https://account.gdata.de/realms/vaas-production/protocol/openid-connect/token' || 'https://account-staging.gdata.de/realms/vaas-staging/protocol/openid-connect/token' }} VAAS_CLIENT_ID: ${{ secrets.VAAS_CLIENT_ID }} VAAS_USER_NAME: ${{ secrets.VAAS_USER_NAME }} - VAAS_PASSWORD: ${{ (inputs.environment == 'production' || startsWith(github.ref, 'refs/tags/rb')) && secrets.VAAS_PASSWORD || secrets.STAGING_VAAS_PASSWORD }} + VAAS_PASSWORD: ${{ (inputs.environment == 'production' || inputs.environment == null || startsWith(github.ref, 'refs/tags/rb')) && secrets.VAAS_PASSWORD || secrets.STAGING_VAAS_PASSWORD }} jobs: build-ruby: diff --git a/.github/workflows/ci-rust.yaml b/.github/workflows/ci-rust.yaml index d94e5204..c19b4749 100644 --- a/.github/workflows/ci-rust.yaml +++ b/.github/workflows/ci-rust.yaml @@ -26,12 +26,12 @@ on: env: CLIENT_ID: ${{ secrets.CLIENT_ID }} - CLIENT_SECRET: ${{ (inputs.environment == 'production' || startsWith(github.ref, 'refs/tags/rs')) && secrets.CLIENT_SECRET || secrets.STAGING_CLIENT_SECRET }} - VAAS_URL: ${{ (inputs.environment == 'production' || startsWith(github.ref, 'refs/tags/rs')) && 'wss://gateway.production.vaas.gdatasecurity.de' || 'wss://gateway.staging.vaas.gdatasecurity.de' }} - TOKEN_URL: ${{ (inputs.environment == 'production' || startsWith(github.ref, 'refs/tags/rs')) && 'https://account.gdata.de/realms/vaas-production/protocol/openid-connect/token' || 'https://account-staging.gdata.de/realms/vaas-staging/protocol/openid-connect/token' }} + CLIENT_SECRET: ${{ (inputs.environment == 'production' || inputs.environment == null || startsWith(github.ref, 'refs/tags/rs')) && secrets.CLIENT_SECRET || secrets.STAGING_CLIENT_SECRET }} + VAAS_URL: ${{ (inputs.environment == 'production' || inputs.environment == null || startsWith(github.ref, 'refs/tags/rs')) && 'wss://gateway.production.vaas.gdatasecurity.de' || 'wss://gateway.staging.vaas.gdatasecurity.de' }} + TOKEN_URL: ${{ (inputs.environment == 'production' || inputs.environment == null || startsWith(github.ref, 'refs/tags/rs')) && 'https://account.gdata.de/realms/vaas-production/protocol/openid-connect/token' || 'https://account-staging.gdata.de/realms/vaas-staging/protocol/openid-connect/token' }} VAAS_CLIENT_ID: ${{ secrets.VAAS_CLIENT_ID }} VAAS_USER_NAME: ${{ secrets.VAAS_USER_NAME }} - VAAS_PASSWORD: ${{ (inputs.environment == 'production' || startsWith(github.ref, 'refs/tags/rs')) && secrets.VAAS_PASSWORD || secrets.STAGING_VAAS_PASSWORD }} + VAAS_PASSWORD: ${{ (inputs.environment == 'production' || inputs.environment == null || startsWith(github.ref, 'refs/tags/rs')) && secrets.VAAS_PASSWORD || secrets.STAGING_VAAS_PASSWORD }} jobs: build-rust: diff --git a/.github/workflows/ci-typescript.yaml b/.github/workflows/ci-typescript.yaml index 3e063f22..cd10f3c3 100644 --- a/.github/workflows/ci-typescript.yaml +++ b/.github/workflows/ci-typescript.yaml @@ -26,12 +26,12 @@ on: env: CLIENT_ID: ${{ secrets.CLIENT_ID }} - CLIENT_SECRET: ${{ (inputs.environment == 'production' || startsWith(github.ref, 'refs/tags/ts')) && secrets.CLIENT_SECRET || secrets.STAGING_CLIENT_SECRET }} - VAAS_URL: ${{ (inputs.environment == 'production' || startsWith(github.ref, 'refs/tags/ts')) && 'wss://gateway.production.vaas.gdatasecurity.de' || 'wss://gateway.staging.vaas.gdatasecurity.de' }} - TOKEN_URL: ${{ (inputs.environment == 'production' || startsWith(github.ref, 'refs/tags/ts')) && 'https://account.gdata.de/realms/vaas-production/protocol/openid-connect/token' || 'https://account-staging.gdata.de/realms/vaas-staging/protocol/openid-connect/token' }} + CLIENT_SECRET: ${{ (inputs.environment == 'production' || inputs.environment == null || startsWith(github.ref, 'refs/tags/ts')) && secrets.CLIENT_SECRET || secrets.STAGING_CLIENT_SECRET }} + VAAS_URL: ${{ (inputs.environment == 'production' || inputs.environment == null || startsWith(github.ref, 'refs/tags/ts')) && 'wss://gateway.production.vaas.gdatasecurity.de' || 'wss://gateway.staging.vaas.gdatasecurity.de' }} + TOKEN_URL: ${{ (inputs.environment == 'production' || inputs.environment == null || startsWith(github.ref, 'refs/tags/ts')) && 'https://account.gdata.de/realms/vaas-production/protocol/openid-connect/token' || 'https://account-staging.gdata.de/realms/vaas-staging/protocol/openid-connect/token' }} VAAS_CLIENT_ID: ${{ secrets.VAAS_CLIENT_ID }} VAAS_USER_NAME: ${{ secrets.VAAS_USER_NAME }} - VAAS_PASSWORD: ${{ (inputs.environment == 'production' || startsWith(github.ref, 'refs/tags/ts')) && secrets.VAAS_PASSWORD || secrets.STAGING_VAAS_PASSWORD }} + VAAS_PASSWORD: ${{ (inputs.environment == 'production' || inputs.environment == null || startsWith(github.ref, 'refs/tags/ts')) && secrets.VAAS_PASSWORD || secrets.STAGING_VAAS_PASSWORD }} jobs: build-typescript: