Updated to push to GitHub container registrypull/1688/head
@ -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 }} |
@ -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 |
@ -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 }} |
@ -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 |
@ -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 }} |
@ -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 |
@ -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 }} |
@ -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 |
@ -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 }} |
@ -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 |
@ -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 }} |
@ -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 |
@ -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 |
@ -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 }} |
@ -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 |
@ -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 }} |
@ -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 |
@ -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 }} |
@ -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 |
@ -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 }} |
@ -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 |