@ -0,0 +1,30 @@ | |||
on: | |||
push: | |||
branches: | |||
- master | |||
- dev | |||
- feature/github-actions | |||
paths: | |||
- src/ApiGateways/* | |||
- .github/workflows/buildimages.yml | |||
- .github/workflows/multiarch.yml | |||
- .github/workflows/apigws/* | |||
- deploy/k8s/helm/apigwmm/* | |||
- deploy/k8s/helm/apigwms/* | |||
- deploy/k8s/helm/apigwwm/* | |||
- deploy/k8s/helm/apigwws/* | |||
paths-ignore: | |||
- src/ApiGateways/Mobile.Bff.Shopping/aggregator/* | |||
- src/ApiGateways/Web.Bff.Shopping/aggregator/* | |||
jobs: | |||
PublishCharts: | |||
runs-on: ubuntu-16.04 | |||
if: ne('${{ env.Build.Reason }}', 'PullRequest') | |||
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 |
@ -0,0 +1,25 @@ | |||
#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/Basket/* | |||
- build/azure-devops/buildimages.yml | |||
- build/azure-devops/multiarch.yml | |||
- build/azure-devops/basket-api/* | |||
- deploy/k8s/helm/basket-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 |
@ -0,0 +1,94 @@ | |||
parameters: | |||
services: '' | |||
registryEndpoint: '' | |||
helmfrom: '' | |||
helmto: '' | |||
jobs: | |||
- job: BuildContainersForPR_Linux | |||
condition: eq('${{ variables['Build.Reason'] }}', 'PullRequest') | |||
pool: | |||
vmImage: 'ubuntu-16.04' | |||
steps: | |||
- bash: docker-compose -f src/docker-compose.yml build ${{ parameters.services }} | |||
displayName: Compose build ${{ parameters.services }} | |||
env: | |||
TAG: ${{ variables['Build.SourceBranchName'] }} | |||
- job: BuildContainersForPR_Windows | |||
condition: False | |||
# condition: eq('${{ variables['Build.Reason'] }}', 'PullRequest') | |||
pool: | |||
vmImage: 'windows-2019' | |||
steps: | |||
- bash: docker-compose f src/docker-compose.yml build ${{ parameters.services }} | |||
displayName: Compose build ${{ parameters.services }} | |||
env: | |||
TAG: ${{ variables['Build.SourceBranchName'] }} | |||
PLATFORM: win | |||
NODE_IMAGE: stefanscherer/node-windows:10 | |||
- job: BuildLinux | |||
condition: ne('${{ variables['Build.Reason'] }}', 'PullRequest') | |||
pool: | |||
vmImage: 'ubuntu-16.04' | |||
steps: | |||
- task: DockerCompose@0 | |||
displayName: Compose build ${{ parameters.services }} | |||
inputs: | |||
dockerComposeCommand: 'build ${{ parameters.services }}' | |||
containerregistrytype: Container Registry | |||
dockerRegistryEndpoint: ${{ parameters.registryEndpoint }} | |||
dockerComposeFile: src/docker-compose.yml | |||
qualifyImageNames: true | |||
projectName: "" | |||
dockerComposeFileArgs: | | |||
TAG=${{ variables['Build.SourceBranchName'] }} | |||
- task: DockerCompose@0 | |||
displayName: Compose push ${{ parameters.images }} | |||
inputs: | |||
dockerComposeCommand: 'push ${{ parameters.services }}' | |||
containerregistrytype: Container Registry | |||
dockerRegistryEndpoint: ${{ parameters.registryEndpoint }} | |||
dockerComposeFile: src/docker-compose.yml | |||
qualifyImageNames: true | |||
projectName: "" | |||
dockerComposeFileArgs: | | |||
TAG=${{ variables['Build.SourceBranchName'] }} | |||
- task: CopyFiles@2 | |||
inputs: | |||
sourceFolder: ${{ parameters.helmfrom }} | |||
targetFolder: ${{ parameters.helmto }} | |||
- task: PublishBuildArtifacts@1 | |||
inputs: | |||
pathtoPublish: ${{ parameters.helmto }} | |||
artifactName: helm | |||
- job: BuildWindows | |||
condition: False | |||
# condition: ne('${{ variables['Build.Reason'] }}', 'PullRequest') | |||
pool: | |||
vmImage: 'windows-2019' | |||
steps: | |||
- task: DockerCompose@0 | |||
displayName: Compose build ${{ parameters.services }} | |||
inputs: | |||
dockerComposeCommand: 'build ${{ parameters.services }}' | |||
containerregistrytype: Container Registry | |||
dockerRegistryEndpoint: ${{ parameters.registryEndpoint }} | |||
dockerComposeFile: src/docker-compose.yml | |||
qualifyImageNames: true | |||
projectName: "" | |||
dockerComposeFileArgs: | | |||
TAG=${{ variables['Build.SourceBranchName'] }} | |||
PLATFORM=win | |||
NODE_IMAGE=stefanscherer/node-windows:10 | |||
- task: DockerCompose@0 | |||
displayName: Compose push ${{ parameters.services }} | |||
inputs: | |||
dockerComposeCommand: 'push ${{ parameters.services }}' | |||
containerregistrytype: Container Registry | |||
dockerRegistryEndpoint: ${{ parameters.registryEndpoint }} | |||
dockerComposeFile: src/docker-compose.yml | |||
qualifyImageNames: true | |||
projectName: "" | |||
dockerComposeFileArgs: | | |||
TAG=${{ variables['Build.SourceBranchName'] }} | |||
PLATFORM=win |
@ -0,0 +1,25 @@ | |||
#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 |
@ -0,0 +1,25 @@ | |||
#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 |
@ -0,0 +1,27 @@ | |||
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 |
@ -0,0 +1,24 @@ | |||
#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 |
@ -0,0 +1,25 @@ | |||
env: | |||
image: '' | |||
branch: '' | |||
registry: eshop | |||
registryEndpoint: '' | |||
jobs: | |||
manifest: | |||
runs-on: Ubuntu 16.04 | |||
needs: | |||
- BuildLinux | |||
if: and(,ne('${{ env.variables['Build.Reason'] }}', 'PullRequest')) | |||
steps: | |||
- uses: actions/checkout@v2 | |||
- name: Docker Login | |||
run: docker login | |||
- name: Create multiarch manifest | |||
run: | | |||
mkdir -p ~/.docker | |||
sed '$ s/.$//' $DOCKER_CONFIG/config.json > ~/.docker/config.json | |||
echo ',"experimental": "enabled" }' >> ~/.docker/config.json | |||
docker --config ~/.docker manifest create ${{ env.parameters.registry }}/${{ env.parameters.image }}:${{ env.parameters.branch }} ${{ env.parameters.registry }}/${{ env.parameters.image }}:linux-${{ env.parameters.branch }} | |||
docker --config ~/.docker manifest create ${{ env.parameters.registry }}/${{ env.parameters.image }}:latest ${{ env.parameters.registry }}/${{ env.parameters.image }}:linux-latest | |||
docker --config ~/.docker manifest push ${{ env.parameters.registry }}/${{ env.parameters.image }}:${{ env.parameters.branch }} | |||
docker --config ~/.docker manifest push ${{ env.parameters.registry }}/${{ env.parameters.image }}:latest | |||
shell: bash |
@ -0,0 +1,27 @@ | |||
#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 |
@ -0,0 +1,25 @@ | |||
#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/Payment/* | |||
- build/azure-devops/buildimages.yml | |||
- build/azure-devops/multiarch.yml | |||
- build/azure-devops/payment-api/* | |||
- deploy/k8s/helm/payment-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 |
@ -0,0 +1,24 @@ | |||
#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/Web.Bff.Shopping/aggregator/* | |||
- build/azure-devops/buildimages.yml | |||
- build/azure-devops/multiarch.yml | |||
- build/azure-devops/web-shopping-agg/* | |||
- deploy/k8s/helm/webshoppingagg/* | |||
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 |
@ -0,0 +1,25 @@ | |||
#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/Webhooks/* | |||
- build/azure-devops/buildimages.yml | |||
- build/azure-devops/multiarch.yml | |||
- build/azure-devops/webhooks-api/* | |||
- deploy/k8s/helm/webhooks-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 |
@ -0,0 +1,25 @@ | |||
#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/Web/WebhookClient/* | |||
- build/azure-devops/buildimages.yml | |||
- build/azure-devops/multiarch.yml | |||
- build/azure-devops/webhooks-client/* | |||
- deploy/k8s/helm/webhooks-web/* | |||
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 |
@ -0,0 +1,25 @@ | |||
#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/Web/WebMVC/* | |||
- build/azure-devops/buildimages.yml | |||
- build/azure-devops/multiarch.yml | |||
- build/azure-devops/webmvc/* | |||
- deploy/k8s/helm/webmvc/* | |||
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 |
@ -0,0 +1,27 @@ | |||
variables: | |||
registryEndpoint: eshop-registry | |||
trigger: | |||
branches: | |||
include: | |||
- master | |||
- dev | |||
paths: | |||
include: | |||
- src/BuildingBlocks/* | |||
- src/Web/WebSPA/* | |||
- build/azure-devops/buildimages.yml | |||
- build/azure-devops/multiarch.yml | |||
- build/azure-devops/webspa/* | |||
- deploy/k8s/helm/webspa/* | |||
jobs: | |||
- template: ../buildimages.yaml | |||
parameters: | |||
services: webspa | |||
registryEndpoint: $(registryEndpoint) | |||
helmfrom: $(Build.SourcesDirectory)/deploy/k8s/helm | |||
helmto: $(Build.ArtifactStagingDirectory)/deploy/k8s/helm | |||
- template: ../multiarch.yaml | |||
parameters: | |||
image: webspa | |||
branch: $(Build.SourceBranchName) | |||
registryEndpoint: $(registryEndpoint) |
@ -0,0 +1,25 @@ | |||
#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/Web/WebStatus/* | |||
- build/azure-devops/buildimages.yml | |||
- build/azure-devops/multiarch.yml | |||
- build/azure-devops/webstatus/* | |||
- deploy/k8s/helm/webstatus/* | |||
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 |