Browse Source

Updated to push to GitHub container registry

pull/1687/head
Calle Veale 3 years ago
parent
commit
0c33ccb235
24 changed files with 9 additions and 1587 deletions
  1. +0
    -50
      .github/workflows/basket-api-deploy.yml
  2. +0
    -126
      .github/workflows/basket-api.yml
  3. +0
    -50
      .github/workflows/catalog-api-deploy.yml
  4. +0
    -126
      .github/workflows/catalog-api.yml
  5. +0
    -50
      .github/workflows/identity-api-deploy.yml
  6. +0
    -92
      .github/workflows/identity-api.yml
  7. +0
    -50
      .github/workflows/mobileshoppingagg-deploy.yml
  8. +0
    -90
      .github/workflows/mobileshoppingagg.yml
  9. +3
    -3
      .github/workflows/ordering-api.yml
  10. +3
    -3
      .github/workflows/ordering-backgroundtasks.yml
  11. +3
    -3
      .github/workflows/ordering-signalrhub.yml
  12. +0
    -50
      .github/workflows/payment-api-deploy.yml
  13. +0
    -92
      .github/workflows/payment-api.yml
  14. +0
    -50
      .github/workflows/webhooks-api-deploy.yml
  15. +0
    -92
      .github/workflows/webhooks-api.yml
  16. +0
    -92
      .github/workflows/webhooks-client.yml
  17. +0
    -50
      .github/workflows/webmvc-deploy.yml
  18. +0
    -93
      .github/workflows/webmvc.yml
  19. +0
    -50
      .github/workflows/webshoppingagg-deploy.yml
  20. +0
    -90
      .github/workflows/webshoppingagg.yml
  21. +0
    -50
      .github/workflows/webspa-deploy.yml
  22. +0
    -92
      .github/workflows/webspa.yml
  23. +0
    -50
      .github/workflows/webstatus-deploy.yml
  24. +0
    -93
      .github/workflows/webstatus.yml

+ 0
- 50
.github/workflows/basket-api-deploy.yml View File

@ -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 }}

+ 0
- 126
.github/workflows/basket-api.yml View File

@ -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

+ 0
- 50
.github/workflows/catalog-api-deploy.yml View File

@ -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 }}

+ 0
- 126
.github/workflows/catalog-api.yml View File

@ -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

+ 0
- 50
.github/workflows/identity-api-deploy.yml View File

@ -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 }}

+ 0
- 92
.github/workflows/identity-api.yml View File

@ -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

+ 0
- 50
.github/workflows/mobileshoppingagg-deploy.yml View File

@ -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 }}

+ 0
- 90
.github/workflows/mobileshoppingagg.yml View File

@ -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

+ 3
- 3
.github/workflows/ordering-api.yml View File

@ -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: |


+ 3
- 3
.github/workflows/ordering-backgroundtasks.yml View File

@ -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: |


+ 3
- 3
.github/workflows/ordering-signalrhub.yml View File

@ -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: |


+ 0
- 50
.github/workflows/payment-api-deploy.yml View File

@ -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 }}

+ 0
- 92
.github/workflows/payment-api.yml View File

@ -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

+ 0
- 50
.github/workflows/webhooks-api-deploy.yml View File

@ -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 }}

+ 0
- 92
.github/workflows/webhooks-api.yml View File

@ -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

+ 0
- 92
.github/workflows/webhooks-client.yml View File

@ -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

+ 0
- 50
.github/workflows/webmvc-deploy.yml View File

@ -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 }}

+ 0
- 93
.github/workflows/webmvc.yml View File

@ -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

+ 0
- 50
.github/workflows/webshoppingagg-deploy.yml View File

@ -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 }}

+ 0
- 90
.github/workflows/webshoppingagg.yml View File

@ -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

+ 0
- 50
.github/workflows/webspa-deploy.yml View File

@ -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 }}

+ 0
- 92
.github/workflows/webspa.yml View File

@ -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

+ 0
- 50
.github/workflows/webstatus-deploy.yml View File

@ -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 }}

+ 0
- 93
.github/workflows/webstatus.yml View File

@ -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

Loading…
Cancel
Save