Updated to push to GitHub container registry
This commit is contained in:
parent
ebba5317b9
commit
0c33ccb235
50
.github/workflows/basket-api-deploy.yml
vendored
50
.github/workflows/basket-api-deploy.yml
vendored
@ -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 }}
|
|
126
.github/workflows/basket-api.yml
vendored
126
.github/workflows/basket-api.yml
vendored
@ -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
|
|
50
.github/workflows/catalog-api-deploy.yml
vendored
50
.github/workflows/catalog-api-deploy.yml
vendored
@ -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 }}
|
|
126
.github/workflows/catalog-api.yml
vendored
126
.github/workflows/catalog-api.yml
vendored
@ -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
|
|
50
.github/workflows/identity-api-deploy.yml
vendored
50
.github/workflows/identity-api-deploy.yml
vendored
@ -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 }}
|
|
92
.github/workflows/identity-api.yml
vendored
92
.github/workflows/identity-api.yml
vendored
@ -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
|
|
50
.github/workflows/mobileshoppingagg-deploy.yml
vendored
50
.github/workflows/mobileshoppingagg-deploy.yml
vendored
@ -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 }}
|
|
90
.github/workflows/mobileshoppingagg.yml
vendored
90
.github/workflows/mobileshoppingagg.yml
vendored
@ -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
|
|
6
.github/workflows/ordering-api.yml
vendored
6
.github/workflows/ordering-api.yml
vendored
@ -92,9 +92,9 @@ jobs:
|
|||||||
- name: Login to Container Registry
|
- name: Login to Container Registry
|
||||||
uses: docker/login-action@v1
|
uses: docker/login-action@v1
|
||||||
with:
|
with:
|
||||||
registry: ${{ secrets.REGISTRY_HOST }}
|
registry: ghcr.io
|
||||||
username: ${{ secrets.USERNAME }}
|
username: ${{ github.repository_owner }}
|
||||||
password: ${{ secrets.PASSWORD }}
|
password: ${{ secrets.GITHUB_REGISTRY_TOKEN }}
|
||||||
|
|
||||||
- name: Set branch name as env variable
|
- name: Set branch name as env variable
|
||||||
run: |
|
run: |
|
||||||
|
@ -58,9 +58,9 @@ jobs:
|
|||||||
- name: Login to Container Registry
|
- name: Login to Container Registry
|
||||||
uses: docker/login-action@v1
|
uses: docker/login-action@v1
|
||||||
with:
|
with:
|
||||||
registry: ${{ secrets.REGISTRY_HOST }}
|
registry: ghcr.io
|
||||||
username: ${{ secrets.USERNAME }}
|
username: ${{ github.repository_owner }}
|
||||||
password: ${{ secrets.PASSWORD }}
|
password: ${{ secrets.GITHUB_REGISTRY_TOKEN }}
|
||||||
|
|
||||||
- name: Set branch name as env variable
|
- name: Set branch name as env variable
|
||||||
run: |
|
run: |
|
||||||
|
6
.github/workflows/ordering-signalrhub.yml
vendored
6
.github/workflows/ordering-signalrhub.yml
vendored
@ -58,9 +58,9 @@ jobs:
|
|||||||
- name: Login to Container Registry
|
- name: Login to Container Registry
|
||||||
uses: docker/login-action@v1
|
uses: docker/login-action@v1
|
||||||
with:
|
with:
|
||||||
registry: ${{ secrets.REGISTRY_HOST }}
|
registry: ghcr.io
|
||||||
username: ${{ secrets.USERNAME }}
|
username: ${{ github.repository_owner }}
|
||||||
password: ${{ secrets.PASSWORD }}
|
password: ${{ secrets.GITHUB_REGISTRY_TOKEN }}
|
||||||
|
|
||||||
- name: Set branch name as env variable
|
- name: Set branch name as env variable
|
||||||
run: |
|
run: |
|
||||||
|
50
.github/workflows/payment-api-deploy.yml
vendored
50
.github/workflows/payment-api-deploy.yml
vendored
@ -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 }}
|
|
92
.github/workflows/payment-api.yml
vendored
92
.github/workflows/payment-api.yml
vendored
@ -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
|
|
50
.github/workflows/webhooks-api-deploy.yml
vendored
50
.github/workflows/webhooks-api-deploy.yml
vendored
@ -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 }}
|
|
92
.github/workflows/webhooks-api.yml
vendored
92
.github/workflows/webhooks-api.yml
vendored
@ -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
|
|
92
.github/workflows/webhooks-client.yml
vendored
92
.github/workflows/webhooks-client.yml
vendored
@ -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
|
|
50
.github/workflows/webmvc-deploy.yml
vendored
50
.github/workflows/webmvc-deploy.yml
vendored
@ -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 }}
|
|
93
.github/workflows/webmvc.yml
vendored
93
.github/workflows/webmvc.yml
vendored
@ -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
|
|
50
.github/workflows/webshoppingagg-deploy.yml
vendored
50
.github/workflows/webshoppingagg-deploy.yml
vendored
@ -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 }}
|
|
90
.github/workflows/webshoppingagg.yml
vendored
90
.github/workflows/webshoppingagg.yml
vendored
@ -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
|
|
50
.github/workflows/webspa-deploy.yml
vendored
50
.github/workflows/webspa-deploy.yml
vendored
@ -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 }}
|
|
92
.github/workflows/webspa.yml
vendored
92
.github/workflows/webspa.yml
vendored
@ -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
|
|
50
.github/workflows/webstatus-deploy.yml
vendored
50
.github/workflows/webstatus-deploy.yml
vendored
@ -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 }}
|
|
93
.github/workflows/webstatus.yml
vendored
93
.github/workflows/webstatus.yml
vendored
@ -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…
x
Reference in New Issue
Block a user