basket catalog identity ordering workflows
This commit is contained in:
parent
19a1e77665
commit
469957403c
8
.github/workflows/basket-api.yml
vendored
8
.github/workflows/basket-api.yml
vendored
@ -3,9 +3,8 @@ name: basket-api
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- main
|
||||||
- dev
|
- dev
|
||||||
- feature/github-actions
|
|
||||||
|
|
||||||
paths:
|
paths:
|
||||||
- src/BuildingBlocks/*
|
- src/BuildingBlocks/*
|
||||||
@ -14,7 +13,7 @@ on:
|
|||||||
|
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- main
|
||||||
- dev
|
- dev
|
||||||
env:
|
env:
|
||||||
SERVICE: basket-api
|
SERVICE: basket-api
|
||||||
@ -140,6 +139,3 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
TAG: ${{ env.BRANCH }}
|
TAG: ${{ env.BRANCH }}
|
||||||
REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }}
|
REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }}
|
||||||
|
|
||||||
|
|
||||||
|
|
141
.github/workflows/catalog-api.yml
vendored
Normal file
141
.github/workflows/catalog-api.yml
vendored
Normal file
@ -0,0 +1,141 @@
|
|||||||
|
name: catalog-api
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- dev
|
||||||
|
|
||||||
|
paths:
|
||||||
|
- src/BuildingBlocks/*
|
||||||
|
- src/Services/Catalog/*
|
||||||
|
- .github/workflows/catalog-api.yml
|
||||||
|
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- dev
|
||||||
|
env:
|
||||||
|
SERVICE: catalog-api
|
||||||
|
IMAGE: catalog.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 }}
|
||||||
|
|
||||||
|
BuildContainersForPR_Windows:
|
||||||
|
|
||||||
|
runs-on: windows-2019
|
||||||
|
if: ${{ false }}
|
||||||
|
# if: ${{ github.event_name == 'pull_request' }}
|
||||||
|
steps:
|
||||||
|
- name: 'Checkout Github Action'
|
||||||
|
uses: actions/checkout@master
|
||||||
|
|
||||||
|
- name: Compose build ${{ env.SERVICE }}
|
||||||
|
run: docker-compose build ${{ env.SERVICE }}
|
||||||
|
working-directory: ./src
|
||||||
|
shell: pwsh
|
||||||
|
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
|
||||||
|
|
||||||
|
BuildWindows:
|
||||||
|
runs-on: windows-2019
|
||||||
|
if: ${{ false }}
|
||||||
|
# if: ${{ github.event_name != 'pull_request' }}
|
||||||
|
steps:
|
||||||
|
- name: 'Checkout Github Action'
|
||||||
|
uses: actions/checkout@master
|
||||||
|
|
||||||
|
- name: Login to Container Registry
|
||||||
|
uses: azure/docker-login@v1
|
||||||
|
with:
|
||||||
|
login-server: ${{ env.REGISTRY_HOST }}
|
||||||
|
username: ${{ secrets.USERNAME }}
|
||||||
|
password: ${{ secrets.PASSWORD }}
|
||||||
|
|
||||||
|
- name: Set branch name as env variable
|
||||||
|
shell: pwsh
|
||||||
|
run: echo "BRANCH=$($env:GITHUB_REF.replace('refs/heads/', ''))" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||||
|
|
||||||
|
- name: Compose build ${{ env.SERVICE }}
|
||||||
|
run: docker-compose build ${{ env.SERVICE }}
|
||||||
|
working-directory: ./src
|
||||||
|
shell: pwsh
|
||||||
|
env:
|
||||||
|
TAG: ${{ env.BRANCH }}
|
||||||
|
REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }}
|
||||||
|
|
||||||
|
- name: Compose push ${{ env.SERVICE }}
|
||||||
|
run: docker-compose push ${{ env.SERVICE }}'
|
||||||
|
working-directory: ./src
|
||||||
|
shell: pwsh
|
||||||
|
env:
|
||||||
|
TAG: ${{ env.BRANCH }}
|
||||||
|
REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }}
|
25
.github/workflows/catalog-api/workflow.yml
vendored
25
.github/workflows/catalog-api/workflow.yml
vendored
@ -1,25 +0,0 @@
|
|||||||
#Note: Azure DevOps template does not have an equivalent in GitHub Actions yet
|
|
||||||
#Note: Azure DevOps template does not have an equivalent in GitHub Actions yet
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
- dev
|
|
||||||
paths:
|
|
||||||
- src/BuildingBlocks/*
|
|
||||||
- src/Services/Catalog/*
|
|
||||||
- build/azure-devops/buildimages.yml
|
|
||||||
- build/azure-devops/multiarch.yml
|
|
||||||
- build/azure-devops/catalog-api/*
|
|
||||||
- deploy/k8s/helm/catalog-api/*
|
|
||||||
env:
|
|
||||||
registryEndpoint: eshop-registry
|
|
||||||
jobs:
|
|
||||||
job_1_template:
|
|
||||||
# 'Note: Azure DevOps template does not have an equivalent in GitHub Actions yet'
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
job_2_template:
|
|
||||||
# 'Note: Azure DevOps template does not have an equivalent in GitHub Actions yet'
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
141
.github/workflows/identity-api.yml
vendored
Normal file
141
.github/workflows/identity-api.yml
vendored
Normal file
@ -0,0 +1,141 @@
|
|||||||
|
name: identity-api
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- dev
|
||||||
|
|
||||||
|
paths:
|
||||||
|
- src/BuildingBlocks/*
|
||||||
|
- src/Services/Identity/*
|
||||||
|
- .github/workflows/identity-api.yml
|
||||||
|
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- dev
|
||||||
|
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 }}
|
||||||
|
|
||||||
|
BuildContainersForPR_Windows:
|
||||||
|
|
||||||
|
runs-on: windows-2019
|
||||||
|
if: ${{ false }}
|
||||||
|
# if: ${{ github.event_name == 'pull_request' }}
|
||||||
|
steps:
|
||||||
|
- name: 'Checkout Github Action'
|
||||||
|
uses: actions/checkout@master
|
||||||
|
|
||||||
|
- name: Compose build ${{ env.SERVICE }}
|
||||||
|
run: docker-compose build ${{ env.SERVICE }}
|
||||||
|
working-directory: ./src
|
||||||
|
shell: pwsh
|
||||||
|
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
|
||||||
|
|
||||||
|
BuildWindows:
|
||||||
|
runs-on: windows-2019
|
||||||
|
if: ${{ false }}
|
||||||
|
# if: ${{ github.event_name != 'pull_request' }}
|
||||||
|
steps:
|
||||||
|
- name: 'Checkout Github Action'
|
||||||
|
uses: actions/checkout@master
|
||||||
|
|
||||||
|
- name: Login to Container Registry
|
||||||
|
uses: azure/docker-login@v1
|
||||||
|
with:
|
||||||
|
login-server: ${{ env.REGISTRY_HOST }}
|
||||||
|
username: ${{ secrets.USERNAME }}
|
||||||
|
password: ${{ secrets.PASSWORD }}
|
||||||
|
|
||||||
|
- name: Set branch name as env variable
|
||||||
|
shell: pwsh
|
||||||
|
run: echo "BRANCH=$($env:GITHUB_REF.replace('refs/heads/', ''))" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||||
|
|
||||||
|
- name: Compose build ${{ env.SERVICE }}
|
||||||
|
run: docker-compose build ${{ env.SERVICE }}
|
||||||
|
working-directory: ./src
|
||||||
|
shell: pwsh
|
||||||
|
env:
|
||||||
|
TAG: ${{ env.BRANCH }}
|
||||||
|
REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }}
|
||||||
|
|
||||||
|
- name: Compose push ${{ env.SERVICE }}
|
||||||
|
run: docker-compose push ${{ env.SERVICE }}'
|
||||||
|
working-directory: ./src
|
||||||
|
shell: pwsh
|
||||||
|
env:
|
||||||
|
TAG: ${{ env.BRANCH }}
|
||||||
|
REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }}
|
25
.github/workflows/identity-api/workflow.yml
vendored
25
.github/workflows/identity-api/workflow.yml
vendored
@ -1,25 +0,0 @@
|
|||||||
#Note: Azure DevOps template does not have an equivalent in GitHub Actions yet
|
|
||||||
#Note: Azure DevOps template does not have an equivalent in GitHub Actions yet
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
- dev
|
|
||||||
paths:
|
|
||||||
- src/BuildingBlocks/*
|
|
||||||
- src/Services/Identity/*
|
|
||||||
- build/azure-devops/buildimages.yml
|
|
||||||
- build/azure-devops/multiarch.yml
|
|
||||||
- build/azure-devops/identity-api/*
|
|
||||||
- deploy/k8s/helm/identity-api/*
|
|
||||||
env:
|
|
||||||
registryEndpoint: eshop-registry
|
|
||||||
jobs:
|
|
||||||
job_1_template:
|
|
||||||
# 'Note: Azure DevOps template does not have an equivalent in GitHub Actions yet'
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
job_2_template:
|
|
||||||
# 'Note: Azure DevOps template does not have an equivalent in GitHub Actions yet'
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
27
.github/workflows/infrastructure/workflow.yml
vendored
27
.github/workflows/infrastructure/workflow.yml
vendored
@ -1,27 +0,0 @@
|
|||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
- dev
|
|
||||||
paths:
|
|
||||||
- build/azure-devops/buildimages.yml
|
|
||||||
- build/azure-devops/multiarch.yml
|
|
||||||
- build/azure-devops/infrastructure/*
|
|
||||||
- deploy/k8s/helm/basket-data/*
|
|
||||||
- deploy/k8s/helm/keystore-data/*
|
|
||||||
- deploy/k8s/helm/nosql-data/*
|
|
||||||
- deploy/k8s/helm/rabbitmq/*
|
|
||||||
- deploy/k8s/helm/sql-data/*
|
|
||||||
env:
|
|
||||||
registryEndpoint: eshop-registry
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-16.04
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- run: Copy '${{ github.workspace }}/deploy/k8s/helm/' '${{ github.workspace }}/deploy/k8s/helm'
|
|
||||||
shell: powershell
|
|
||||||
- uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
path: ${{ github.workspace }}/deploy/k8s/helm
|
|
||||||
name: helm
|
|
@ -1,24 +0,0 @@
|
|||||||
#Note: Azure DevOps template does not have an equivalent in GitHub Actions yet
|
|
||||||
#Note: Azure DevOps template does not have an equivalent in GitHub Actions yet
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
- dev
|
|
||||||
paths:
|
|
||||||
- src/ApiGateways/Mobile.Bff.Shopping/aggregator/*
|
|
||||||
- build/azure-devops/buildimages.yml
|
|
||||||
- build/azure-devops/multiarch.yml
|
|
||||||
- build/azure-devops/mobile-shopping-agg/*
|
|
||||||
- deploy/k8s/helm/mobileshoppingagg/*
|
|
||||||
env:
|
|
||||||
registryEndpoint: eshop-registry
|
|
||||||
jobs:
|
|
||||||
job_1_template:
|
|
||||||
# 'Note: Azure DevOps template does not have an equivalent in GitHub Actions yet'
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
job_2_template:
|
|
||||||
# 'Note: Azure DevOps template does not have an equivalent in GitHub Actions yet'
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
141
.github/workflows/ordering-api.yml
vendored
Normal file
141
.github/workflows/ordering-api.yml
vendored
Normal file
@ -0,0 +1,141 @@
|
|||||||
|
name: ordering-api
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- dev
|
||||||
|
|
||||||
|
paths:
|
||||||
|
- src/BuildingBlocks/*
|
||||||
|
- src/Services/Ordering/*
|
||||||
|
- .github/workflows/ordering-api.yml
|
||||||
|
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- dev
|
||||||
|
env:
|
||||||
|
SERVICE: ordering-api
|
||||||
|
IMAGE: ordering.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 }}
|
||||||
|
|
||||||
|
BuildContainersForPR_Windows:
|
||||||
|
|
||||||
|
runs-on: windows-2019
|
||||||
|
if: ${{ false }}
|
||||||
|
# if: ${{ github.event_name == 'pull_request' }}
|
||||||
|
steps:
|
||||||
|
- name: 'Checkout Github Action'
|
||||||
|
uses: actions/checkout@master
|
||||||
|
|
||||||
|
- name: Compose build ${{ env.SERVICE }}
|
||||||
|
run: docker-compose build ${{ env.SERVICE }}
|
||||||
|
working-directory: ./src
|
||||||
|
shell: pwsh
|
||||||
|
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
|
||||||
|
|
||||||
|
BuildWindows:
|
||||||
|
runs-on: windows-2019
|
||||||
|
if: ${{ false }}
|
||||||
|
# if: ${{ github.event_name != 'pull_request' }}
|
||||||
|
steps:
|
||||||
|
- name: 'Checkout Github Action'
|
||||||
|
uses: actions/checkout@master
|
||||||
|
|
||||||
|
- name: Login to Container Registry
|
||||||
|
uses: azure/docker-login@v1
|
||||||
|
with:
|
||||||
|
login-server: ${{ env.REGISTRY_HOST }}
|
||||||
|
username: ${{ secrets.USERNAME }}
|
||||||
|
password: ${{ secrets.PASSWORD }}
|
||||||
|
|
||||||
|
- name: Set branch name as env variable
|
||||||
|
shell: pwsh
|
||||||
|
run: echo "BRANCH=$($env:GITHUB_REF.replace('refs/heads/', ''))" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||||
|
|
||||||
|
- name: Compose build ${{ env.SERVICE }}
|
||||||
|
run: docker-compose build ${{ env.SERVICE }}
|
||||||
|
working-directory: ./src
|
||||||
|
shell: pwsh
|
||||||
|
env:
|
||||||
|
TAG: ${{ env.BRANCH }}
|
||||||
|
REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }}
|
||||||
|
|
||||||
|
- name: Compose push ${{ env.SERVICE }}
|
||||||
|
run: docker-compose push ${{ env.SERVICE }}'
|
||||||
|
working-directory: ./src
|
||||||
|
shell: pwsh
|
||||||
|
env:
|
||||||
|
TAG: ${{ env.BRANCH }}
|
||||||
|
REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }}
|
27
.github/workflows/ordering-api/workflow.yml
vendored
27
.github/workflows/ordering-api/workflow.yml
vendored
@ -1,27 +0,0 @@
|
|||||||
#Note: Azure DevOps template does not have an equivalent in GitHub Actions yet
|
|
||||||
#Note: Azure DevOps template does not have an equivalent in GitHub Actions yet
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
- dev
|
|
||||||
paths:
|
|
||||||
- src/BuildingBlocks/*
|
|
||||||
- src/Services/Ordering/*
|
|
||||||
- build/azure-devops/buildimages.yml
|
|
||||||
- build/azure-devops/multiarch.yml
|
|
||||||
- build/azure-devops/ordering-api/*
|
|
||||||
- deploy/k8s/helm/ordering-api/*
|
|
||||||
- deploy/k8s/helm/ordering-backgroundtasks/*
|
|
||||||
- deploy/k8s/helm/ordering-signalrhub/*
|
|
||||||
env:
|
|
||||||
registryEndpoint: eshop-registry
|
|
||||||
jobs:
|
|
||||||
job_1_template:
|
|
||||||
# 'Note: Azure DevOps template does not have an equivalent in GitHub Actions yet'
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
job_2_template:
|
|
||||||
# 'Note: Azure DevOps template does not have an equivalent in GitHub Actions yet'
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
140
.github/workflows/webshoppingagg.yml
vendored
Normal file
140
.github/workflows/webshoppingagg.yml
vendored
Normal file
@ -0,0 +1,140 @@
|
|||||||
|
name: webshoppingagg
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- dev
|
||||||
|
|
||||||
|
paths:
|
||||||
|
- src/ApiGateways/Web.Bff.Shopping/aggregator/*
|
||||||
|
- .github/workflows/webshoppingagg.yml
|
||||||
|
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- dev
|
||||||
|
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 }}
|
||||||
|
|
||||||
|
BuildContainersForPR_Windows:
|
||||||
|
|
||||||
|
runs-on: windows-2019
|
||||||
|
if: ${{ false }}
|
||||||
|
# if: ${{ github.event_name == 'pull_request' }}
|
||||||
|
steps:
|
||||||
|
- name: 'Checkout Github Action'
|
||||||
|
uses: actions/checkout@master
|
||||||
|
|
||||||
|
- name: Compose build ${{ env.SERVICE }}
|
||||||
|
run: docker-compose build ${{ env.SERVICE }}
|
||||||
|
working-directory: ./src
|
||||||
|
shell: pwsh
|
||||||
|
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
|
||||||
|
|
||||||
|
BuildWindows:
|
||||||
|
runs-on: windows-2019
|
||||||
|
if: ${{ false }}
|
||||||
|
# if: ${{ github.event_name != 'pull_request' }}
|
||||||
|
steps:
|
||||||
|
- name: 'Checkout Github Action'
|
||||||
|
uses: actions/checkout@master
|
||||||
|
|
||||||
|
- name: Login to Container Registry
|
||||||
|
uses: azure/docker-login@v1
|
||||||
|
with:
|
||||||
|
login-server: ${{ env.REGISTRY_HOST }}
|
||||||
|
username: ${{ secrets.USERNAME }}
|
||||||
|
password: ${{ secrets.PASSWORD }}
|
||||||
|
|
||||||
|
- name: Set branch name as env variable
|
||||||
|
shell: pwsh
|
||||||
|
run: echo "BRANCH=$($env:GITHUB_REF.replace('refs/heads/', ''))" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||||
|
|
||||||
|
- name: Compose build ${{ env.SERVICE }}
|
||||||
|
run: docker-compose build ${{ env.SERVICE }}
|
||||||
|
working-directory: ./src
|
||||||
|
shell: pwsh
|
||||||
|
env:
|
||||||
|
TAG: ${{ env.BRANCH }}
|
||||||
|
REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }}
|
||||||
|
|
||||||
|
- name: Compose push ${{ env.SERVICE }}
|
||||||
|
run: docker-compose push ${{ env.SERVICE }}'
|
||||||
|
working-directory: ./src
|
||||||
|
shell: pwsh
|
||||||
|
env:
|
||||||
|
TAG: ${{ env.BRANCH }}
|
||||||
|
REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }}
|
Loading…
x
Reference in New Issue
Block a user