From 0c33ccb23519b8f34641bc02aecefc7884c64577 Mon Sep 17 00:00:00 2001 From: Calle Veale Date: Sun, 30 May 2021 06:36:59 +0200 Subject: [PATCH] Updated to push to GitHub container registry --- .github/workflows/basket-api-deploy.yml | 50 ------- .github/workflows/basket-api.yml | 126 ------------------ .github/workflows/catalog-api-deploy.yml | 50 ------- .github/workflows/catalog-api.yml | 126 ------------------ .github/workflows/identity-api-deploy.yml | 50 ------- .github/workflows/identity-api.yml | 92 ------------- .../workflows/mobileshoppingagg-deploy.yml | 50 ------- .github/workflows/mobileshoppingagg.yml | 90 ------------- .github/workflows/ordering-api.yml | 6 +- .../workflows/ordering-backgroundtasks.yml | 6 +- .github/workflows/ordering-signalrhub.yml | 6 +- .github/workflows/payment-api-deploy.yml | 50 ------- .github/workflows/payment-api.yml | 92 ------------- .github/workflows/webhooks-api-deploy.yml | 50 ------- .github/workflows/webhooks-api.yml | 92 ------------- .github/workflows/webhooks-client.yml | 92 ------------- .github/workflows/webmvc-deploy.yml | 50 ------- .github/workflows/webmvc.yml | 93 ------------- .github/workflows/webshoppingagg-deploy.yml | 50 ------- .github/workflows/webshoppingagg.yml | 90 ------------- .github/workflows/webspa-deploy.yml | 50 ------- .github/workflows/webspa.yml | 92 ------------- .github/workflows/webstatus-deploy.yml | 50 ------- .github/workflows/webstatus.yml | 93 ------------- 24 files changed, 9 insertions(+), 1587 deletions(-) delete mode 100644 .github/workflows/basket-api-deploy.yml delete mode 100644 .github/workflows/basket-api.yml delete mode 100644 .github/workflows/catalog-api-deploy.yml delete mode 100644 .github/workflows/catalog-api.yml delete mode 100644 .github/workflows/identity-api-deploy.yml delete mode 100644 .github/workflows/identity-api.yml delete mode 100644 .github/workflows/mobileshoppingagg-deploy.yml delete mode 100644 .github/workflows/mobileshoppingagg.yml delete mode 100644 .github/workflows/payment-api-deploy.yml delete mode 100644 .github/workflows/payment-api.yml delete mode 100644 .github/workflows/webhooks-api-deploy.yml delete mode 100644 .github/workflows/webhooks-api.yml delete mode 100644 .github/workflows/webhooks-client.yml delete mode 100644 .github/workflows/webmvc-deploy.yml delete mode 100644 .github/workflows/webmvc.yml delete mode 100644 .github/workflows/webshoppingagg-deploy.yml delete mode 100644 .github/workflows/webshoppingagg.yml delete mode 100644 .github/workflows/webspa-deploy.yml delete mode 100644 .github/workflows/webspa.yml delete mode 100644 .github/workflows/webstatus-deploy.yml delete mode 100644 .github/workflows/webstatus.yml diff --git a/.github/workflows/basket-api-deploy.yml b/.github/workflows/basket-api-deploy.yml deleted file mode 100644 index 3d51c6d24..000000000 --- a/.github/workflows/basket-api-deploy.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: Deploy basket-api - -on: - workflow_dispatch: - repository_dispatch: - types: - - deploy - workflow_run: - workflows: ["basket-api"] - branches: [dev] - types: [completed] - -env: - CHART: basket-api - NAMESPACE: eshop - CHART_ROOT: deploy/k8s/helm - -jobs: - deploy-to-k8s: - #if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'repository_dispatch' || github.event.workflow_run.conclusion == 'success' }} - if: false - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - - uses: azure/login@v1 - with: - creds: ${{ secrets.AZURE_CREDENTIALS }} - - - uses: azure/aks-set-context@v1 - name: Set AKS context - with: - creds: '${{ secrets.AZURE_CREDENTIALS }}' - cluster-name: ${{ secrets.CLUSTER_NAME }} - resource-group: ${{ secrets.RESOURCE_GROUP }} - - - name: Set branch name as env variable - run: | - currentbranch=$(echo ${GITHUB_REF##*/}) - echo "running on $currentbranch" - echo "BRANCH=$currentbranch" >> $GITHUB_ENV - shell: bash - - - name: Deploy Chart - run: | - ./deploy-chart.sh -c ${{ env.CHART }} --dns aks --aks-name ${{ secrets.CLUSTER_NAME }} --aks-rg ${{ secrets.RESOURCE_GROUP }} -r ${{ secrets.REGISTRY_HOST }} -t $TAG --namespace ${{ env.NAMESPACE }} --acr-connected - env: - TAG: ${{ env.BRANCH }} - working-directory: ${{ env.CHART_ROOT }} \ No newline at end of file diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml deleted file mode 100644 index b886d30b9..000000000 --- a/.github/workflows/basket-api.yml +++ /dev/null @@ -1,126 +0,0 @@ -name: basket-api - -on: - workflow_dispatch: - push: - branches: - - dev - - paths: - - src/BuildingBlocks/** - - src/Services/Basket/** - - .github/workflows/basket-api.yml - - pull_request: - branches: - - dev - - paths: - - src/BuildingBlocks/** - - src/Services/Basket/** - - .github/workflows/basket-api.yml -env: - SERVICE: basket-api - IMAGE: basket.api - DOTNET_VERSION: 5.0.x - -jobs: - - BuildContainersForPR_Linux: - runs-on: ubuntu-latest - if: ${{ github.event_name == 'pull_request' }} - steps: - - name: 'Checkout Github Action' - uses: actions/checkout@master - - - name: Setup dotnet - uses: actions/setup-dotnet@v1 - with: - dotnet-version: ${{ env.DOTNET_VERSION }} - - - name: Build and run unit tests - run: | - cd src - dotnet restore "eShopOnContainers-ServicesAndWebApps.sln" - cd Services/Basket/Basket.API - dotnet build --no-restore - cd - - cd Services/Basket/Basket.UnitTests - dotnet build --no-restore - dotnet test --no-build -v=normal - - - name: Compose build ${{ env.SERVICE }} - run: sudo -E docker-compose build ${{ env.SERVICE }} - working-directory: ./src - shell: bash - env: - TAG: ${{ env.BRANCH }} - REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} - - BuildLinux: - runs-on: ubuntu-latest - if: ${{ github.event_name != 'pull_request' }} - steps: - - name: 'Checkout Github Action' - uses: actions/checkout@master - - - name: Setup dotnet - uses: actions/setup-dotnet@v1 - with: - dotnet-version: ${{ env.DOTNET_VERSION }} - - - name: Build and run unit tests - run: | - cd src - dotnet restore "eShopOnContainers-ServicesAndWebApps.sln" - cd Services/Basket/Basket.API - dotnet build --no-restore - cd - - cd Services/Basket/Basket.UnitTests - dotnet build --no-restore - dotnet test --no-build -v=normal - - - name: Enable experimental features for the Docker daemon and CLI - run: | - echo $'{\n "experimental": true\n}' | sudo tee /etc/docker/daemon.json - mkdir -p ~/.docker - echo $'{\n "experimental": "enabled"\n}' | sudo tee ~/.docker/config.json - sudo service docker restart - docker version -f '{{.Client.Experimental}}' - docker version -f '{{.Server.Experimental}}' - - - name: Login to Container Registry - uses: docker/login-action@v1 - with: - registry: ${{ secrets.REGISTRY_HOST }} - username: ${{ secrets.USERNAME }} - password: ${{ secrets.PASSWORD }} - - - name: Set branch name as env variable - run: | - currentbranch=$(echo ${GITHUB_REF##*/}) - echo "running on $currentbranch" - echo "BRANCH=$currentbranch" >> $GITHUB_ENV - shell: bash - - - name: Compose build ${{ env.SERVICE }} - run: sudo -E docker-compose build ${{ env.SERVICE }} - working-directory: ./src - shell: bash - env: - TAG: ${{ env.BRANCH }} - REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} - - - name: Compose push ${{ env.SERVICE }} - run: sudo -E docker-compose push ${{ env.SERVICE }} - working-directory: ./src - shell: bash - env: - TAG: ${{ env.BRANCH }} - REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} - - - name: Create multiarch manifest - run: | - docker --config ~/.docker manifest create ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-${{ env.BRANCH }} - docker --config ~/.docker manifest push ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} - shell: bash \ No newline at end of file diff --git a/.github/workflows/catalog-api-deploy.yml b/.github/workflows/catalog-api-deploy.yml deleted file mode 100644 index 7a5827b66..000000000 --- a/.github/workflows/catalog-api-deploy.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: Deploy catalog-api - -on: - workflow_dispatch: - repository_dispatch: - types: - - deploy - workflow_run: - workflows: ["catalog-api"] - branches: [dev] - types: [completed] - -env: - CHART: catalog-api - NAMESPACE: eshop - CHART_ROOT: deploy/k8s/helm - -jobs: - deploy-to-k8s: - #if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'repository_dispatch' || github.event.workflow_run.conclusion == 'success' }} - if: false - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - - uses: azure/login@v1 - with: - creds: ${{ secrets.AZURE_CREDENTIALS }} - - - uses: azure/aks-set-context@v1 - name: Set AKS context - with: - creds: '${{ secrets.AZURE_CREDENTIALS }}' - cluster-name: ${{ secrets.CLUSTER_NAME }} - resource-group: ${{ secrets.RESOURCE_GROUP }} - - - name: Set branch name as env variable - run: | - currentbranch=$(echo ${GITHUB_REF##*/}) - echo "running on $currentbranch" - echo "BRANCH=$currentbranch" >> $GITHUB_ENV - shell: bash - - - name: Deploy chart - run: | - ./deploy-chart.sh -c ${{ env.CHART }} --dns aks --aks-name ${{ secrets.CLUSTER_NAME }} --aks-rg ${{ secrets.RESOURCE_GROUP }} -r ${{ secrets.REGISTRY_HOST }} -t $TAG --namespace ${{ env.NAMESPACE }} --acr-connected - env: - TAG: ${{ env.BRANCH }} - working-directory: ${{ env.CHART_ROOT }} \ No newline at end of file diff --git a/.github/workflows/catalog-api.yml b/.github/workflows/catalog-api.yml deleted file mode 100644 index 9170e7cc8..000000000 --- a/.github/workflows/catalog-api.yml +++ /dev/null @@ -1,126 +0,0 @@ -name: catalog-api - -on: - workflow_dispatch: - push: - branches: - - dev - - paths: - - src/BuildingBlocks/** - - src/Services/Catalog/** - - .github/workflows/catalog-api.yml - - pull_request: - branches: - - dev - - paths: - - src/BuildingBlocks/** - - src/Services/Catalog/** - - .github/workflows/catalog-api.yml -env: - SERVICE: catalog-api - IMAGE: catalog.api - DOTNET_VERSION: 5.0.x - -jobs: - - BuildContainersForPR_Linux: - runs-on: ubuntu-latest - if: ${{ github.event_name == 'pull_request' }} - steps: - - name: 'Checkout Github Action' - uses: actions/checkout@master - - - name: Setup dotnet - uses: actions/setup-dotnet@v1 - with: - dotnet-version: ${{ env.DOTNET_VERSION }} - - - name: Build and run unit tests - run: | - cd src - dotnet restore "eShopOnContainers-ServicesAndWebApps.sln" - cd Services/Catalog/Catalog.API - dotnet build --no-restore - cd - - cd Services/Catalog/Catalog.UnitTests - dotnet build --no-restore - dotnet test --no-build -v=normal - - - name: Compose build ${{ env.SERVICE }} - run: sudo -E docker-compose build ${{ env.SERVICE }} - working-directory: ./src - shell: bash - env: - TAG: ${{ env.BRANCH }} - REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} - - BuildLinux: - runs-on: ubuntu-latest - if: ${{ github.event_name != 'pull_request' }} - steps: - - name: 'Checkout Github Action' - uses: actions/checkout@master - - - name: Setup dotnet - uses: actions/setup-dotnet@v1 - with: - dotnet-version: ${{ env.DOTNET_VERSION }} - - - name: Build and run unit tests - run: | - cd src - dotnet restore "eShopOnContainers-ServicesAndWebApps.sln" - cd Services/Catalog/Catalog.API - dotnet build --no-restore - cd - - cd Services/Catalog/Catalog.UnitTests - dotnet build --no-restore - dotnet test --no-build -v=normal - - - name: Enable experimental features for the Docker daemon and CLI - run: | - echo $'{\n "experimental": true\n}' | sudo tee /etc/docker/daemon.json - mkdir -p ~/.docker - echo $'{\n "experimental": "enabled"\n}' | sudo tee ~/.docker/config.json - sudo service docker restart - docker version -f '{{.Client.Experimental}}' - docker version -f '{{.Server.Experimental}}' - - - name: Login to Container Registry - uses: docker/login-action@v1 - with: - registry: ${{ secrets.REGISTRY_HOST }} - username: ${{ secrets.USERNAME }} - password: ${{ secrets.PASSWORD }} - - - name: Set branch name as env variable - run: | - currentbranch=$(echo ${GITHUB_REF##*/}) - echo "running on $currentbranch" - echo "BRANCH=$currentbranch" >> $GITHUB_ENV - shell: bash - - - name: Compose build ${{ env.SERVICE }} - run: sudo -E docker-compose build ${{ env.SERVICE }} - working-directory: ./src - shell: bash - env: - TAG: ${{ env.BRANCH }} - REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} - - - name: Compose push ${{ env.SERVICE }} - run: sudo -E docker-compose push ${{ env.SERVICE }} - working-directory: ./src - shell: bash - env: - TAG: ${{ env.BRANCH }} - REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} - - - name: Create multiarch manifest - run: | - docker --config ~/.docker manifest create ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-${{ env.BRANCH }} - docker --config ~/.docker manifest push ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} - shell: bash \ No newline at end of file diff --git a/.github/workflows/identity-api-deploy.yml b/.github/workflows/identity-api-deploy.yml deleted file mode 100644 index 5b2626a3e..000000000 --- a/.github/workflows/identity-api-deploy.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: Deploy identity-api - -on: - workflow_dispatch: - repository_dispatch: - types: - - deploy - workflow_run: - workflows: ["identity-api"] - branches: [dev] - types: [completed] - -env: - CHART: identity-api - NAMESPACE: eshop - CHART_ROOT: deploy/k8s/helm - -jobs: - deploy-to-k8s: - #if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'repository_dispatch' || github.event.workflow_run.conclusion == 'success' }} - if: false - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - - uses: azure/login@v1 - with: - creds: ${{ secrets.AZURE_CREDENTIALS }} - - - uses: azure/aks-set-context@v1 - name: Set AKS context - with: - creds: '${{ secrets.AZURE_CREDENTIALS }}' - cluster-name: ${{ secrets.CLUSTER_NAME }} - resource-group: ${{ secrets.RESOURCE_GROUP }} - - - name: Set branch name as env variable - run: | - currentbranch=$(echo ${GITHUB_REF##*/}) - echo "running on $currentbranch" - echo "BRANCH=$currentbranch" >> $GITHUB_ENV - shell: bash - - - name: Deploy Chart - run: | - ./deploy-chart.sh -c ${{ env.CHART }} --dns aks --aks-name ${{ secrets.CLUSTER_NAME }} --aks-rg ${{ secrets.RESOURCE_GROUP }} -r ${{ secrets.REGISTRY_HOST }} -t $TAG --namespace ${{ env.NAMESPACE }} --acr-connected - env: - TAG: ${{ env.BRANCH }} - working-directory: ${{ env.CHART_ROOT }} \ No newline at end of file diff --git a/.github/workflows/identity-api.yml b/.github/workflows/identity-api.yml deleted file mode 100644 index b57c8151b..000000000 --- a/.github/workflows/identity-api.yml +++ /dev/null @@ -1,92 +0,0 @@ -name: identity-api - -on: - push: - branches: - - dev - - paths: - - src/BuildingBlocks/** - - src/Services/Identity/** - - .github/workflows/identity-api.yml - - pull_request: - branches: - - dev - - paths: - - src/BuildingBlocks/** - - src/Services/Identity/** - - .github/workflows/identity-api.yml -env: - SERVICE: identity-api - IMAGE: identity.api - -jobs: - - BuildContainersForPR_Linux: - runs-on: ubuntu-latest - if: ${{ github.event_name == 'pull_request' }} - steps: - - name: 'Checkout Github Action' - uses: actions/checkout@master - - - name: Compose build ${{ env.SERVICE }} - run: sudo -E docker-compose build ${{ env.SERVICE }} - working-directory: ./src - shell: bash - env: - TAG: ${{ env.BRANCH }} - REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} - - BuildLinux: - runs-on: ubuntu-latest - if: ${{ github.event_name != 'pull_request' }} - steps: - - name: 'Checkout Github Action' - uses: actions/checkout@master - - - name: Enable experimental features for the Docker daemon and CLI - run: | - echo $'{\n "experimental": true\n}' | sudo tee /etc/docker/daemon.json - mkdir -p ~/.docker - echo $'{\n "experimental": "enabled"\n}' | sudo tee ~/.docker/config.json - sudo service docker restart - docker version -f '{{.Client.Experimental}}' - docker version -f '{{.Server.Experimental}}' - - - name: Login to Container Registry - uses: docker/login-action@v1 - with: - registry: ${{ secrets.REGISTRY_HOST }} - username: ${{ secrets.USERNAME }} - password: ${{ secrets.PASSWORD }} - - - name: Set branch name as env variable - run: | - currentbranch=$(echo ${GITHUB_REF##*/}) - echo "running on $currentbranch" - echo "BRANCH=$currentbranch" >> $GITHUB_ENV - shell: bash - - - name: Compose build ${{ env.SERVICE }} - run: sudo -E docker-compose build ${{ env.SERVICE }} - working-directory: ./src - shell: bash - env: - TAG: ${{ env.BRANCH }} - REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} - - - name: Compose push ${{ env.SERVICE }} - run: sudo -E docker-compose push ${{ env.SERVICE }} - working-directory: ./src - shell: bash - env: - TAG: ${{ env.BRANCH }} - REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} - - - name: Create multiarch manifest - run: | - docker --config ~/.docker manifest create ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-${{ env.BRANCH }} - docker --config ~/.docker manifest push ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} - shell: bash \ No newline at end of file diff --git a/.github/workflows/mobileshoppingagg-deploy.yml b/.github/workflows/mobileshoppingagg-deploy.yml deleted file mode 100644 index 012d4957a..000000000 --- a/.github/workflows/mobileshoppingagg-deploy.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: Deploy mobileshoppingagg - -on: - workflow_dispatch: - repository_dispatch: - types: - - deploy - workflow_run: - workflows: ["mobileshoppingagg"] - branches: [dev] - types: [completed] - -env: - CHART: mobileshoppingagg - NAMESPACE: eshop - CHART_ROOT: deploy/k8s/helm - -jobs: - deploy-to-k8s: - #if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'repository_dispatch' || github.event.workflow_run.conclusion == 'success' }} - if: false - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - - uses: azure/login@v1 - with: - creds: ${{ secrets.AZURE_CREDENTIALS }} - - - uses: azure/aks-set-context@v1 - name: Set AKS context - with: - creds: '${{ secrets.AZURE_CREDENTIALS }}' - cluster-name: ${{ secrets.CLUSTER_NAME }} - resource-group: ${{ secrets.RESOURCE_GROUP }} - - - name: Set branch name as env variable - run: | - currentbranch=$(echo ${GITHUB_REF##*/}) - echo "running on $currentbranch" - echo "BRANCH=$currentbranch" >> $GITHUB_ENV - shell: bash - - - name: Deploy Chart - run: | - ./deploy-chart.sh -c ${{ env.CHART }} --dns aks --aks-name ${{ secrets.CLUSTER_NAME }} --aks-rg ${{ secrets.RESOURCE_GROUP }} -r ${{ secrets.REGISTRY_HOST }} -t $TAG --namespace ${{ env.NAMESPACE }} --acr-connected - env: - TAG: ${{ env.BRANCH }} - working-directory: ${{ env.CHART_ROOT }} \ No newline at end of file diff --git a/.github/workflows/mobileshoppingagg.yml b/.github/workflows/mobileshoppingagg.yml deleted file mode 100644 index 2de0c0370..000000000 --- a/.github/workflows/mobileshoppingagg.yml +++ /dev/null @@ -1,90 +0,0 @@ -name: mobileshoppingagg - -on: - push: - branches: - - dev - - paths: - - src/ApiGateways/Mobile.Bff.Shopping/aggregator/** - - .github/workflows/mobileshoppingagg.yml - - pull_request: - branches: - - dev - - paths: - - src/ApiGateways/Mobile.Bff.Shopping/aggregator/** - - .github/workflows/mobileshoppingagg.yml -env: - SERVICE: mobileshoppingagg - IMAGE: mobileshoppingagg - -jobs: - - BuildContainersForPR_Linux: - runs-on: ubuntu-latest - if: ${{ github.event_name == 'pull_request' }} - steps: - - name: 'Checkout Github Action' - uses: actions/checkout@master - - - name: Compose build ${{ env.SERVICE }} - run: sudo -E docker-compose build ${{ env.SERVICE }} - working-directory: ./src - shell: bash - env: - TAG: ${{ env.BRANCH }} - REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} - - BuildLinux: - runs-on: ubuntu-latest - if: ${{ github.event_name != 'pull_request' }} - steps: - - name: 'Checkout Github Action' - uses: actions/checkout@master - - - name: Enable experimental features for the Docker daemon and CLI - run: | - echo $'{\n "experimental": true\n}' | sudo tee /etc/docker/daemon.json - mkdir -p ~/.docker - echo $'{\n "experimental": "enabled"\n}' | sudo tee ~/.docker/config.json - sudo service docker restart - docker version -f '{{.Client.Experimental}}' - docker version -f '{{.Server.Experimental}}' - - - name: Login to Container Registry - uses: docker/login-action@v1 - with: - registry: ${{ secrets.REGISTRY_HOST }} - username: ${{ secrets.USERNAME }} - password: ${{ secrets.PASSWORD }} - - - name: Set branch name as env variable - run: | - currentbranch=$(echo ${GITHUB_REF##*/}) - echo "running on $currentbranch" - echo "BRANCH=$currentbranch" >> $GITHUB_ENV - shell: bash - - - name: Compose build ${{ env.SERVICE }} - run: sudo -E docker-compose build ${{ env.SERVICE }} - working-directory: ./src - shell: bash - env: - TAG: ${{ env.BRANCH }} - REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} - - - name: Compose push ${{ env.SERVICE }} - run: sudo -E docker-compose push ${{ env.SERVICE }} - working-directory: ./src - shell: bash - env: - TAG: ${{ env.BRANCH }} - REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} - - - name: Create multiarch manifest - run: | - docker --config ~/.docker manifest create ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-${{ env.BRANCH }} - docker --config ~/.docker manifest push ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} - shell: bash \ No newline at end of file diff --git a/.github/workflows/ordering-api.yml b/.github/workflows/ordering-api.yml index 10be98451..743a0cd31 100644 --- a/.github/workflows/ordering-api.yml +++ b/.github/workflows/ordering-api.yml @@ -92,9 +92,9 @@ jobs: - name: Login to Container Registry uses: docker/login-action@v1 with: - registry: ${{ secrets.REGISTRY_HOST }} - username: ${{ secrets.USERNAME }} - password: ${{ secrets.PASSWORD }} + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_REGISTRY_TOKEN }} - name: Set branch name as env variable run: | diff --git a/.github/workflows/ordering-backgroundtasks.yml b/.github/workflows/ordering-backgroundtasks.yml index f8f7badfa..524cf46c5 100644 --- a/.github/workflows/ordering-backgroundtasks.yml +++ b/.github/workflows/ordering-backgroundtasks.yml @@ -58,9 +58,9 @@ jobs: - name: Login to Container Registry uses: docker/login-action@v1 with: - registry: ${{ secrets.REGISTRY_HOST }} - username: ${{ secrets.USERNAME }} - password: ${{ secrets.PASSWORD }} + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_REGISTRY_TOKEN }} - name: Set branch name as env variable run: | diff --git a/.github/workflows/ordering-signalrhub.yml b/.github/workflows/ordering-signalrhub.yml index 564a81458..52807b259 100644 --- a/.github/workflows/ordering-signalrhub.yml +++ b/.github/workflows/ordering-signalrhub.yml @@ -58,9 +58,9 @@ jobs: - name: Login to Container Registry uses: docker/login-action@v1 with: - registry: ${{ secrets.REGISTRY_HOST }} - username: ${{ secrets.USERNAME }} - password: ${{ secrets.PASSWORD }} + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_REGISTRY_TOKEN }} - name: Set branch name as env variable run: | diff --git a/.github/workflows/payment-api-deploy.yml b/.github/workflows/payment-api-deploy.yml deleted file mode 100644 index 9592259b1..000000000 --- a/.github/workflows/payment-api-deploy.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: Deploy payment-api - -on: - workflow_dispatch: - repository_dispatch: - types: - - deploy - workflow_run: - workflows: ["payment-api"] - branches: [dev] - types: [completed] - -env: - CHART: payment-api - NAMESPACE: eshop - CHART_ROOT: deploy/k8s/helm - -jobs: - deploy-to-k8s: - #if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'repository_dispatch' || github.event.workflow_run.conclusion == 'success' }} - if: false - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - - uses: azure/login@v1 - with: - creds: ${{ secrets.AZURE_CREDENTIALS }} - - - uses: azure/aks-set-context@v1 - name: Set AKS context - with: - creds: '${{ secrets.AZURE_CREDENTIALS }}' - cluster-name: ${{ secrets.CLUSTER_NAME }} - resource-group: ${{ secrets.RESOURCE_GROUP }} - - - name: Set branch name as env variable - run: | - currentbranch=$(echo ${GITHUB_REF##*/}) - echo "running on $currentbranch" - echo "BRANCH=$currentbranch" >> $GITHUB_ENV - shell: bash - - - name: Deploy Chart - run: | - ./deploy-chart.sh -c ${{ env.CHART }} --dns aks --aks-name ${{ secrets.CLUSTER_NAME }} --aks-rg ${{ secrets.RESOURCE_GROUP }} -r ${{ secrets.REGISTRY_HOST }} -t $TAG --namespace ${{ env.NAMESPACE }} --acr-connected - env: - TAG: ${{ env.BRANCH }} - working-directory: ${{ env.CHART_ROOT }} \ No newline at end of file diff --git a/.github/workflows/payment-api.yml b/.github/workflows/payment-api.yml deleted file mode 100644 index 3cd18756f..000000000 --- a/.github/workflows/payment-api.yml +++ /dev/null @@ -1,92 +0,0 @@ -name: payment-api - -on: - push: - branches: - - dev - - paths: - - src/BuildingBlocks/** - - src/Services/Payment/** - - .github/workflows/payment-api.yml - - pull_request: - branches: - - dev - - paths: - - src/BuildingBlocks/** - - src/Services/Payment/** - - .github/workflows/payment-api.yml -env: - SERVICE: payment-api - IMAGE: payment.api - -jobs: - - BuildContainersForPR_Linux: - runs-on: ubuntu-latest - if: ${{ github.event_name == 'pull_request' }} - steps: - - name: 'Checkout Github Action' - uses: actions/checkout@master - - - name: Compose build ${{ env.SERVICE }} - run: sudo -E docker-compose build ${{ env.SERVICE }} - working-directory: ./src - shell: bash - env: - TAG: ${{ env.BRANCH }} - REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} - - BuildLinux: - runs-on: ubuntu-latest - if: ${{ github.event_name != 'pull_request' }} - steps: - - name: 'Checkout Github Action' - uses: actions/checkout@master - - - name: Enable experimental features for the Docker daemon and CLI - run: | - echo $'{\n "experimental": true\n}' | sudo tee /etc/docker/daemon.json - mkdir -p ~/.docker - echo $'{\n "experimental": "enabled"\n}' | sudo tee ~/.docker/config.json - sudo service docker restart - docker version -f '{{.Client.Experimental}}' - docker version -f '{{.Server.Experimental}}' - - - name: Login to Container Registry - uses: docker/login-action@v1 - with: - registry: ${{ secrets.REGISTRY_HOST }} - username: ${{ secrets.USERNAME }} - password: ${{ secrets.PASSWORD }} - - - name: Set branch name as env variable - run: | - currentbranch=$(echo ${GITHUB_REF##*/}) - echo "running on $currentbranch" - echo "BRANCH=$currentbranch" >> $GITHUB_ENV - shell: bash - - - name: Compose build ${{ env.SERVICE }} - run: sudo -E docker-compose build ${{ env.SERVICE }} - working-directory: ./src - shell: bash - env: - TAG: ${{ env.BRANCH }} - REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} - - - name: Compose push ${{ env.SERVICE }} - run: sudo -E docker-compose push ${{ env.SERVICE }} - working-directory: ./src - shell: bash - env: - TAG: ${{ env.BRANCH }} - REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} - - - name: Create multiarch manifest - run: | - docker --config ~/.docker manifest create ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-${{ env.BRANCH }} - docker --config ~/.docker manifest push ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} - shell: bash \ No newline at end of file diff --git a/.github/workflows/webhooks-api-deploy.yml b/.github/workflows/webhooks-api-deploy.yml deleted file mode 100644 index 08955a3d4..000000000 --- a/.github/workflows/webhooks-api-deploy.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: Deploy webhooks-api - -on: - workflow_dispatch: - repository_dispatch: - types: - - deploy - workflow_run: - workflows: ["webhooks-api"] - branches: [dev] - types: [completed] - -env: - CHART: webhooks-api - NAMESPACE: eshop - CHART_ROOT: deploy/k8s/helm - -jobs: - deploy-to-k8s: - #if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'repository_dispatch' || github.event.workflow_run.conclusion == 'success' }} - if: false - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - - uses: azure/login@v1 - with: - creds: ${{ secrets.AZURE_CREDENTIALS }} - - - uses: azure/aks-set-context@v1 - name: Set AKS context - with: - creds: '${{ secrets.AZURE_CREDENTIALS }}' - cluster-name: ${{ secrets.CLUSTER_NAME }} - resource-group: ${{ secrets.RESOURCE_GROUP }} - - - name: Set branch name as env variable - run: | - currentbranch=$(echo ${GITHUB_REF##*/}) - echo "running on $currentbranch" - echo "BRANCH=$currentbranch" >> $GITHUB_ENV - shell: bash - - - name: Deploy Chart - run: | - ./deploy-chart.sh -c ${{ env.CHART }} --dns aks --aks-name ${{ secrets.CLUSTER_NAME }} --aks-rg ${{ secrets.RESOURCE_GROUP }} -r ${{ secrets.REGISTRY_HOST }} -t $TAG --namespace ${{ env.NAMESPACE }} --acr-connected - env: - TAG: ${{ env.BRANCH }} - working-directory: ${{ env.CHART_ROOT }} \ No newline at end of file diff --git a/.github/workflows/webhooks-api.yml b/.github/workflows/webhooks-api.yml deleted file mode 100644 index f39599d40..000000000 --- a/.github/workflows/webhooks-api.yml +++ /dev/null @@ -1,92 +0,0 @@ -name: webhooks-api - -on: - push: - branches: - - dev - - paths: - - src/BuildingBlocks/** - - src/Services/Webhooks/** - - .github/workflows/webhooks-api.yml - - pull_request: - branches: - - dev - - paths: - - src/BuildingBlocks/** - - src/Services/Webhooks/** - - .github/workflows/webhooks-api.yml -env: - SERVICE: webhooks-api - IMAGE: webhooks.api - -jobs: - - BuildContainersForPR_Linux: - runs-on: ubuntu-latest - if: ${{ github.event_name == 'pull_request' }} - steps: - - name: 'Checkout Github Action' - uses: actions/checkout@master - - - name: Compose build ${{ env.SERVICE }} - run: sudo -E docker-compose build ${{ env.SERVICE }} - working-directory: ./src - shell: bash - env: - TAG: ${{ env.BRANCH }} - REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} - - BuildLinux: - runs-on: ubuntu-latest - if: ${{ github.event_name != 'pull_request' }} - steps: - - name: 'Checkout Github Action' - uses: actions/checkout@master - - - name: Enable experimental features for the Docker daemon and CLI - run: | - echo $'{\n "experimental": true\n}' | sudo tee /etc/docker/daemon.json - mkdir -p ~/.docker - echo $'{\n "experimental": "enabled"\n}' | sudo tee ~/.docker/config.json - sudo service docker restart - docker version -f '{{.Client.Experimental}}' - docker version -f '{{.Server.Experimental}}' - - - name: Login to Container Registry - uses: docker/login-action@v1 - with: - registry: ${{ secrets.REGISTRY_HOST }} - username: ${{ secrets.USERNAME }} - password: ${{ secrets.PASSWORD }} - - - name: Set branch name as env variable - run: | - currentbranch=$(echo ${GITHUB_REF##*/}) - echo "running on $currentbranch" - echo "BRANCH=$currentbranch" >> $GITHUB_ENV - shell: bash - - - name: Compose build ${{ env.SERVICE }} - run: sudo -E docker-compose build ${{ env.SERVICE }} - working-directory: ./src - shell: bash - env: - TAG: ${{ env.BRANCH }} - REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} - - - name: Compose push ${{ env.SERVICE }} - run: sudo -E docker-compose push ${{ env.SERVICE }} - working-directory: ./src - shell: bash - env: - TAG: ${{ env.BRANCH }} - REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} - - - name: Create multiarch manifest - run: | - docker --config ~/.docker manifest create ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-${{ env.BRANCH }} - docker --config ~/.docker manifest push ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} - shell: bash \ No newline at end of file diff --git a/.github/workflows/webhooks-client.yml b/.github/workflows/webhooks-client.yml deleted file mode 100644 index 6851921fe..000000000 --- a/.github/workflows/webhooks-client.yml +++ /dev/null @@ -1,92 +0,0 @@ -name: webhooks-client - -on: - push: - branches: - - dev - - paths: - - src/BuildingBlocks/** - - src/Web/WebhookClient/** - - .github/workflows/webhooks-client.yml - - pull_request: - branches: - - dev - - paths: - - src/BuildingBlocks/** - - src/Web/WebhookClient/** - - .github/workflows/webhooks-client.yml -env: - SERVICE: webhooks-client - IMAGE: webhooks.client - -jobs: - - BuildContainersForPR_Linux: - runs-on: ubuntu-latest - if: ${{ github.event_name == 'pull_request' }} - steps: - - name: 'Checkout Github Action' - uses: actions/checkout@master - - - name: Compose build ${{ env.SERVICE }} - run: sudo -E docker-compose build ${{ env.SERVICE }} - working-directory: ./src - shell: bash - env: - TAG: ${{ env.BRANCH }} - REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} - - BuildLinux: - runs-on: ubuntu-latest - if: ${{ github.event_name != 'pull_request' }} - steps: - - name: 'Checkout Github Action' - uses: actions/checkout@master - - - name: Enable experimental features for the Docker daemon and CLI - run: | - echo $'{\n "experimental": true\n}' | sudo tee /etc/docker/daemon.json - mkdir -p ~/.docker - echo $'{\n "experimental": "enabled"\n}' | sudo tee ~/.docker/config.json - sudo service docker restart - docker version -f '{{.Client.Experimental}}' - docker version -f '{{.Server.Experimental}}' - - - name: Login to Container Registry - uses: docker/login-action@v1 - with: - registry: ${{ secrets.REGISTRY_HOST }} - username: ${{ secrets.USERNAME }} - password: ${{ secrets.PASSWORD }} - - - name: Set branch name as env variable - run: | - currentbranch=$(echo ${GITHUB_REF##*/}) - echo "running on $currentbranch" - echo "BRANCH=$currentbranch" >> $GITHUB_ENV - shell: bash - - - name: Compose build ${{ env.SERVICE }} - run: sudo -E docker-compose build ${{ env.SERVICE }} - working-directory: ./src - shell: bash - env: - TAG: ${{ env.BRANCH }} - REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} - - - name: Compose push ${{ env.SERVICE }} - run: sudo -E docker-compose push ${{ env.SERVICE }} - working-directory: ./src - shell: bash - env: - TAG: ${{ env.BRANCH }} - REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} - - - name: Create multiarch manifest - run: | - docker --config ~/.docker manifest create ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-${{ env.BRANCH }} - docker --config ~/.docker manifest push ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} - shell: bash \ No newline at end of file diff --git a/.github/workflows/webmvc-deploy.yml b/.github/workflows/webmvc-deploy.yml deleted file mode 100644 index 3f1d9c4a1..000000000 --- a/.github/workflows/webmvc-deploy.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: Deploy webmvc - -on: - workflow_dispatch: - repository_dispatch: - types: - - deploy - workflow_run: - workflows: ["webmvc"] - branches: [dev] - types: [completed] - -env: - CHART: webmvc - NAMESPACE: eshop - CHART_ROOT: deploy/k8s/helm - -jobs: - deploy-to-k8s: - #if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'repository_dispatch' || github.event.workflow_run.conclusion == 'success' }} - if: false - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - - uses: azure/login@v1 - with: - creds: ${{ secrets.AZURE_CREDENTIALS }} - - - uses: azure/aks-set-context@v1 - name: Set AKS context - with: - creds: '${{ secrets.AZURE_CREDENTIALS }}' - cluster-name: ${{ secrets.CLUSTER_NAME }} - resource-group: ${{ secrets.RESOURCE_GROUP }} - - - name: Set branch name as env variable - run: | - currentbranch=$(echo ${GITHUB_REF##*/}) - echo "running on $currentbranch" - echo "BRANCH=$currentbranch" >> $GITHUB_ENV - shell: bash - - - name: Deploy Chart - run: | - ./deploy-chart.sh -c ${{ env.CHART }} --dns aks --aks-name ${{ secrets.CLUSTER_NAME }} --aks-rg ${{ secrets.RESOURCE_GROUP }} -r ${{ secrets.REGISTRY_HOST }} -t $TAG --namespace ${{ env.NAMESPACE }} --acr-connected - env: - TAG: ${{ env.BRANCH }} - working-directory: ${{ env.CHART_ROOT }} \ No newline at end of file diff --git a/.github/workflows/webmvc.yml b/.github/workflows/webmvc.yml deleted file mode 100644 index 9fc0cdf86..000000000 --- a/.github/workflows/webmvc.yml +++ /dev/null @@ -1,93 +0,0 @@ -name: webmvc - -on: - push: - branches: - - dev - - paths: - - src/BuildingBlocks/** - - src/Web/WebMVC/** - - .github/workflows/webmvc.yml - - pull_request: - branches: - - dev - paths: - - - src/BuildingBlocks/** - - src/Web/WebMVC/** - - .github/workflows/webmvc.yml - -env: - SERVICE: webmvc - IMAGE: webmvc - -jobs: - - BuildContainersForPR_Linux: - runs-on: ubuntu-latest - if: ${{ github.event_name == 'pull_request' }} - steps: - - name: 'Checkout Github Action' - uses: actions/checkout@master - - - name: Compose build ${{ env.SERVICE }} - run: sudo -E docker-compose build ${{ env.SERVICE }} - working-directory: ./src - shell: bash - env: - TAG: ${{ env.BRANCH }} - REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} - - BuildLinux: - runs-on: ubuntu-latest - if: ${{ github.event_name != 'pull_request' }} - steps: - - name: 'Checkout Github Action' - uses: actions/checkout@master - - - name: Enable experimental features for the Docker daemon and CLI - run: | - echo $'{\n "experimental": true\n}' | sudo tee /etc/docker/daemon.json - mkdir -p ~/.docker - echo $'{\n "experimental": "enabled"\n}' | sudo tee ~/.docker/config.json - sudo service docker restart - docker version -f '{{.Client.Experimental}}' - docker version -f '{{.Server.Experimental}}' - - - name: Login to Container Registry - uses: docker/login-action@v1 - with: - registry: ${{ secrets.REGISTRY_HOST }} - username: ${{ secrets.USERNAME }} - password: ${{ secrets.PASSWORD }} - - - name: Set branch name as env variable - run: | - currentbranch=$(echo ${GITHUB_REF##*/}) - echo "running on $currentbranch" - echo "BRANCH=$currentbranch" >> $GITHUB_ENV - shell: bash - - - name: Compose build ${{ env.SERVICE }} - run: sudo -E docker-compose build ${{ env.SERVICE }} - working-directory: ./src - shell: bash - env: - TAG: ${{ env.BRANCH }} - REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} - - - name: Compose push ${{ env.SERVICE }} - run: sudo -E docker-compose push ${{ env.SERVICE }} - working-directory: ./src - shell: bash - env: - TAG: ${{ env.BRANCH }} - REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} - - - name: Create multiarch manifest - run: | - docker --config ~/.docker manifest create ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-${{ env.BRANCH }} - docker --config ~/.docker manifest push ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} - shell: bash \ No newline at end of file diff --git a/.github/workflows/webshoppingagg-deploy.yml b/.github/workflows/webshoppingagg-deploy.yml deleted file mode 100644 index 7cff7ceac..000000000 --- a/.github/workflows/webshoppingagg-deploy.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: Deploy webshoppingagg - -on: - workflow_dispatch: - repository_dispatch: - types: - - deploy - workflow_run: - workflows: ["webshoppingagg"] - branches: [dev] - types: [completed] - -env: - CHART: webshoppingagg - NAMESPACE: eshop - CHART_ROOT: deploy/k8s/helm - -jobs: - deploy-to-k8s: - #if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'repository_dispatch' || github.event.workflow_run.conclusion == 'success' }} - if: false - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - - uses: azure/login@v1 - with: - creds: ${{ secrets.AZURE_CREDENTIALS }} - - - uses: azure/aks-set-context@v1 - name: Set AKS context - with: - creds: '${{ secrets.AZURE_CREDENTIALS }}' - cluster-name: ${{ secrets.CLUSTER_NAME }} - resource-group: ${{ secrets.RESOURCE_GROUP }} - - - name: Set branch name as env variable - run: | - currentbranch=$(echo ${GITHUB_REF##*/}) - echo "running on $currentbranch" - echo "BRANCH=$currentbranch" >> $GITHUB_ENV - shell: bash - - - name: Deploy Chart - run: | - ./deploy-chart.sh -c ${{ env.CHART }} --dns aks --aks-name ${{ secrets.CLUSTER_NAME }} --aks-rg ${{ secrets.RESOURCE_GROUP }} -r ${{ secrets.REGISTRY_HOST }} -t $TAG --namespace ${{ env.NAMESPACE }} --acr-connected - env: - TAG: ${{ env.BRANCH }} - working-directory: ${{ env.CHART_ROOT }} \ No newline at end of file diff --git a/.github/workflows/webshoppingagg.yml b/.github/workflows/webshoppingagg.yml deleted file mode 100644 index 6c6df5dbb..000000000 --- a/.github/workflows/webshoppingagg.yml +++ /dev/null @@ -1,90 +0,0 @@ -name: webshoppingagg - -on: - push: - branches: - - dev - - paths: - - src/ApiGateways/Web.Bff.Shopping/aggregator/** - - .github/workflows/webshoppingagg.yml - - pull_request: - branches: - - dev - - paths: - - src/ApiGateways/Web.Bff.Shopping/aggregator/** - - .github/workflows/webshoppingagg.yml -env: - SERVICE: webshoppingagg - IMAGE: webshoppingagg - -jobs: - - BuildContainersForPR_Linux: - runs-on: ubuntu-latest - if: ${{ github.event_name == 'pull_request' }} - steps: - - name: 'Checkout Github Action' - uses: actions/checkout@master - - - name: Compose build ${{ env.SERVICE }} - run: sudo -E docker-compose build ${{ env.SERVICE }} - working-directory: ./src - shell: bash - env: - TAG: ${{ env.BRANCH }} - REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} - - BuildLinux: - runs-on: ubuntu-latest - if: ${{ github.event_name != 'pull_request' }} - steps: - - name: 'Checkout Github Action' - uses: actions/checkout@master - - - name: Enable experimental features for the Docker daemon and CLI - run: | - echo $'{\n "experimental": true\n}' | sudo tee /etc/docker/daemon.json - mkdir -p ~/.docker - echo $'{\n "experimental": "enabled"\n}' | sudo tee ~/.docker/config.json - sudo service docker restart - docker version -f '{{.Client.Experimental}}' - docker version -f '{{.Server.Experimental}}' - - - name: Login to Container Registry - uses: docker/login-action@v1 - with: - registry: ${{ secrets.REGISTRY_HOST }} - username: ${{ secrets.USERNAME }} - password: ${{ secrets.PASSWORD }} - - - name: Set branch name as env variable - run: | - currentbranch=$(echo ${GITHUB_REF##*/}) - echo "running on $currentbranch" - echo "BRANCH=$currentbranch" >> $GITHUB_ENV - shell: bash - - - name: Compose build ${{ env.SERVICE }} - run: sudo -E docker-compose build ${{ env.SERVICE }} - working-directory: ./src - shell: bash - env: - TAG: ${{ env.BRANCH }} - REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} - - - name: Compose push ${{ env.SERVICE }} - run: sudo -E docker-compose push ${{ env.SERVICE }} - working-directory: ./src - shell: bash - env: - TAG: ${{ env.BRANCH }} - REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} - - - name: Create multiarch manifest - run: | - docker --config ~/.docker manifest create ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-${{ env.BRANCH }} - docker --config ~/.docker manifest push ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} - shell: bash \ No newline at end of file diff --git a/.github/workflows/webspa-deploy.yml b/.github/workflows/webspa-deploy.yml deleted file mode 100644 index 2700ee9cd..000000000 --- a/.github/workflows/webspa-deploy.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: Deploy webspa - -on: - workflow_dispatch: - repository_dispatch: - types: - - deploy - workflow_run: - workflows: ["webspa"] - branches: [dev] - types: [completed] - -env: - CHART: webspa - NAMESPACE: eshop - CHART_ROOT: deploy/k8s/helm - -jobs: - deploy-to-k8s: - #if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'repository_dispatch' || github.event.workflow_run.conclusion == 'success' }} - if: false - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - - uses: azure/login@v1 - with: - creds: ${{ secrets.AZURE_CREDENTIALS }} - - - uses: azure/aks-set-context@v1 - name: Set AKS context - with: - creds: '${{ secrets.AZURE_CREDENTIALS }}' - cluster-name: ${{ secrets.CLUSTER_NAME }} - resource-group: ${{ secrets.RESOURCE_GROUP }} - - - name: Set branch name as env variable - run: | - currentbranch=$(echo ${GITHUB_REF##*/}) - echo "running on $currentbranch" - echo "BRANCH=$currentbranch" >> $GITHUB_ENV - shell: bash - - - name: Deploy Chart - run: | - ./deploy-chart.sh -c ${{ env.CHART }} --dns aks --aks-name ${{ secrets.CLUSTER_NAME }} --aks-rg ${{ secrets.RESOURCE_GROUP }} -r ${{ secrets.REGISTRY_HOST }} -t $TAG --namespace ${{ env.NAMESPACE }} --acr-connected - env: - TAG: ${{ env.BRANCH }} - working-directory: ${{ env.CHART_ROOT }} \ No newline at end of file diff --git a/.github/workflows/webspa.yml b/.github/workflows/webspa.yml deleted file mode 100644 index 3dbc3c496..000000000 --- a/.github/workflows/webspa.yml +++ /dev/null @@ -1,92 +0,0 @@ -name: webspa - -on: - push: - branches: - - dev - - paths: - - src/BuildingBlocks/** - - src/Web/WebSPA/** - - .github/workflows/webspa.yml - - pull_request: - branches: - - dev - - paths: - - src/BuildingBlocks/** - - src/Web/WebSPA/** - - .github/workflows/webspa.yml -env: - SERVICE: webspa - IMAGE: webspa - -jobs: - - BuildContainersForPR_Linux: - runs-on: ubuntu-latest - if: ${{ github.event_name == 'pull_request' }} - steps: - - name: 'Checkout Github Action' - uses: actions/checkout@master - - - name: Compose build ${{ env.SERVICE }} - run: sudo -E docker-compose build ${{ env.SERVICE }} - working-directory: ./src - shell: bash - env: - TAG: ${{ env.BRANCH }} - REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} - - BuildLinux: - runs-on: ubuntu-latest - if: ${{ github.event_name != 'pull_request' }} - steps: - - name: 'Checkout Github Action' - uses: actions/checkout@master - - - name: Enable experimental features for the Docker daemon and CLI - run: | - echo $'{\n "experimental": true\n}' | sudo tee /etc/docker/daemon.json - mkdir -p ~/.docker - echo $'{\n "experimental": "enabled"\n}' | sudo tee ~/.docker/config.json - sudo service docker restart - docker version -f '{{.Client.Experimental}}' - docker version -f '{{.Server.Experimental}}' - - - name: Login to Container Registry - uses: docker/login-action@v1 - with: - registry: ${{ secrets.REGISTRY_HOST }} - username: ${{ secrets.USERNAME }} - password: ${{ secrets.PASSWORD }} - - - name: Set branch name as env variable - run: | - currentbranch=$(echo ${GITHUB_REF##*/}) - echo "running on $currentbranch" - echo "BRANCH=$currentbranch" >> $GITHUB_ENV - shell: bash - - - name: Compose build ${{ env.SERVICE }} - run: sudo -E docker-compose build ${{ env.SERVICE }} - working-directory: ./src - shell: bash - env: - TAG: ${{ env.BRANCH }} - REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} - - - name: Compose push ${{ env.SERVICE }} - run: sudo -E docker-compose push ${{ env.SERVICE }} - working-directory: ./src - shell: bash - env: - TAG: ${{ env.BRANCH }} - REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} - - - name: Create multiarch manifest - run: | - docker --config ~/.docker manifest create ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-${{ env.BRANCH }} - docker --config ~/.docker manifest push ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} - shell: bash \ No newline at end of file diff --git a/.github/workflows/webstatus-deploy.yml b/.github/workflows/webstatus-deploy.yml deleted file mode 100644 index dc5629ab9..000000000 --- a/.github/workflows/webstatus-deploy.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: Deploy webstatus - -on: - workflow_dispatch: - repository_dispatch: - types: - - deploy - workflow_run: - workflows: ["webstatus"] - branches: [dev] - types: [completed] - -env: - CHART: webstatus - NAMESPACE: eshop - CHART_ROOT: deploy/k8s/helm - -jobs: - deploy-to-k8s: - #if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'repository_dispatch' || github.event.workflow_run.conclusion == 'success' }} - if: false - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - - uses: azure/login@v1 - with: - creds: ${{ secrets.AZURE_CREDENTIALS }} - - - uses: azure/aks-set-context@v1 - name: Set AKS context - with: - creds: '${{ secrets.AZURE_CREDENTIALS }}' - cluster-name: ${{ secrets.CLUSTER_NAME }} - resource-group: ${{ secrets.RESOURCE_GROUP }} - - - name: Set branch name as env variable - run: | - currentbranch=$(echo ${GITHUB_REF##*/}) - echo "running on $currentbranch" - echo "BRANCH=$currentbranch" >> $GITHUB_ENV - shell: bash - - - name: Deploy Chart - run: | - ./deploy-chart.sh -c ${{ env.CHART }} --dns aks --aks-name ${{ secrets.CLUSTER_NAME }} --aks-rg ${{ secrets.RESOURCE_GROUP }} -r ${{ secrets.REGISTRY_HOST }} -t $TAG --namespace ${{ env.NAMESPACE }} --acr-connected - env: - TAG: ${{ env.BRANCH }} - working-directory: ${{ env.CHART_ROOT }} \ No newline at end of file diff --git a/.github/workflows/webstatus.yml b/.github/workflows/webstatus.yml deleted file mode 100644 index 05d941cf2..000000000 --- a/.github/workflows/webstatus.yml +++ /dev/null @@ -1,93 +0,0 @@ -name: webstatus - -on: - push: - branches: - - dev - - paths: - - src/BuildingBlocks/** - - src/Web/WebStatus/** - - .github/workflows/webstatus.yml - - pull_request: - branches: - - dev - - paths: - - src/BuildingBlocks/** - - src/Web/WebStatus/** - - .github/workflows/webstatus.yml - -env: - SERVICE: webstatus - IMAGE: webstatus - -jobs: - - BuildContainersForPR_Linux: - runs-on: ubuntu-latest - if: ${{ github.event_name == 'pull_request' }} - steps: - - name: 'Checkout Github Action' - uses: actions/checkout@master - - - name: Compose build ${{ env.SERVICE }} - run: sudo -E docker-compose build ${{ env.SERVICE }} - working-directory: ./src - shell: bash - env: - TAG: ${{ env.BRANCH }} - REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} - - BuildLinux: - runs-on: ubuntu-latest - if: ${{ github.event_name != 'pull_request' }} - steps: - - name: 'Checkout Github Action' - uses: actions/checkout@master - - - name: Enable experimental features for the Docker daemon and CLI - run: | - echo $'{\n "experimental": true\n}' | sudo tee /etc/docker/daemon.json - mkdir -p ~/.docker - echo $'{\n "experimental": "enabled"\n}' | sudo tee ~/.docker/config.json - sudo service docker restart - docker version -f '{{.Client.Experimental}}' - docker version -f '{{.Server.Experimental}}' - - - name: Login to Container Registry - uses: docker/login-action@v1 - with: - registry: ${{ secrets.REGISTRY_HOST }} - username: ${{ secrets.USERNAME }} - password: ${{ secrets.PASSWORD }} - - - name: Set branch name as env variable - run: | - currentbranch=$(echo ${GITHUB_REF##*/}) - echo "running on $currentbranch" - echo "BRANCH=$currentbranch" >> $GITHUB_ENV - shell: bash - - - name: Compose build ${{ env.SERVICE }} - run: sudo -E docker-compose build ${{ env.SERVICE }} - working-directory: ./src - shell: bash - env: - TAG: ${{ env.BRANCH }} - REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} - - - name: Compose push ${{ env.SERVICE }} - run: sudo -E docker-compose push ${{ env.SERVICE }} - working-directory: ./src - shell: bash - env: - TAG: ${{ env.BRANCH }} - REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} - - - name: Create multiarch manifest - run: | - docker --config ~/.docker manifest create ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-${{ env.BRANCH }} - docker --config ~/.docker manifest push ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} - shell: bash \ No newline at end of file