From d077926031e776a80e521feab1d789d57a269d22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Tue, 22 Dec 2020 11:13:29 +0100 Subject: [PATCH 001/110] WIP --- .github/workflows/apigws/workflow.yml | 30 ++++++ .github/workflows/basket-api/workflow.yml | 25 +++++ .github/workflows/buildimages.yaml | 94 +++++++++++++++++++ .github/workflows/catalog-api/workflow.yml | 25 +++++ .github/workflows/identity-api/workflow.yml | 25 +++++ .github/workflows/infrastructure/workflow.yml | 27 ++++++ .../mobile-shopping-agg/workflow.yml | 24 +++++ .github/workflows/multiarch.yaml | 25 +++++ .github/workflows/ordering-api/workflow.yml | 27 ++++++ .github/workflows/payment-api/workflow.yml | 25 +++++ .../workflows/web-shopping-agg/workflow.yml | 24 +++++ .github/workflows/webhooks-api/workflow.yml | 25 +++++ .../workflows/webhooks-client/workflow.yml | 25 +++++ .github/workflows/webmvc/workflow.yml | 25 +++++ .github/workflows/webspa/workflow.yml | 27 ++++++ .github/workflows/webstatus/workflow.yml | 25 +++++ 16 files changed, 478 insertions(+) create mode 100644 .github/workflows/apigws/workflow.yml create mode 100644 .github/workflows/basket-api/workflow.yml create mode 100644 .github/workflows/buildimages.yaml create mode 100644 .github/workflows/catalog-api/workflow.yml create mode 100644 .github/workflows/identity-api/workflow.yml create mode 100644 .github/workflows/infrastructure/workflow.yml create mode 100644 .github/workflows/mobile-shopping-agg/workflow.yml create mode 100644 .github/workflows/multiarch.yaml create mode 100644 .github/workflows/ordering-api/workflow.yml create mode 100644 .github/workflows/payment-api/workflow.yml create mode 100644 .github/workflows/web-shopping-agg/workflow.yml create mode 100644 .github/workflows/webhooks-api/workflow.yml create mode 100644 .github/workflows/webhooks-client/workflow.yml create mode 100644 .github/workflows/webmvc/workflow.yml create mode 100644 .github/workflows/webspa/workflow.yml create mode 100644 .github/workflows/webstatus/workflow.yml diff --git a/.github/workflows/apigws/workflow.yml b/.github/workflows/apigws/workflow.yml new file mode 100644 index 000000000..1a75fa280 --- /dev/null +++ b/.github/workflows/apigws/workflow.yml @@ -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 \ No newline at end of file diff --git a/.github/workflows/basket-api/workflow.yml b/.github/workflows/basket-api/workflow.yml new file mode 100644 index 000000000..27e685417 --- /dev/null +++ b/.github/workflows/basket-api/workflow.yml @@ -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 \ No newline at end of file diff --git a/.github/workflows/buildimages.yaml b/.github/workflows/buildimages.yaml new file mode 100644 index 000000000..2e58cad21 --- /dev/null +++ b/.github/workflows/buildimages.yaml @@ -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 diff --git a/.github/workflows/catalog-api/workflow.yml b/.github/workflows/catalog-api/workflow.yml new file mode 100644 index 000000000..86e945388 --- /dev/null +++ b/.github/workflows/catalog-api/workflow.yml @@ -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 \ No newline at end of file diff --git a/.github/workflows/identity-api/workflow.yml b/.github/workflows/identity-api/workflow.yml new file mode 100644 index 000000000..3c6f692e1 --- /dev/null +++ b/.github/workflows/identity-api/workflow.yml @@ -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 \ No newline at end of file diff --git a/.github/workflows/infrastructure/workflow.yml b/.github/workflows/infrastructure/workflow.yml new file mode 100644 index 000000000..50e5a5907 --- /dev/null +++ b/.github/workflows/infrastructure/workflow.yml @@ -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 \ No newline at end of file diff --git a/.github/workflows/mobile-shopping-agg/workflow.yml b/.github/workflows/mobile-shopping-agg/workflow.yml new file mode 100644 index 000000000..791da1360 --- /dev/null +++ b/.github/workflows/mobile-shopping-agg/workflow.yml @@ -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 \ No newline at end of file diff --git a/.github/workflows/multiarch.yaml b/.github/workflows/multiarch.yaml new file mode 100644 index 000000000..7f2dd1ee4 --- /dev/null +++ b/.github/workflows/multiarch.yaml @@ -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 \ No newline at end of file diff --git a/.github/workflows/ordering-api/workflow.yml b/.github/workflows/ordering-api/workflow.yml new file mode 100644 index 000000000..d9bd9061a --- /dev/null +++ b/.github/workflows/ordering-api/workflow.yml @@ -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 \ No newline at end of file diff --git a/.github/workflows/payment-api/workflow.yml b/.github/workflows/payment-api/workflow.yml new file mode 100644 index 000000000..3e3b5c780 --- /dev/null +++ b/.github/workflows/payment-api/workflow.yml @@ -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 \ No newline at end of file diff --git a/.github/workflows/web-shopping-agg/workflow.yml b/.github/workflows/web-shopping-agg/workflow.yml new file mode 100644 index 000000000..670d67b1c --- /dev/null +++ b/.github/workflows/web-shopping-agg/workflow.yml @@ -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 \ No newline at end of file diff --git a/.github/workflows/webhooks-api/workflow.yml b/.github/workflows/webhooks-api/workflow.yml new file mode 100644 index 000000000..652dbc9b4 --- /dev/null +++ b/.github/workflows/webhooks-api/workflow.yml @@ -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 \ No newline at end of file diff --git a/.github/workflows/webhooks-client/workflow.yml b/.github/workflows/webhooks-client/workflow.yml new file mode 100644 index 000000000..839846a24 --- /dev/null +++ b/.github/workflows/webhooks-client/workflow.yml @@ -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 \ No newline at end of file diff --git a/.github/workflows/webmvc/workflow.yml b/.github/workflows/webmvc/workflow.yml new file mode 100644 index 000000000..545d9ffe9 --- /dev/null +++ b/.github/workflows/webmvc/workflow.yml @@ -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 \ No newline at end of file diff --git a/.github/workflows/webspa/workflow.yml b/.github/workflows/webspa/workflow.yml new file mode 100644 index 000000000..aefced84a --- /dev/null +++ b/.github/workflows/webspa/workflow.yml @@ -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) \ No newline at end of file diff --git a/.github/workflows/webstatus/workflow.yml b/.github/workflows/webstatus/workflow.yml new file mode 100644 index 000000000..3e06bf712 --- /dev/null +++ b/.github/workflows/webstatus/workflow.yml @@ -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 \ No newline at end of file From 2aee71504daf8cc12ab89c689025df0280324b43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Tue, 22 Dec 2020 11:18:42 +0100 Subject: [PATCH 002/110] apigws workflow --- .../{apigws/workflow.yml => apigws.yml} | 0 .github/workflows/buildimages.yaml | 94 ------------------- .github/workflows/multiarch.yaml | 25 ----- 3 files changed, 119 deletions(-) rename .github/workflows/{apigws/workflow.yml => apigws.yml} (100%) delete mode 100644 .github/workflows/buildimages.yaml delete mode 100644 .github/workflows/multiarch.yaml diff --git a/.github/workflows/apigws/workflow.yml b/.github/workflows/apigws.yml similarity index 100% rename from .github/workflows/apigws/workflow.yml rename to .github/workflows/apigws.yml diff --git a/.github/workflows/buildimages.yaml b/.github/workflows/buildimages.yaml deleted file mode 100644 index 2e58cad21..000000000 --- a/.github/workflows/buildimages.yaml +++ /dev/null @@ -1,94 +0,0 @@ -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 diff --git a/.github/workflows/multiarch.yaml b/.github/workflows/multiarch.yaml deleted file mode 100644 index 7f2dd1ee4..000000000 --- a/.github/workflows/multiarch.yaml +++ /dev/null @@ -1,25 +0,0 @@ -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 \ No newline at end of file From 003e6b45828e78856d62c50fd6ccfb00d362e8cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Tue, 22 Dec 2020 11:21:02 +0100 Subject: [PATCH 003/110] paths filter --- .github/workflows/apigws.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/apigws.yml b/.github/workflows/apigws.yml index 1a75fa280..e552091f1 100644 --- a/.github/workflows/apigws.yml +++ b/.github/workflows/apigws.yml @@ -1,9 +1,11 @@ +name: "apigws" + on: push: branches: - master - dev - - feature/github-actions + - feature/github-actions paths: - src/ApiGateways/* - .github/workflows/buildimages.yml @@ -13,9 +15,6 @@ on: - 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 From de9706c4504fddbdc908d0355793bc8ffe608276 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Tue, 22 Dec 2020 11:24:07 +0100 Subject: [PATCH 004/110] fix workflow filter path --- .github/workflows/apigws.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/apigws.yml b/.github/workflows/apigws.yml index e552091f1..427e6f111 100644 --- a/.github/workflows/apigws.yml +++ b/.github/workflows/apigws.yml @@ -8,9 +8,7 @@ on: - feature/github-actions paths: - src/ApiGateways/* - - .github/workflows/buildimages.yml - - .github/workflows/multiarch.yml - - .github/workflows/apigws/* + - .github/workflows/* - deploy/k8s/helm/apigwmm/* - deploy/k8s/helm/apigwms/* - deploy/k8s/helm/apigwwm/* From db15e2612854bc54c3d6a495ba799f249db56881 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Tue, 22 Dec 2020 11:28:40 +0100 Subject: [PATCH 005/110] event name --- .github/workflows/apigws.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/apigws.yml b/.github/workflows/apigws.yml index 427e6f111..1e171902b 100644 --- a/.github/workflows/apigws.yml +++ b/.github/workflows/apigws.yml @@ -16,7 +16,7 @@ on: jobs: PublishCharts: runs-on: ubuntu-16.04 - if: ne('${{ env.Build.Reason }}', 'PullRequest') + if: ne('${{ github.event_name }}', 'pull_request') steps: - uses: actions/checkout@v2 - run: Copy '${{ github.workspace }}/deploy/k8s/helm/' '${{ github.workspace }}/deploy/k8s/helm' From 99857aa794577788a2b102728a840117673ceb57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Tue, 22 Dec 2020 11:30:30 +0100 Subject: [PATCH 006/110] copy with ps --- .github/workflows/apigws.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/apigws.yml b/.github/workflows/apigws.yml index 1e171902b..8b72190ca 100644 --- a/.github/workflows/apigws.yml +++ b/.github/workflows/apigws.yml @@ -20,7 +20,7 @@ jobs: steps: - uses: actions/checkout@v2 - run: Copy '${{ github.workspace }}/deploy/k8s/helm/' '${{ github.workspace }}/deploy/k8s/helm' - shell: powershell + shell: pwsh - uses: actions/upload-artifact@v2 with: path: ${{ github.workspace }}/deploy/k8s/helm From 093fbfcfe1962e6069d34814e20fa429cc625df3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Tue, 22 Dec 2020 13:45:30 +0100 Subject: [PATCH 007/110] test basket api workflow --- .github/workflows/apigws.yml | 27 ------- .github/workflows/basket-api.yml | 88 +++++++++++++++++++++++ .github/workflows/basket-api/workflow.yml | 25 ------- 3 files changed, 88 insertions(+), 52 deletions(-) delete mode 100644 .github/workflows/apigws.yml create mode 100644 .github/workflows/basket-api.yml delete mode 100644 .github/workflows/basket-api/workflow.yml diff --git a/.github/workflows/apigws.yml b/.github/workflows/apigws.yml deleted file mode 100644 index 8b72190ca..000000000 --- a/.github/workflows/apigws.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: "apigws" - -on: - push: - branches: - - master - - dev - - feature/github-actions - paths: - - src/ApiGateways/* - - .github/workflows/* - - deploy/k8s/helm/apigwmm/* - - deploy/k8s/helm/apigwms/* - - deploy/k8s/helm/apigwwm/* - - deploy/k8s/helm/apigwws/* -jobs: - PublishCharts: - runs-on: ubuntu-16.04 - if: ne('${{ github.event_name }}', 'pull_request') - steps: - - uses: actions/checkout@v2 - - run: Copy '${{ github.workspace }}/deploy/k8s/helm/' '${{ github.workspace }}/deploy/k8s/helm' - shell: pwsh - - uses: actions/upload-artifact@v2 - with: - path: ${{ github.workspace }}/deploy/k8s/helm - name: helm \ No newline at end of file diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml new file mode 100644 index 000000000..a9e7da19b --- /dev/null +++ b/.github/workflows/basket-api.yml @@ -0,0 +1,88 @@ +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: https://hub.docker.com/repository/docker/borjasanes/eshoponcontainers + services: basket-api + image: basket.api + branch: $(echo ${GITHUB_REF#refs/heads/}) +jobs: + login: + runs-on: ubuntu-latest + steps: + - + name: Login to GitHub Container Registry + uses: docker/login-action@v1 + with: + registry: ${{ env.registryEndpoint }} + username: ${{ secrets.USERNAME }} + password: ${{ secrets.PASSWORD }} + BuildContainersForPR_Linux: + runs-on: ubuntu-16.04 + if: ${{ github.event_name == 'pull_request' }} + steps: + - uses: actions/checkout@v2 + - name: Compose build ${{ env.services }} + run: docker-compose build -f src/docker-compose.yml ${{ env.services }} + shell: bash + env: + TAG: ${{ env.branch }} + REGISTRY: ${{ env.registryEndpoint }} + BuildContainersForPR_Windows: + runs-on: windows-2019 + if: ${{ false }} + # if: ${{ github.event_name == 'pull_request' }} + steps: + - uses: actions/checkout@v2 + - name: Compose build ${{ env.services }} + run: docker-compose build -f src/docker-compose.yml ${{ env.services }} + shell: pwsh + env: + TAG: ${{ env.branch }} + REGISTRY: ${{ env.registryEndpoint }} + PLATFORM: win + NODE_IMAGE: stefanscherer/node-windows:10 + BuildLinux: + runs-on: ubuntu-16.04 + if: ${{ github.event_name != 'pull_request' }} + steps: + - uses: actions/checkout@v2 + name: Compose build ${{ env.services }} + run: docker-compose build -f src/docker-compose.yml ${{ env.services }} + shell: bash + env: + TAG: ${{ env.branch }} + REGISTRY: ${{ env.registryEndpoint }} + - name: Compose push ${{ env.image }} + run: docker-compose push -f src/docker-compose.yml ${{ env.services }}' + shell: bash + env: + TAG: ${{ env.branch }} + REGISTRY: ${{ env.registryEndpoint }} + BuildWindows: + runs-on: windows-2019 + if: ${{ false }} + # if: ${{ github.event_name != 'pull_request' }} + steps: + - uses: actions/checkout@v2 + name: Compose build ${{ env.services }} + run: docker-compose build -f src/docker-compose.yml ${{ env.services }} + shell: pwsh + env: + TAG: ${{ env.branch }} + REGISTRY: ${{ env.registryEndpoint }} + - name: Compose push ${{ env.image }} + run: docker-compose push -f src/docker-compose.yml ${{ env.services }}' + shell: pwsh + env: + TAG: ${{ env.branch }} + REGISTRY: ${{ env.registryEndpoint }} \ No newline at end of file diff --git a/.github/workflows/basket-api/workflow.yml b/.github/workflows/basket-api/workflow.yml deleted file mode 100644 index 27e685417..000000000 --- a/.github/workflows/basket-api/workflow.yml +++ /dev/null @@ -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/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 \ No newline at end of file From cf03967f153ecc44b9c5ada1b8e177f103bcc888 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Tue, 22 Dec 2020 13:49:52 +0100 Subject: [PATCH 008/110] remove uses --- .github/workflows/basket-api.yml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index a9e7da19b..7754613f6 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -19,8 +19,7 @@ jobs: login: runs-on: ubuntu-latest steps: - - - name: Login to GitHub Container Registry + - name: Login to GitHub Container Registry uses: docker/login-action@v1 with: registry: ${{ env.registryEndpoint }} @@ -30,7 +29,6 @@ jobs: runs-on: ubuntu-16.04 if: ${{ github.event_name == 'pull_request' }} steps: - - uses: actions/checkout@v2 - name: Compose build ${{ env.services }} run: docker-compose build -f src/docker-compose.yml ${{ env.services }} shell: bash @@ -42,7 +40,6 @@ jobs: if: ${{ false }} # if: ${{ github.event_name == 'pull_request' }} steps: - - uses: actions/checkout@v2 - name: Compose build ${{ env.services }} run: docker-compose build -f src/docker-compose.yml ${{ env.services }} shell: pwsh @@ -55,8 +52,7 @@ jobs: runs-on: ubuntu-16.04 if: ${{ github.event_name != 'pull_request' }} steps: - - uses: actions/checkout@v2 - name: Compose build ${{ env.services }} + - name: Compose build ${{ env.services }} run: docker-compose build -f src/docker-compose.yml ${{ env.services }} shell: bash env: @@ -73,8 +69,7 @@ jobs: if: ${{ false }} # if: ${{ github.event_name != 'pull_request' }} steps: - - uses: actions/checkout@v2 - name: Compose build ${{ env.services }} + - name: Compose build ${{ env.services }} run: docker-compose build -f src/docker-compose.yml ${{ env.services }} shell: pwsh env: From f1803c62acbba319efc9d2bb596479764f117455 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Tue, 22 Dec 2020 13:53:57 +0100 Subject: [PATCH 009/110] fix path filter --- .github/workflows/basket-api.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 7754613f6..3fa8e8e25 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -1,3 +1,5 @@ +name: basket-api + on: push: branches: @@ -6,10 +8,7 @@ on: 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/* + - .github/workflows/basket-api.yml env: registryEndpoint: https://hub.docker.com/repository/docker/borjasanes/eshoponcontainers services: basket-api From 19806776659bb996d424b4683aee19d29ed1932d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Tue, 22 Dec 2020 13:55:24 +0100 Subject: [PATCH 010/110] add test branch --- .github/workflows/basket-api.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 3fa8e8e25..42d3413f7 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -5,6 +5,7 @@ on: branches: - master - dev + - feature/github-actions paths: - src/BuildingBlocks/* - src/Services/Basket/* From c26c6d9a0548423562d991c41640ede169e9f3cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Tue, 22 Dec 2020 15:13:20 +0100 Subject: [PATCH 011/110] test registry --- .github/workflows/basket-api.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 42d3413f7..25d0cdf70 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -19,10 +19,10 @@ jobs: login: runs-on: ubuntu-latest steps: - - name: Login to GitHub Container Registry + - name: Login to Container Registry uses: docker/login-action@v1 with: - registry: ${{ env.registryEndpoint }} + registry: https://hub.docker.com/repository/docker/borjasanes/eshoponcontainers username: ${{ secrets.USERNAME }} password: ${{ secrets.PASSWORD }} BuildContainersForPR_Linux: From 2233e18c2876c32800ca2fbbb7b225ee0c2b7b36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Tue, 22 Dec 2020 15:20:28 +0100 Subject: [PATCH 012/110] test login with cmd --- .github/workflows/basket-api.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 25d0cdf70..375c315ab 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -16,15 +16,14 @@ env: image: basket.api branch: $(echo ${GITHUB_REF#refs/heads/}) jobs: - login: - runs-on: ubuntu-latest + Login: + runs-on: ubuntu-16.04 steps: - - name: Login to Container Registry - uses: docker/login-action@v1 - with: - registry: https://hub.docker.com/repository/docker/borjasanes/eshoponcontainers - username: ${{ secrets.USERNAME }} - password: ${{ secrets.PASSWORD }} + - name: Login to GitHub Docker Registry + run: docker login ${{ env.registryEndpoint }} --username $DOCKER_USERNAME --password $DOCKER_PASSWORD + env: + DOCKER_USERNAME: ${{ secrets.USERNAME }} + DOCKER_PASSWORD: ${{ secrets.PASSWORD }} BuildContainersForPR_Linux: runs-on: ubuntu-16.04 if: ${{ github.event_name == 'pull_request' }} From a6e45252a970698904ff6ea2fae634005707b2fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Tue, 22 Dec 2020 15:22:11 +0100 Subject: [PATCH 013/110] test cmd --- .github/workflows/basket-api.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 375c315ab..775d9d5bf 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -20,7 +20,7 @@ jobs: runs-on: ubuntu-16.04 steps: - name: Login to GitHub Docker Registry - run: docker login ${{ env.registryEndpoint }} --username $DOCKER_USERNAME --password $DOCKER_PASSWORD + run: docker login ${{ env.registryEndpoint }} -u $DOCKER_USERNAME -p $DOCKER_PASSWORD env: DOCKER_USERNAME: ${{ secrets.USERNAME }} DOCKER_PASSWORD: ${{ secrets.PASSWORD }} From 19d5853fc1b4a43fafed043e7ab34da50bf4c065 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Tue, 22 Dec 2020 15:26:49 +0100 Subject: [PATCH 014/110] test docker login --- .github/workflows/basket-api.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 775d9d5bf..7a9867910 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -19,11 +19,8 @@ jobs: Login: runs-on: ubuntu-16.04 steps: - - name: Login to GitHub Docker Registry - run: docker login ${{ env.registryEndpoint }} -u $DOCKER_USERNAME -p $DOCKER_PASSWORD - env: - DOCKER_USERNAME: ${{ secrets.USERNAME }} - DOCKER_PASSWORD: ${{ secrets.PASSWORD }} + - name: Login to docker registry + run: echo ${{ secrets.PASSWORD }} | docker login -u ${{ secrets.USERNAME }} --password-stdin BuildContainersForPR_Linux: runs-on: ubuntu-16.04 if: ${{ github.event_name == 'pull_request' }} From 7d6dea789a5bad95fa6837082f6479591c57004f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Tue, 22 Dec 2020 15:29:59 +0100 Subject: [PATCH 015/110] test echo --- .github/workflows/basket-api.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 7a9867910..4fa1b9f90 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -20,7 +20,7 @@ jobs: runs-on: ubuntu-16.04 steps: - name: Login to docker registry - run: echo ${{ secrets.PASSWORD }} | docker login -u ${{ secrets.USERNAME }} --password-stdin + run: echo ${{ secrets.USERNAME }} BuildContainersForPR_Linux: runs-on: ubuntu-16.04 if: ${{ github.event_name == 'pull_request' }} From 4dc3473be05b15e6685c2dd6ed64539374e781f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Tue, 22 Dec 2020 15:31:31 +0100 Subject: [PATCH 016/110] echo username --- .github/workflows/basket-api.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 4fa1b9f90..a27cb9c89 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -20,7 +20,8 @@ jobs: runs-on: ubuntu-16.04 steps: - name: Login to docker registry - run: echo ${{ secrets.USERNAME }} + run: echo "username:${{ secrets.USERNAME }}" + shell: bash BuildContainersForPR_Linux: runs-on: ubuntu-16.04 if: ${{ github.event_name == 'pull_request' }} From 585c1290252b4bf011ba514df31502682492653e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Tue, 22 Dec 2020 15:34:04 +0100 Subject: [PATCH 017/110] test login --- .github/workflows/basket-api.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index a27cb9c89..2033656dc 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -20,8 +20,7 @@ jobs: runs-on: ubuntu-16.04 steps: - name: Login to docker registry - run: echo "username:${{ secrets.USERNAME }}" - shell: bash + run: echo $PASSWORD | docker login -u $USERNAME --password-stdin BuildContainersForPR_Linux: runs-on: ubuntu-16.04 if: ${{ github.event_name == 'pull_request' }} From 29f6eca15531863f98b9b182243540f342d55ab2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Tue, 22 Dec 2020 15:40:36 +0100 Subject: [PATCH 018/110] revert login --- .github/workflows/basket-api.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 2033656dc..c910bf690 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -16,11 +16,15 @@ env: image: basket.api branch: $(echo ${GITHUB_REF#refs/heads/}) jobs: - Login: - runs-on: ubuntu-16.04 + login: + runs-on: ubuntu-latest steps: - - name: Login to docker registry - run: echo $PASSWORD | docker login -u $USERNAME --password-stdin + - name: Login to Container Registry + uses: docker/login-action@v1 + with: + registry: ${{ env.registryEndpoint }} + username: ${{ secrets.USERNAME }} + password: ${{ secrets.PASSWORD }} BuildContainersForPR_Linux: runs-on: ubuntu-16.04 if: ${{ github.event_name == 'pull_request' }} From 5aa5fdab9799fccc0ea77c73fa450d10e0fd2bfe Mon Sep 17 00:00:00 2001 From: David Sanz Date: Tue, 22 Dec 2020 16:11:12 +0100 Subject: [PATCH 019/110] test login registry endpoint hub.docker.com --- .github/workflows/basket-api.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index c910bf690..6bfdf4876 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -11,7 +11,7 @@ on: - src/Services/Basket/* - .github/workflows/basket-api.yml env: - registryEndpoint: https://hub.docker.com/repository/docker/borjasanes/eshoponcontainers + registryEndpoint: hub.docker.com services: basket-api image: basket.api branch: $(echo ${GITHUB_REF#refs/heads/}) From 7c2a759d3a2edc14d5971d0fd081472828cfc9b6 Mon Sep 17 00:00:00 2001 From: David Sanz Date: Tue, 22 Dec 2020 16:12:41 +0100 Subject: [PATCH 020/110] Test login without registry variable --- .github/workflows/basket-api.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 6bfdf4876..5bd384c67 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -22,7 +22,7 @@ jobs: - name: Login to Container Registry uses: docker/login-action@v1 with: - registry: ${{ env.registryEndpoint }} + # registry: ${{ env.registryEndpoint }} username: ${{ secrets.USERNAME }} password: ${{ secrets.PASSWORD }} BuildContainersForPR_Linux: From 99ae98902e7a9aaae726b140cadd9f8fecbd5b05 Mon Sep 17 00:00:00 2001 From: David Sanz Date: Tue, 22 Dec 2020 16:14:01 +0100 Subject: [PATCH 021/110] Test login registry empty --- .github/workflows/basket-api.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 5bd384c67..a15e97af1 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -11,7 +11,7 @@ on: - src/Services/Basket/* - .github/workflows/basket-api.yml env: - registryEndpoint: hub.docker.com + registryEndpoint: services: basket-api image: basket.api branch: $(echo ${GITHUB_REF#refs/heads/}) @@ -22,7 +22,7 @@ jobs: - name: Login to Container Registry uses: docker/login-action@v1 with: - # registry: ${{ env.registryEndpoint }} + registry: ${{ env.registryEndpoint }} username: ${{ secrets.USERNAME }} password: ${{ secrets.PASSWORD }} BuildContainersForPR_Linux: From bc16e9ad5772d48462002b5938278501e8a31c00 Mon Sep 17 00:00:00 2001 From: David Sanz Date: Tue, 22 Dec 2020 16:17:31 +0100 Subject: [PATCH 022/110] Fix varible usage in bash --- .github/workflows/basket-api.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index a15e97af1..3eaa2d6c0 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -53,7 +53,7 @@ jobs: if: ${{ github.event_name != 'pull_request' }} steps: - name: Compose build ${{ env.services }} - run: docker-compose build -f src/docker-compose.yml ${{ env.services }} + run: docker-compose build -f src/docker-compose.yml $env.services shell: bash env: TAG: ${{ env.branch }} From b5ce75828d41d4e3229d8c44452b6a52a4a30aa0 Mon Sep 17 00:00:00 2001 From: David Sanz Date: Tue, 22 Dec 2020 16:25:21 +0100 Subject: [PATCH 023/110] Fix docker-compose build args --- .github/workflows/basket-api.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 3eaa2d6c0..3dad575d7 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -53,7 +53,7 @@ jobs: if: ${{ github.event_name != 'pull_request' }} steps: - name: Compose build ${{ env.services }} - run: docker-compose build -f src/docker-compose.yml $env.services + run: echo docker-compose -f src/docker-compose.yml build $env.services shell: bash env: TAG: ${{ env.branch }} From 893fd4e8ffa1809f08685970c29692f24676926c Mon Sep 17 00:00:00 2001 From: David Sanz Date: Tue, 22 Dec 2020 16:30:30 +0100 Subject: [PATCH 024/110] Fix docker-compose push args order --- .github/workflows/basket-api.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 3dad575d7..f92095799 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -53,13 +53,13 @@ jobs: if: ${{ github.event_name != 'pull_request' }} steps: - name: Compose build ${{ env.services }} - run: echo docker-compose -f src/docker-compose.yml build $env.services + run: docker-compose -f src/docker-compose.yml build $env.services shell: bash env: TAG: ${{ env.branch }} REGISTRY: ${{ env.registryEndpoint }} - name: Compose push ${{ env.image }} - run: docker-compose push -f src/docker-compose.yml ${{ env.services }}' + run: docker-compose -f src/docker-compose.yml push ${{ env.services }}' shell: bash env: TAG: ${{ env.branch }} From d8657c479051bab171d2fca988465dcbd0e85ce1 Mon Sep 17 00:00:00 2001 From: David Sanz Date: Tue, 22 Dec 2020 16:42:30 +0100 Subject: [PATCH 025/110] Add checkout --- .github/workflows/basket-api.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index f92095799..1bbca82a7 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -52,6 +52,8 @@ jobs: runs-on: ubuntu-16.04 if: ${{ github.event_name != 'pull_request' }} steps: + - name: 'Checkout Github Action' + uses: actions/checkout@master - name: Compose build ${{ env.services }} run: docker-compose -f src/docker-compose.yml build $env.services shell: bash From 5db1fb65b5a3cd4add22b3cbefda8188442d66a7 Mon Sep 17 00:00:00 2001 From: David Sanz Date: Tue, 22 Dec 2020 16:52:18 +0100 Subject: [PATCH 026/110] Fix variables --- .github/workflows/basket-api.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 1bbca82a7..8f76ff88d 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -55,13 +55,13 @@ jobs: - name: 'Checkout Github Action' uses: actions/checkout@master - name: Compose build ${{ env.services }} - run: docker-compose -f src/docker-compose.yml build $env.services + run: docker-compose -f src/docker-compose.yml build ${{ env.services }} shell: bash env: TAG: ${{ env.branch }} REGISTRY: ${{ env.registryEndpoint }} - name: Compose push ${{ env.image }} - run: docker-compose -f src/docker-compose.yml push ${{ env.services }}' + run: docker-compose -f src/docker-compose.yml push ${{ env.services }} shell: bash env: TAG: ${{ env.branch }} From 88a4cb5624b82a774bd5a22c905cf8e7464e7707 Mon Sep 17 00:00:00 2001 From: David Sanz Date: Tue, 22 Dec 2020 16:56:17 +0100 Subject: [PATCH 027/110] Add login before build --- .github/workflows/basket-api.yml | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 8f76ff88d..08194e25b 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -16,15 +16,15 @@ env: image: basket.api branch: $(echo ${GITHUB_REF#refs/heads/}) jobs: - login: - runs-on: ubuntu-latest - steps: - - name: Login to Container Registry - uses: docker/login-action@v1 - with: - registry: ${{ env.registryEndpoint }} - username: ${{ secrets.USERNAME }} - password: ${{ secrets.PASSWORD }} + # login: + # runs-on: ubuntu-latest + # steps: + # - name: Login to Container Registry + # uses: docker/login-action@v1 + # with: + # registry: ${{ env.registryEndpoint }} + # username: ${{ secrets.USERNAME }} + # password: ${{ secrets.PASSWORD }} BuildContainersForPR_Linux: runs-on: ubuntu-16.04 if: ${{ github.event_name == 'pull_request' }} @@ -54,6 +54,12 @@ jobs: steps: - name: 'Checkout Github Action' uses: actions/checkout@master + - name: Login to Container Registry + uses: docker/login-action@v1 + with: + registry: ${{ env.registryEndpoint }} + username: ${{ secrets.USERNAME }} + password: ${{ secrets.PASSWORD }} - name: Compose build ${{ env.services }} run: docker-compose -f src/docker-compose.yml build ${{ env.services }} shell: bash From 6241b0725d7de400991f7f9ad28b624aada284ce Mon Sep 17 00:00:00 2001 From: David Sanz Date: Tue, 22 Dec 2020 17:09:43 +0100 Subject: [PATCH 028/110] Fix indentation. --- .github/workflows/basket-api.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 08194e25b..eddbd4558 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -55,11 +55,11 @@ jobs: - name: 'Checkout Github Action' uses: actions/checkout@master - name: Login to Container Registry - uses: docker/login-action@v1 - with: - registry: ${{ env.registryEndpoint }} - username: ${{ secrets.USERNAME }} - password: ${{ secrets.PASSWORD }} + uses: docker/login-action@v1 + with: + registry: ${{ env.registryEndpoint }} + username: ${{ secrets.USERNAME }} + password: ${{ secrets.PASSWORD }} - name: Compose build ${{ env.services }} run: docker-compose -f src/docker-compose.yml build ${{ env.services }} shell: bash From 78bf5ee00ac8c3aa862c9803554320f41ce7d1b6 Mon Sep 17 00:00:00 2001 From: David Sanz Date: Tue, 22 Dec 2020 17:12:21 +0100 Subject: [PATCH 029/110] Linux version --- .github/workflows/basket-api.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index eddbd4558..3699eaffe 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -49,7 +49,7 @@ jobs: PLATFORM: win NODE_IMAGE: stefanscherer/node-windows:10 BuildLinux: - runs-on: ubuntu-16.04 + runs-on: ubuntu-latest if: ${{ github.event_name != 'pull_request' }} steps: - name: 'Checkout Github Action' From e4129664eb1c674f770cb6b330dcecb60b75565f Mon Sep 17 00:00:00 2001 From: David Sanz Date: Wed, 23 Dec 2020 10:19:10 +0100 Subject: [PATCH 030/110] Add docker-machine env eval --- .github/workflows/basket-api.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 3699eaffe..494c098bd 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -15,6 +15,7 @@ env: services: basket-api image: basket.api branch: $(echo ${GITHUB_REF#refs/heads/}) + jobs: # login: # runs-on: ubuntu-latest @@ -54,24 +55,39 @@ jobs: steps: - name: 'Checkout Github Action' uses: actions/checkout@master + - name: Login to Container Registry uses: docker/login-action@v1 with: registry: ${{ env.registryEndpoint }} username: ${{ secrets.USERNAME }} password: ${{ secrets.PASSWORD }} + + - name: Docker environment + run: eval $(docker-machine env dev) + shell: bash + + - name: Compose build ${{ env.services }} + run: docker-compose -f src/docker-compose.yml build ${{ env.services }} + shell: bash + env: + TAG: ${{ env.branch }} + REGISTRY: ${{ env.registryEndpoint }} + - name: Compose build ${{ env.services }} run: docker-compose -f src/docker-compose.yml build ${{ env.services }} shell: bash env: TAG: ${{ env.branch }} REGISTRY: ${{ env.registryEndpoint }} + - name: Compose push ${{ env.image }} run: docker-compose -f src/docker-compose.yml push ${{ env.services }} shell: bash env: TAG: ${{ env.branch }} REGISTRY: ${{ env.registryEndpoint }} + BuildWindows: runs-on: windows-2019 if: ${{ false }} From 18fd0897e8e87a7cc25e6c412c5a4bcf2042cec1 Mon Sep 17 00:00:00 2001 From: David Sanz Date: Wed, 23 Dec 2020 10:21:25 +0100 Subject: [PATCH 031/110] Docker-machine env dev --- .github/workflows/basket-api.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 494c098bd..9424363d4 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -64,7 +64,7 @@ jobs: password: ${{ secrets.PASSWORD }} - name: Docker environment - run: eval $(docker-machine env dev) + run: docker-machine env dev shell: bash - name: Compose build ${{ env.services }} From 2331f0cb4ecfea0bc29222f7504e0a0f280e0bb5 Mon Sep 17 00:00:00 2001 From: David Sanz Date: Wed, 23 Dec 2020 10:37:30 +0100 Subject: [PATCH 032/110] sudo --- .github/workflows/basket-api.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 9424363d4..38cfafd76 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -63,12 +63,8 @@ jobs: username: ${{ secrets.USERNAME }} password: ${{ secrets.PASSWORD }} - - name: Docker environment - run: docker-machine env dev - shell: bash - - name: Compose build ${{ env.services }} - run: docker-compose -f src/docker-compose.yml build ${{ env.services }} + run: sudo docker-compose -f src/docker-compose.yml build ${{ env.services }} shell: bash env: TAG: ${{ env.branch }} From 39df5985acd02bd498cdf7487c862bc1ecb71be5 Mon Sep 17 00:00:00 2001 From: David Sanz Date: Wed, 23 Dec 2020 10:42:34 +0100 Subject: [PATCH 033/110] Remove repeated step. --- .github/workflows/basket-api.yml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 38cfafd76..41d181ff1 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -70,15 +70,8 @@ jobs: TAG: ${{ env.branch }} REGISTRY: ${{ env.registryEndpoint }} - - name: Compose build ${{ env.services }} - run: docker-compose -f src/docker-compose.yml build ${{ env.services }} - shell: bash - env: - TAG: ${{ env.branch }} - REGISTRY: ${{ env.registryEndpoint }} - - name: Compose push ${{ env.image }} - run: docker-compose -f src/docker-compose.yml push ${{ env.services }} + run: sudo docker-compose -f src/docker-compose.yml push ${{ env.services }} shell: bash env: TAG: ${{ env.branch }} From 475e07b93c1ebc9c5cf5a01654bd767fd589b1e8 Mon Sep 17 00:00:00 2001 From: David Sanz Date: Wed, 23 Dec 2020 11:22:12 +0100 Subject: [PATCH 034/110] Get git branch name --- .github/workflows/basket-api.yml | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 41d181ff1..1e5a77f3d 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -14,18 +14,9 @@ env: registryEndpoint: services: basket-api image: basket.api - branch: $(echo ${GITHUB_REF#refs/heads/}) + # branch: $(echo ${GITHUB_REF#refs/heads/}) jobs: - # login: - # runs-on: ubuntu-latest - # steps: - # - name: Login to Container Registry - # uses: docker/login-action@v1 - # with: - # registry: ${{ env.registryEndpoint }} - # username: ${{ secrets.USERNAME }} - # password: ${{ secrets.PASSWORD }} BuildContainersForPR_Linux: runs-on: ubuntu-16.04 if: ${{ github.event_name == 'pull_request' }} @@ -63,8 +54,18 @@ jobs: username: ${{ secrets.USERNAME }} password: ${{ secrets.PASSWORD }} + - name: Get branch name + run: | + currentbranch=$(echo ${GITHUB_REF#refs/heads/}) + echo $currentbranch + echo "branch=$currentbranch" >> $GITHUB_ENV + shell: bash + - name: Compose build ${{ env.services }} - run: sudo docker-compose -f src/docker-compose.yml build ${{ env.services }} + run: | + echo "A initial message" + sudo docker-compose -f src/docker-compose.yml build ${{ env.services }} + docker images shell: bash env: TAG: ${{ env.branch }} From 2d6e17f5f1c5ae888ab4225af8571c936fd391fc Mon Sep 17 00:00:00 2001 From: David Sanz Date: Wed, 23 Dec 2020 11:32:44 +0100 Subject: [PATCH 035/110] Fix get branch step --- .github/workflows/basket-api.yml | 35 ++++++++++++++++---------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 1e5a77f3d..08c5eaf33 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -56,27 +56,28 @@ jobs: - name: Get branch name run: | - currentbranch=$(echo ${GITHUB_REF#refs/heads/}) - echo $currentbranch + currentbranch=$(echo ${GITHUB_REF##*/}) + echo "running on $currentbranch" echo "branch=$currentbranch" >> $GITHUB_ENV + printenv shell: bash - - name: Compose build ${{ env.services }} - run: | - echo "A initial message" - sudo docker-compose -f src/docker-compose.yml build ${{ env.services }} - docker images - shell: bash - env: - TAG: ${{ env.branch }} - REGISTRY: ${{ env.registryEndpoint }} + # - name: Compose build ${{ env.services }} + # run: | + # echo "A initial message" + # sudo docker-compose -f src/docker-compose.yml build ${{ env.services }} + # docker images + # shell: bash + # env: + # TAG: ${{ env.branch }} + # REGISTRY: ${{ env.registryEndpoint }} - - name: Compose push ${{ env.image }} - run: sudo docker-compose -f src/docker-compose.yml push ${{ env.services }} - shell: bash - env: - TAG: ${{ env.branch }} - REGISTRY: ${{ env.registryEndpoint }} + # - name: Compose push ${{ env.image }} + # run: sudo docker-compose -f src/docker-compose.yml push ${{ env.services }} + # shell: bash + # env: + # TAG: ${{ env.branch }} + # REGISTRY: ${{ env.registryEndpoint }} BuildWindows: runs-on: windows-2019 From 15ec4911eaf8181fa212f20dc58b81fb80dd5d16 Mon Sep 17 00:00:00 2001 From: David Sanz Date: Wed, 23 Dec 2020 11:37:47 +0100 Subject: [PATCH 036/110] Uncomment steps --- .github/workflows/basket-api.yml | 33 ++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 08c5eaf33..7b29415b4 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -59,25 +59,26 @@ jobs: currentbranch=$(echo ${GITHUB_REF##*/}) echo "running on $currentbranch" echo "branch=$currentbranch" >> $GITHUB_ENV - printenv shell: bash - # - name: Compose build ${{ env.services }} - # run: | - # echo "A initial message" - # sudo docker-compose -f src/docker-compose.yml build ${{ env.services }} - # docker images - # shell: bash - # env: - # TAG: ${{ env.branch }} - # REGISTRY: ${{ env.registryEndpoint }} + - name: Compose build ${{ env.services }} + run: | + echo "Env variables:" + echo "running on $env.branch" + printenv + sudo docker-compose -f src/docker-compose.yml build ${{ env.services }} + docker images + shell: bash + env: + TAG: ${{ env.branch }} + REGISTRY: ${{ env.registryEndpoint }} - # - name: Compose push ${{ env.image }} - # run: sudo docker-compose -f src/docker-compose.yml push ${{ env.services }} - # shell: bash - # env: - # TAG: ${{ env.branch }} - # REGISTRY: ${{ env.registryEndpoint }} + - name: Compose push ${{ env.image }} + run: sudo docker-compose -f src/docker-compose.yml push ${{ env.services }} + shell: bash + env: + TAG: ${{ env.branch }} + REGISTRY: ${{ env.registryEndpoint }} BuildWindows: runs-on: windows-2019 From 256e1034516b2867fea411ea8669f28d0592caa1 Mon Sep 17 00:00:00 2001 From: David Sanz Date: Wed, 23 Dec 2020 11:53:39 +0100 Subject: [PATCH 037/110] add registry --- .github/workflows/basket-api.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 7b29415b4..c8a205b21 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -11,7 +11,7 @@ on: - src/Services/Basket/* - .github/workflows/basket-api.yml env: - registryEndpoint: + registryEndpoint: hub.docker.com/repository/docker/borjasanes/eshoponcontainers services: basket-api image: basket.api # branch: $(echo ${GITHUB_REF#refs/heads/}) @@ -63,8 +63,8 @@ jobs: - name: Compose build ${{ env.services }} run: | + echo "running on ${{ env.branch }}" echo "Env variables:" - echo "running on $env.branch" printenv sudo docker-compose -f src/docker-compose.yml build ${{ env.services }} docker images @@ -73,12 +73,12 @@ jobs: TAG: ${{ env.branch }} REGISTRY: ${{ env.registryEndpoint }} - - name: Compose push ${{ env.image }} - run: sudo docker-compose -f src/docker-compose.yml push ${{ env.services }} - shell: bash - env: - TAG: ${{ env.branch }} - REGISTRY: ${{ env.registryEndpoint }} + # - name: Compose push ${{ env.image }} + # run: sudo docker-compose -f src/docker-compose.yml push ${{ env.services }} + # shell: bash + # env: + # TAG: ${{ env.branch }} + # REGISTRY: ${{ env.registryEndpoint }} BuildWindows: runs-on: windows-2019 From 1687a73c25113f752682484f73889cb2020985b8 Mon Sep 17 00:00:00 2001 From: David Sanz Date: Wed, 23 Dec 2020 11:55:51 +0100 Subject: [PATCH 038/110] Fix login --- .github/workflows/basket-api.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index c8a205b21..ce72b3edf 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -50,7 +50,7 @@ jobs: - name: Login to Container Registry uses: docker/login-action@v1 with: - registry: ${{ env.registryEndpoint }} + registry: username: ${{ secrets.USERNAME }} password: ${{ secrets.PASSWORD }} From 471f3ea6ba948df1b5d90510b197df707b714339 Mon Sep 17 00:00:00 2001 From: David Sanz Date: Wed, 23 Dec 2020 12:14:13 +0100 Subject: [PATCH 039/110] TAG REGISTRY --- .github/workflows/basket-api.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index ce72b3edf..c95138959 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -64,8 +64,8 @@ jobs: - name: Compose build ${{ env.services }} run: | echo "running on ${{ env.branch }}" - echo "Env variables:" - printenv + echo "TAG: ${{ env.TAG }}" + echo "REGISTRY: ${{ env.REGISTRY }}" sudo docker-compose -f src/docker-compose.yml build ${{ env.services }} docker images shell: bash From a020be9a51e5a3578d42c06204c7eaa272f250ae Mon Sep 17 00:00:00 2001 From: David Sanz Date: Wed, 23 Dec 2020 15:42:55 +0100 Subject: [PATCH 040/110] Update env variables. --- .github/workflows/basket-api.yml | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index c95138959..3dfb27b8c 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -59,26 +59,30 @@ jobs: currentbranch=$(echo ${GITHUB_REF##*/}) echo "running on $currentbranch" echo "branch=$currentbranch" >> $GITHUB_ENV + echo "TAG=$currentbranch" >> $GITHUB_ENV shell: bash - - name: Compose build ${{ env.services }} + - name: Compose build ${{ env.services }} run: | echo "running on ${{ env.branch }}" echo "TAG: ${{ env.TAG }}" echo "REGISTRY: ${{ env.REGISTRY }}" - sudo docker-compose -f src/docker-compose.yml build ${{ env.services }} + pwd + ls + sudo docker-compose build ${{ env.services }} docker images + working-directory: ./src shell: bash env: - TAG: ${{ env.branch }} + # TAG: ${{ env.branch }} REGISTRY: ${{ env.registryEndpoint }} - # - name: Compose push ${{ env.image }} - # run: sudo docker-compose -f src/docker-compose.yml push ${{ env.services }} - # shell: bash - # env: - # TAG: ${{ env.branch }} - # REGISTRY: ${{ env.registryEndpoint }} + - name: Compose push ${{ env.image }} + run: sudo docker-compose -f src/docker-compose.yml push ${{ env.services }} + shell: bash + env: + TAG: ${{ env.branch }} + REGISTRY: ${{ env.registryEndpoint }} BuildWindows: runs-on: windows-2019 From 075160f5e9ab4caff038e54e74d35d5fbea17652 Mon Sep 17 00:00:00 2001 From: David Sanz Date: Wed, 23 Dec 2020 16:06:47 +0100 Subject: [PATCH 041/110] export variable --- .github/workflows/basket-api.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 3dfb27b8c..b71a54dfd 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -67,8 +67,7 @@ jobs: echo "running on ${{ env.branch }}" echo "TAG: ${{ env.TAG }}" echo "REGISTRY: ${{ env.REGISTRY }}" - pwd - ls + export TAG=${{ env.TAG }} sudo docker-compose build ${{ env.services }} docker images working-directory: ./src @@ -77,12 +76,12 @@ jobs: # TAG: ${{ env.branch }} REGISTRY: ${{ env.registryEndpoint }} - - name: Compose push ${{ env.image }} - run: sudo docker-compose -f src/docker-compose.yml push ${{ env.services }} - shell: bash - env: - TAG: ${{ env.branch }} - REGISTRY: ${{ env.registryEndpoint }} + # - name: Compose push ${{ env.image }} + # run: sudo docker-compose -f src/docker-compose.yml push ${{ env.services }} + # shell: bash + # env: + # TAG: ${{ env.branch }} + # REGISTRY: ${{ env.registryEndpoint }} BuildWindows: runs-on: windows-2019 From 1e8b8db099a9e4010a043fcab076abe4f15acfaf Mon Sep 17 00:00:00 2001 From: David Sanz Date: Wed, 23 Dec 2020 16:21:14 +0100 Subject: [PATCH 042/110] Test variable asignation --- .github/workflows/basket-api.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index b71a54dfd..3f4b40cc8 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -67,7 +67,7 @@ jobs: echo "running on ${{ env.branch }}" echo "TAG: ${{ env.TAG }}" echo "REGISTRY: ${{ env.REGISTRY }}" - export TAG=${{ env.TAG }} + sudo export TAG=experimental sudo docker-compose build ${{ env.services }} docker images working-directory: ./src From e2734c45edf1374e40a436399c91876ee904459d Mon Sep 17 00:00:00 2001 From: David Sanz Date: Wed, 23 Dec 2020 16:23:09 +0100 Subject: [PATCH 043/110] Fix export commnad --- .github/workflows/basket-api.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 3f4b40cc8..e5f04e415 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -67,7 +67,7 @@ jobs: echo "running on ${{ env.branch }}" echo "TAG: ${{ env.TAG }}" echo "REGISTRY: ${{ env.REGISTRY }}" - sudo export TAG=experimental + export TAG=experimental sudo docker-compose build ${{ env.services }} docker images working-directory: ./src From efafcfed92776384a9272ba412759e0836b10c05 Mon Sep 17 00:00:00 2001 From: David Sanz Date: Wed, 23 Dec 2020 16:28:42 +0100 Subject: [PATCH 044/110] Fix exporting variables when sudo is used --- .github/workflows/basket-api.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index e5f04e415..b509c1901 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -68,7 +68,7 @@ jobs: echo "TAG: ${{ env.TAG }}" echo "REGISTRY: ${{ env.REGISTRY }}" export TAG=experimental - sudo docker-compose build ${{ env.services }} + sudo -E docker-compose build ${{ env.services }} docker images working-directory: ./src shell: bash From 85a92164482e1bfdfe2171b4b0b828e02b1bddbc Mon Sep 17 00:00:00 2001 From: David Sanz Date: Wed, 23 Dec 2020 16:34:32 +0100 Subject: [PATCH 045/110] Remove comments --- .github/workflows/basket-api.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index b509c1901..544c29534 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -64,10 +64,6 @@ jobs: - name: Compose build ${{ env.services }} run: | - echo "running on ${{ env.branch }}" - echo "TAG: ${{ env.TAG }}" - echo "REGISTRY: ${{ env.REGISTRY }}" - export TAG=experimental sudo -E docker-compose build ${{ env.services }} docker images working-directory: ./src From 7e09f821ec4fac9f4878ec037c935b4ca5c1b6b3 Mon Sep 17 00:00:00 2001 From: David Sanz Date: Wed, 23 Dec 2020 16:42:52 +0100 Subject: [PATCH 046/110] Enable push image --- .github/workflows/basket-api.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 544c29534..47f8168fa 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -72,12 +72,10 @@ jobs: # TAG: ${{ env.branch }} REGISTRY: ${{ env.registryEndpoint }} - # - name: Compose push ${{ env.image }} - # run: sudo docker-compose -f src/docker-compose.yml push ${{ env.services }} - # shell: bash - # env: - # TAG: ${{ env.branch }} - # REGISTRY: ${{ env.registryEndpoint }} + - name: Compose push ${{ env.image }} + run: sudo -E docker-compose -f src/docker-compose.yml push ${{ env.services }} + working-directory: ./src + shell: bash BuildWindows: runs-on: windows-2019 From d5a37475563525b65aab2f158a5f913edfcc229c Mon Sep 17 00:00:00 2001 From: David Sanz Date: Wed, 23 Dec 2020 16:47:52 +0100 Subject: [PATCH 047/110] Fix docker-file path for push step. --- .github/workflows/basket-api.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 47f8168fa..e467ebea8 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -73,7 +73,7 @@ jobs: REGISTRY: ${{ env.registryEndpoint }} - name: Compose push ${{ env.image }} - run: sudo -E docker-compose -f src/docker-compose.yml push ${{ env.services }} + run: sudo -E docker-compose push ${{ env.services }} working-directory: ./src shell: bash From e437d941466e96500500a66700e5809caca4b010 Mon Sep 17 00:00:00 2001 From: David Sanz Date: Wed, 23 Dec 2020 16:54:19 +0100 Subject: [PATCH 048/110] Add TAG variable to push step. --- .github/workflows/basket-api.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index e467ebea8..c58461cb2 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -73,9 +73,14 @@ jobs: REGISTRY: ${{ env.registryEndpoint }} - name: Compose push ${{ env.image }} - run: sudo -E docker-compose push ${{ env.services }} + run: | + docker images + sudo -E docker-compose push ${{ env.services }} working-directory: ./src shell: bash + env: + # TAG: ${{ env.branch }} + REGISTRY: ${{ env.registryEndpoint }} BuildWindows: runs-on: windows-2019 From 669accc07cbb792f8a6a0ac543a982a0cc6e109a Mon Sep 17 00:00:00 2001 From: David Sanz Date: Wed, 23 Dec 2020 17:00:46 +0100 Subject: [PATCH 049/110] Update registry path --- .github/workflows/basket-api.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index c58461cb2..0202298bc 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -11,7 +11,7 @@ on: - src/Services/Basket/* - .github/workflows/basket-api.yml env: - registryEndpoint: hub.docker.com/repository/docker/borjasanes/eshoponcontainers + registryEndpoint: borjasanes/eshoponcontainers services: basket-api image: basket.api # branch: $(echo ${GITHUB_REF#refs/heads/}) From 473c4a5f100e2a4177b9c579960545bcfdee4f4a Mon Sep 17 00:00:00 2001 From: David Sanz Date: Wed, 23 Dec 2020 17:16:03 +0100 Subject: [PATCH 050/110] Change docker login step. --- .github/workflows/basket-api.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 0202298bc..ab8f07b21 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -47,12 +47,15 @@ jobs: - name: 'Checkout Github Action' uses: actions/checkout@master - - name: Login to Container Registry - uses: docker/login-action@v1 - with: - registry: - username: ${{ secrets.USERNAME }} - password: ${{ secrets.PASSWORD }} + # - name: Login to Container Registry + # uses: docker/login-action@v1 + # with: + # registry: + # username: ${{ secrets.USERNAME }} + # password: ${{ secrets.PASSWORD }} + - name: Login to DockerHub Registry + run: echo ${{ secrets.PASSWORD }} | sudo docker login -u ${{ secrets.USERNAME }} --password-stdin + shell: bash - name: Get branch name run: | From c9052e992778689b5b25a02e3ac6701ff09c9cb4 Mon Sep 17 00:00:00 2001 From: David Sanz Date: Wed, 23 Dec 2020 17:23:05 +0100 Subject: [PATCH 051/110] Try sudo docker login in push step. --- .github/workflows/basket-api.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index ab8f07b21..90811c196 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -78,6 +78,7 @@ jobs: - name: Compose push ${{ env.image }} run: | docker images + echo ${{ secrets.PASSWORD }} | sudo docker login -u ${{ secrets.USERNAME }} --password-stdin sudo -E docker-compose push ${{ env.services }} working-directory: ./src shell: bash From 2bdd108799c073518c26599b652aa91c501b0744 Mon Sep 17 00:00:00 2001 From: David Sanz Date: Wed, 23 Dec 2020 17:33:41 +0100 Subject: [PATCH 052/110] Update registry value. --- .github/workflows/basket-api.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 90811c196..6217baae1 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -11,7 +11,7 @@ on: - src/Services/Basket/* - .github/workflows/basket-api.yml env: - registryEndpoint: borjasanes/eshoponcontainers + registryEndpoint: borjasanes services: basket-api image: basket.api # branch: $(echo ${GITHUB_REF#refs/heads/}) From 650f712f3856392f6394366205fcf8e674b349ec Mon Sep 17 00:00:00 2001 From: David Sanz Date: Wed, 23 Dec 2020 17:46:09 +0100 Subject: [PATCH 053/110] Change login method --- .github/workflows/basket-api.yml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 6217baae1..4a8429006 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -47,15 +47,15 @@ jobs: - name: 'Checkout Github Action' uses: actions/checkout@master - # - name: Login to Container Registry - # uses: docker/login-action@v1 - # with: - # registry: - # username: ${{ secrets.USERNAME }} - # password: ${{ secrets.PASSWORD }} - - name: Login to DockerHub Registry - run: echo ${{ secrets.PASSWORD }} | sudo docker login -u ${{ secrets.USERNAME }} --password-stdin - shell: bash + - name: Login to Container Registry + uses: docker/login-action@v1 + with: + registry: + username: ${{ secrets.USERNAME }} + password: ${{ secrets.PASSWORD }} + # - name: Login to DockerHub Registry + # run: echo ${{ secrets.PASSWORD }} | sudo docker login -u ${{ secrets.USERNAME }} --password-stdin + # shell: bash - name: Get branch name run: | @@ -78,7 +78,6 @@ jobs: - name: Compose push ${{ env.image }} run: | docker images - echo ${{ secrets.PASSWORD }} | sudo docker login -u ${{ secrets.USERNAME }} --password-stdin sudo -E docker-compose push ${{ env.services }} working-directory: ./src shell: bash From c805c7efc3cbe04eff6ad5accdea30a3a2214d2a Mon Sep 17 00:00:00 2001 From: David Sanz Date: Wed, 23 Dec 2020 18:07:12 +0100 Subject: [PATCH 054/110] Refactor yaml --- .github/workflows/basket-api.yml | 58 ++++++++++++++------------------ 1 file changed, 26 insertions(+), 32 deletions(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 4a8429006..187905e0a 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -11,33 +11,31 @@ on: - src/Services/Basket/* - .github/workflows/basket-api.yml env: - registryEndpoint: borjasanes - services: basket-api - image: basket.api - # branch: $(echo ${GITHUB_REF#refs/heads/}) + REGISTRY_ENDPOINT: borjasanes + SERVICES: basket-api jobs: BuildContainersForPR_Linux: runs-on: ubuntu-16.04 if: ${{ github.event_name == 'pull_request' }} steps: - - name: Compose build ${{ env.services }} - run: docker-compose build -f src/docker-compose.yml ${{ env.services }} + - name: Compose build ${{ env.SERVICES }} + run: docker-compose build -f src/docker-compose.yml ${{ env.SERVICES }} shell: bash env: TAG: ${{ env.branch }} - REGISTRY: ${{ env.registryEndpoint }} + REGISTRY: ${{ env.REGISTRY_ENDPOINT }} BuildContainersForPR_Windows: runs-on: windows-2019 if: ${{ false }} # if: ${{ github.event_name == 'pull_request' }} steps: - - name: Compose build ${{ env.services }} - run: docker-compose build -f src/docker-compose.yml ${{ env.services }} + - name: Compose build ${{ env.SERVICES }} + run: docker-compose build -f src/docker-compose.yml ${{ env.SERVICES }} shell: pwsh env: TAG: ${{ env.branch }} - REGISTRY: ${{ env.registryEndpoint }} + REGISTRY: ${{ env.REGISTRY_ENDPOINT }} PLATFORM: win NODE_IMAGE: stefanscherer/node-windows:10 BuildLinux: @@ -53,52 +51,48 @@ jobs: registry: username: ${{ secrets.USERNAME }} password: ${{ secrets.PASSWORD }} - # - name: Login to DockerHub Registry - # run: echo ${{ secrets.PASSWORD }} | sudo docker login -u ${{ secrets.USERNAME }} --password-stdin - # shell: bash - - name: Get branch name + - name: Set branch name as env variable run: | currentbranch=$(echo ${GITHUB_REF##*/}) echo "running on $currentbranch" - echo "branch=$currentbranch" >> $GITHUB_ENV - echo "TAG=$currentbranch" >> $GITHUB_ENV + echo "BRANCH=$currentbranch" >> $GITHUB_ENV shell: bash - - name: Compose build ${{ env.services }} + - name: Compose build ${{ env.SERVICES }} run: | - sudo -E docker-compose build ${{ env.services }} + sudo -E docker-compose build ${{ env.SERVICES }} docker images working-directory: ./src shell: bash env: - # TAG: ${{ env.branch }} - REGISTRY: ${{ env.registryEndpoint }} + TAG: ${{ env.BRANCH }} + REGISTRY: ${{ env.REGISTRY_ENDPOINT }} - - name: Compose push ${{ env.image }} + - name: Compose push ${{ env.SERVICES }} run: | docker images - sudo -E docker-compose push ${{ env.services }} + sudo -E docker-compose push ${{ env.SERVICES }} working-directory: ./src shell: bash env: - # TAG: ${{ env.branch }} - REGISTRY: ${{ env.registryEndpoint }} + TAG: ${{ env.BRANCH }} + REGISTRY: ${{ env.REGISTRY_ENDPOINT }} BuildWindows: runs-on: windows-2019 if: ${{ false }} # if: ${{ github.event_name != 'pull_request' }} steps: - - name: Compose build ${{ env.services }} - run: docker-compose build -f src/docker-compose.yml ${{ env.services }} + - name: Compose build ${{ env.SERVICES }} + run: docker-compose build -f src/docker-compose.yml ${{ env.SERVICES }} shell: pwsh env: - TAG: ${{ env.branch }} - REGISTRY: ${{ env.registryEndpoint }} - - name: Compose push ${{ env.image }} - run: docker-compose push -f src/docker-compose.yml ${{ env.services }}' + TAG: ${{ env.BRANCH }} + REGISTRY: ${{ env.REGISTRY_ENDPOINT }} + - name: Compose push ${{ env.SERVICES }} + run: docker-compose push -f src/docker-compose.yml ${{ env.SERVICES }}' shell: pwsh env: - TAG: ${{ env.branch }} - REGISTRY: ${{ env.registryEndpoint }} \ No newline at end of file + TAG: ${{ env.BRANCH }} + REGISTRY: ${{ env.REGISTRY_ENDPOINT }} \ No newline at end of file From 02929d8acfad146042528c2c95b2b365913109dc Mon Sep 17 00:00:00 2001 From: David Sanz Date: Wed, 23 Dec 2020 18:19:20 +0100 Subject: [PATCH 055/110] Remove debug traces --- .github/workflows/basket-api.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 187905e0a..9eaeb09d2 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -60,9 +60,7 @@ jobs: shell: bash - name: Compose build ${{ env.SERVICES }} - run: | - sudo -E docker-compose build ${{ env.SERVICES }} - docker images + run: sudo -E docker-compose build ${{ env.SERVICES }} working-directory: ./src shell: bash env: @@ -70,9 +68,7 @@ jobs: REGISTRY: ${{ env.REGISTRY_ENDPOINT }} - name: Compose push ${{ env.SERVICES }} - run: | - docker images - sudo -E docker-compose push ${{ env.SERVICES }} + run: sudo -E docker-compose push ${{ env.SERVICES }} working-directory: ./src shell: bash env: From b9160d0389c0f0a32d66c9ec0aca8609e1ceabe7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Thu, 24 Dec 2020 10:08:56 +0100 Subject: [PATCH 056/110] test docker hub host --- .github/workflows/basket-api.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 9eaeb09d2..f091c79e5 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -10,8 +10,14 @@ on: - src/BuildingBlocks/* - src/Services/Basket/* - .github/workflows/basket-api.yml + + pull_request: + branches: + - master + - dev env: REGISTRY_ENDPOINT: borjasanes + REGISTRY_HOST: hub.docker.com SERVICES: basket-api jobs: @@ -48,7 +54,7 @@ jobs: - name: Login to Container Registry uses: docker/login-action@v1 with: - registry: + registry: ${{ env.REGISTRY_HOST }} username: ${{ secrets.USERNAME }} password: ${{ secrets.PASSWORD }} From 856fc1dfbbd32f16937f1cb931a7dd98583ed11e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Thu, 24 Dec 2020 10:13:21 +0100 Subject: [PATCH 057/110] modify registry host url --- .github/workflows/basket-api.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index f091c79e5..9d4cbc49b 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -17,7 +17,7 @@ on: - dev env: REGISTRY_ENDPOINT: borjasanes - REGISTRY_HOST: hub.docker.com + REGISTRY_HOST: registry.hub.docker.com SERVICES: basket-api jobs: From f089a74033d8ead5f61e9c0318b65e96a863e281 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Thu, 24 Dec 2020 10:26:20 +0100 Subject: [PATCH 058/110] host url --- .github/workflows/basket-api.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 9d4cbc49b..28e33f915 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -17,7 +17,7 @@ on: - dev env: REGISTRY_ENDPOINT: borjasanes - REGISTRY_HOST: registry.hub.docker.com + REGISTRY_HOST: index.docker.io/v1 SERVICES: basket-api jobs: From 34483d353b14cd14fa1e54dfd2a33e5c70ecb1bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Thu, 24 Dec 2020 10:30:19 +0100 Subject: [PATCH 059/110] test docker io --- .github/workflows/basket-api.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 28e33f915..53e17927e 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -17,7 +17,7 @@ on: - dev env: REGISTRY_ENDPOINT: borjasanes - REGISTRY_HOST: index.docker.io/v1 + REGISTRY_HOST: docker.io SERVICES: basket-api jobs: From dfac8cfdc4246efa8ff7a9627a9f19b128515def Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Thu, 24 Dec 2020 10:44:05 +0100 Subject: [PATCH 060/110] build on pr --- .github/workflows/basket-api.yml | 33 ++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 53e17927e..7caeaadaf 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -16,21 +16,37 @@ on: - master - dev env: - REGISTRY_ENDPOINT: borjasanes + REGISTRY_ENDPOINT: eshop REGISTRY_HOST: docker.io SERVICES: basket-api jobs: + + GetImageTag: + runs-on: ubuntu-latest + steps: + - name: Set branch name as env variable + run: | + currentbranch=$(echo ${GITHUB_REF##*/}) + echo "running on $currentbranch" + echo "BRANCH=$currentbranch" >> $GITHUB_ENV + shell: bash + BuildContainersForPR_Linux: - runs-on: ubuntu-16.04 - if: ${{ github.event_name == 'pull_request' }} + runs-on: ubuntu-latest + #if: ${{ github.event_name == 'pull_request' }} steps: + - name: 'Checkout Github Action' + uses: actions/checkout@master + - name: Compose build ${{ env.SERVICES }} - run: docker-compose build -f src/docker-compose.yml ${{ env.SERVICES }} + run: sudo -E docker-compose build ${{ env.SERVICES }} + working-directory: ./src shell: bash env: - TAG: ${{ env.branch }} + TAG: ${{ env.BRANCH }} REGISTRY: ${{ env.REGISTRY_ENDPOINT }} + BuildContainersForPR_Windows: runs-on: windows-2019 if: ${{ false }} @@ -58,13 +74,6 @@ jobs: 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.SERVICES }} run: sudo -E docker-compose build ${{ env.SERVICES }} working-directory: ./src From 528b6271f748027d59c54ffbab07edad4ea882b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Thu, 24 Dec 2020 11:03:52 +0100 Subject: [PATCH 061/110] test windows build --- .github/workflows/basket-api.yml | 38 ++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 7caeaadaf..f41894b7e 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -16,25 +16,15 @@ on: - master - dev env: - REGISTRY_ENDPOINT: eshop + REGISTRY_ENDPOINT: borjasanes REGISTRY_HOST: docker.io SERVICES: basket-api jobs: - GetImageTag: - runs-on: ubuntu-latest - steps: - - name: Set branch name as env variable - run: | - currentbranch=$(echo ${GITHUB_REF##*/}) - echo "running on $currentbranch" - echo "BRANCH=$currentbranch" >> $GITHUB_ENV - shell: bash - BuildContainersForPR_Linux: runs-on: ubuntu-latest - #if: ${{ github.event_name == 'pull_request' }} + if: ${{ github.event_name == 'pull_request' }} steps: - name: 'Checkout Github Action' uses: actions/checkout@master @@ -74,6 +64,13 @@ jobs: 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.SERVICES }} run: sudo -E docker-compose build ${{ env.SERVICES }} working-directory: ./src @@ -92,15 +89,28 @@ jobs: BuildWindows: runs-on: windows-2019 - if: ${{ false }} - # if: ${{ github.event_name != 'pull_request' }} + # if: ${{ false }} + if: ${{ github.event_name != 'pull_request' }} steps: + + - name: Login to Container Registry + uses: docker/login-action@v1 + with: + registry: ${{ env.REGISTRY_HOST }} + username: ${{ secrets.USERNAME }} + password: ${{ secrets.PASSWORD }} + + - name: Set branch name as env variable + shell: pwsh + run: echo $Env:GITHUB_REF -replace "refs/heads/", "" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + - name: Compose build ${{ env.SERVICES }} run: docker-compose build -f src/docker-compose.yml ${{ env.SERVICES }} shell: pwsh env: TAG: ${{ env.BRANCH }} REGISTRY: ${{ env.REGISTRY_ENDPOINT }} + - name: Compose push ${{ env.SERVICES }} run: docker-compose push -f src/docker-compose.yml ${{ env.SERVICES }}' shell: pwsh From b49d4601393e3d040357e8c278e739b84d48932a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Thu, 24 Dec 2020 11:07:11 +0100 Subject: [PATCH 062/110] test login windows --- .github/workflows/basket-api.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index f41894b7e..f04f50ea4 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -94,9 +94,9 @@ jobs: steps: - name: Login to Container Registry - uses: docker/login-action@v1 + uses: azure/docker-login@v1 with: - registry: ${{ env.REGISTRY_HOST }} + login-server: ${{ env.REGISTRY_HOST }} username: ${{ secrets.USERNAME }} password: ${{ secrets.PASSWORD }} From bd4b3057fef1fd4c72bf68ae071f2e13f37754a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Thu, 24 Dec 2020 11:10:09 +0100 Subject: [PATCH 063/110] test branch name windows --- .github/workflows/basket-api.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index f04f50ea4..3a394fcf3 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -102,7 +102,7 @@ jobs: - name: Set branch name as env variable shell: pwsh - run: echo $Env:GITHUB_REF -replace "refs/heads/", "" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + run: echo ("::set-env name=BRANCH::" + $env:GITHUB_REF.replace('refs/heads/', '')) - name: Compose build ${{ env.SERVICES }} run: docker-compose build -f src/docker-compose.yml ${{ env.SERVICES }} From bd6d0a3878b92eda8d0cee4479d17e6fc0afe701 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Thu, 24 Dec 2020 11:15:51 +0100 Subject: [PATCH 064/110] test windows --- .github/workflows/basket-api.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 3a394fcf3..c79ae4f13 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -102,7 +102,7 @@ jobs: - name: Set branch name as env variable shell: pwsh - run: echo ("::set-env name=BRANCH::" + $env:GITHUB_REF.replace('refs/heads/', '')) + run: echo "BRANCH=$env:GITHUB_REF.replace('refs/heads/', '')" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - name: Compose build ${{ env.SERVICES }} run: docker-compose build -f src/docker-compose.yml ${{ env.SERVICES }} From cdab9fda56eb68b3ce71aee605bfa67c34d8a9db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Thu, 24 Dec 2020 11:22:19 +0100 Subject: [PATCH 065/110] test replace branch name pwsh --- .github/workflows/basket-api.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index c79ae4f13..7f00cb74e 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -102,7 +102,7 @@ jobs: - 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 + run: echo "BRANCH=$($env:GITHUB_REF.replace('refs/heads/', ''))" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - name: Compose build ${{ env.SERVICES }} run: docker-compose build -f src/docker-compose.yml ${{ env.SERVICES }} From fd28ac8597e709f338ba94834f7c9f049c21f529 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Thu, 24 Dec 2020 11:27:50 +0100 Subject: [PATCH 066/110] test --- .github/workflows/basket-api.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 7f00cb74e..283584189 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -102,7 +102,7 @@ jobs: - 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 + run: echo "BRANCH=$($env:GITHUB_REF.replace('refs/heads/feature', ''))" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - name: Compose build ${{ env.SERVICES }} run: docker-compose build -f src/docker-compose.yml ${{ env.SERVICES }} From 7d53c2e198441f49c12a3417f2f7cb7d9878ff1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Thu, 24 Dec 2020 11:28:01 +0100 Subject: [PATCH 067/110] replace feature --- .github/workflows/basket-api.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 283584189..6d6c5f201 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -102,7 +102,7 @@ jobs: - name: Set branch name as env variable shell: pwsh - run: echo "BRANCH=$($env:GITHUB_REF.replace('refs/heads/feature', ''))" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + run: echo "BRANCH=$($env:GITHUB_REF.replace('refs/heads/feature/', ''))" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - name: Compose build ${{ env.SERVICES }} run: docker-compose build -f src/docker-compose.yml ${{ env.SERVICES }} From 8606921ff2d678339b98f917d2ad06ff0cb50737 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Thu, 24 Dec 2020 11:32:10 +0100 Subject: [PATCH 068/110] working dir and build order cmd --- .github/workflows/basket-api.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 6d6c5f201..158793318 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -43,7 +43,8 @@ jobs: # if: ${{ github.event_name == 'pull_request' }} steps: - name: Compose build ${{ env.SERVICES }} - run: docker-compose build -f src/docker-compose.yml ${{ env.SERVICES }} + run: docker-compose build ${{ env.SERVICES }} + working-directory: ./src shell: pwsh env: TAG: ${{ env.branch }} @@ -102,17 +103,19 @@ jobs: - name: Set branch name as env variable shell: pwsh - run: echo "BRANCH=$($env:GITHUB_REF.replace('refs/heads/feature/', ''))" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + run: echo "BRANCH=$($env:GITHUB_REF.replace('refs/heads/', ''))" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - name: Compose build ${{ env.SERVICES }} - run: docker-compose build -f src/docker-compose.yml ${{ env.SERVICES }} + run: docker-compose build ${{ env.SERVICES }} + working-directory: ./src shell: pwsh env: TAG: ${{ env.BRANCH }} REGISTRY: ${{ env.REGISTRY_ENDPOINT }} - name: Compose push ${{ env.SERVICES }} - run: docker-compose push -f src/docker-compose.yml ${{ env.SERVICES }}' + run: docker-compose push ${{ env.SERVICES }}' + working-directory: ./src shell: pwsh env: TAG: ${{ env.BRANCH }} From 8abe05d7f40a684c989ffcc3a29a0b3323ea2cd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Thu, 24 Dec 2020 11:35:36 +0100 Subject: [PATCH 069/110] work dir path --- .github/workflows/basket-api.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 158793318..78c30f031 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -107,7 +107,7 @@ jobs: - name: Compose build ${{ env.SERVICES }} run: docker-compose build ${{ env.SERVICES }} - working-directory: ./src + working-directory: src shell: pwsh env: TAG: ${{ env.BRANCH }} @@ -115,7 +115,7 @@ jobs: - name: Compose push ${{ env.SERVICES }} run: docker-compose push ${{ env.SERVICES }}' - working-directory: ./src + working-directory: src shell: pwsh env: TAG: ${{ env.BRANCH }} From 9f84e5a3e97ee065e28dcbe5b04d43ea49e51ea0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Thu, 24 Dec 2020 11:36:43 +0100 Subject: [PATCH 070/110] work dir --- .github/workflows/basket-api.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 78c30f031..3d94d1c04 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -43,8 +43,7 @@ jobs: # if: ${{ github.event_name == 'pull_request' }} steps: - name: Compose build ${{ env.SERVICES }} - run: docker-compose build ${{ env.SERVICES }} - working-directory: ./src + run: docker-compose -f src/docker-compose.yml build ${{ env.SERVICES }} shell: pwsh env: TAG: ${{ env.branch }} @@ -106,16 +105,15 @@ jobs: run: echo "BRANCH=$($env:GITHUB_REF.replace('refs/heads/', ''))" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - name: Compose build ${{ env.SERVICES }} - run: docker-compose build ${{ env.SERVICES }} - working-directory: src + run: docker-compose -f src/docker-compose.yml build ${{ env.SERVICES }} + working-directory: ./src shell: pwsh env: TAG: ${{ env.BRANCH }} REGISTRY: ${{ env.REGISTRY_ENDPOINT }} - name: Compose push ${{ env.SERVICES }} - run: docker-compose push ${{ env.SERVICES }}' - working-directory: src + run: docker-compose -f src/docker-compose.yml push ${{ env.SERVICES }}' shell: pwsh env: TAG: ${{ env.BRANCH }} From c4a304b5f924b32f7351778efdfc98e2921a3600 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Thu, 24 Dec 2020 11:38:53 +0100 Subject: [PATCH 071/110] checkout windows --- .github/workflows/basket-api.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 3d94d1c04..f18f3ba87 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -42,8 +42,12 @@ jobs: if: ${{ false }} # if: ${{ github.event_name == 'pull_request' }} steps: + - name: 'Checkout Github Action' + uses: actions/checkout@master + - name: Compose build ${{ env.SERVICES }} - run: docker-compose -f src/docker-compose.yml build ${{ env.SERVICES }} + run: docker-compose build ${{ env.SERVICES }} + working-directory: ./src shell: pwsh env: TAG: ${{ env.branch }} @@ -92,6 +96,8 @@ jobs: # 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 @@ -105,7 +111,7 @@ jobs: run: echo "BRANCH=$($env:GITHUB_REF.replace('refs/heads/', ''))" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - name: Compose build ${{ env.SERVICES }} - run: docker-compose -f src/docker-compose.yml build ${{ env.SERVICES }} + run: docker-compose build ${{ env.SERVICES }} working-directory: ./src shell: pwsh env: @@ -113,7 +119,8 @@ jobs: REGISTRY: ${{ env.REGISTRY_ENDPOINT }} - name: Compose push ${{ env.SERVICES }} - run: docker-compose -f src/docker-compose.yml push ${{ env.SERVICES }}' + run: docker-compose push ${{ env.SERVICES }}' + working-directory: ./src shell: pwsh env: TAG: ${{ env.BRANCH }} From 220bc58289109af15ab00c2208d12c9f77eec933 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Thu, 24 Dec 2020 12:12:15 +0100 Subject: [PATCH 072/110] test multiarch step --- .github/workflows/basket-api.yml | 40 +++++++++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 3 deletions(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index f18f3ba87..f3a3c03d3 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -93,8 +93,8 @@ jobs: BuildWindows: runs-on: windows-2019 - # if: ${{ false }} - if: ${{ github.event_name != 'pull_request' }} + if: ${{ false }} + # if: ${{ github.event_name != 'pull_request' }} steps: - name: 'Checkout Github Action' uses: actions/checkout@master @@ -124,4 +124,38 @@ jobs: shell: pwsh env: TAG: ${{ env.BRANCH }} - REGISTRY: ${{ env.REGISTRY_ENDPOINT }} \ No newline at end of file + REGISTRY: ${{ env.REGISTRY_ENDPOINT }} + + BuildMultiarch: + runs-on: ubuntu-latest + needs: + - BuildLinux + if: ${{ github.event_name != 'pull_request' }} + steps: + - uses: actions/checkout@v2 + + - name: Login to Container Registry + uses: docker/login-action@v1 + with: + registry: ${{ env.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: 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.REGISTRY_ENDPOINT }}/${{ env.SERVICES }}:${{ env.BRANCH }} ${{ env.REGISTRY_ENDPOINT }}/${{ env.SERVICES }}:linux-${{ env.BRANCH }} + docker --config ~/.docker manifest create ${{ env.REGISTRY_ENDPOINT }}/${{ env.SERVICES }}:latest ${{ env.REGISTRY_ENDPOINT }}/${{ env.SERVICES }}:linux-latest + docker --config ~/.docker manifest push ${{ env.REGISTRY_ENDPOINT }}/${{ env.SERVICES }}:${{ env.BRANCH }} + docker --config ~/.docker manifest push ${{ env.REGISTRY_ENDPOINT }}/${{ env.SERVICES }}:latest + shell: bash + \ No newline at end of file From 80f47361c9c8e90648085476e8269a31f5f44450 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Thu, 24 Dec 2020 12:33:45 +0100 Subject: [PATCH 073/110] test docker config env --- .github/workflows/basket-api.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index f3a3c03d3..e69d822f1 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -127,6 +127,8 @@ jobs: REGISTRY: ${{ env.REGISTRY_ENDPOINT }} BuildMultiarch: + env: + DOCKER_CONFIG: $HOME/.docker runs-on: ubuntu-latest needs: - BuildLinux From 8dea71aba296426f825522130e0d65bd0ea86d0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Thu, 24 Dec 2020 12:40:36 +0100 Subject: [PATCH 074/110] multiarch --- .github/workflows/basket-api.yml | 52 +++++++++----------------------- 1 file changed, 15 insertions(+), 37 deletions(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index e69d822f1..952549706 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -54,7 +54,10 @@ jobs: REGISTRY: ${{ env.REGISTRY_ENDPOINT }} PLATFORM: win NODE_IMAGE: stefanscherer/node-windows:10 + BuildLinux: + env: + DOCKER_CONFIG: $HOME/.docker runs-on: ubuntu-latest if: ${{ github.event_name != 'pull_request' }} steps: @@ -91,6 +94,17 @@ jobs: TAG: ${{ env.BRANCH }} REGISTRY: ${{ env.REGISTRY_ENDPOINT }} + - 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.REGISTRY_ENDPOINT }}/${{ env.SERVICES }}:${{ env.BRANCH }} ${{ env.REGISTRY_ENDPOINT }}/${{ env.SERVICES }}:linux-${{ env.BRANCH }} + docker --config ~/.docker manifest create ${{ env.REGISTRY_ENDPOINT }}/${{ env.SERVICES }}:latest ${{ env.REGISTRY_ENDPOINT }}/${{ env.SERVICES }}:linux-latest + docker --config ~/.docker manifest push ${{ env.REGISTRY_ENDPOINT }}/${{ env.SERVICES }}:${{ env.BRANCH }} + docker --config ~/.docker manifest push ${{ env.REGISTRY_ENDPOINT }}/${{ env.SERVICES }}:latest + shell: bash + BuildWindows: runs-on: windows-2019 if: ${{ false }} @@ -124,40 +138,4 @@ jobs: shell: pwsh env: TAG: ${{ env.BRANCH }} - REGISTRY: ${{ env.REGISTRY_ENDPOINT }} - - BuildMultiarch: - env: - DOCKER_CONFIG: $HOME/.docker - runs-on: ubuntu-latest - needs: - - BuildLinux - if: ${{ github.event_name != 'pull_request' }} - steps: - - uses: actions/checkout@v2 - - - name: Login to Container Registry - uses: docker/login-action@v1 - with: - registry: ${{ env.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: 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.REGISTRY_ENDPOINT }}/${{ env.SERVICES }}:${{ env.BRANCH }} ${{ env.REGISTRY_ENDPOINT }}/${{ env.SERVICES }}:linux-${{ env.BRANCH }} - docker --config ~/.docker manifest create ${{ env.REGISTRY_ENDPOINT }}/${{ env.SERVICES }}:latest ${{ env.REGISTRY_ENDPOINT }}/${{ env.SERVICES }}:linux-latest - docker --config ~/.docker manifest push ${{ env.REGISTRY_ENDPOINT }}/${{ env.SERVICES }}:${{ env.BRANCH }} - docker --config ~/.docker manifest push ${{ env.REGISTRY_ENDPOINT }}/${{ env.SERVICES }}:latest - shell: bash - \ No newline at end of file + REGISTRY: ${{ env.REGISTRY_ENDPOINT }} \ No newline at end of file From 884748ff53b60cb268273d4d69a082f2633ac1e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Thu, 24 Dec 2020 12:50:42 +0100 Subject: [PATCH 075/110] test WIP --- .github/workflows/basket-api.yml | 79 +++++++++++++++++++++----------- 1 file changed, 51 insertions(+), 28 deletions(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 952549706..3c7aa8621 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -18,7 +18,8 @@ on: env: REGISTRY_ENDPOINT: borjasanes REGISTRY_HOST: docker.io - SERVICES: basket-api + SERVICE: basket-api + IMAGE: basket.api jobs: @@ -29,8 +30,8 @@ jobs: - name: 'Checkout Github Action' uses: actions/checkout@master - - name: Compose build ${{ env.SERVICES }} - run: sudo -E docker-compose build ${{ env.SERVICES }} + - name: Compose build ${{ env.SERVICE }} + run: sudo -E docker-compose build ${{ env.SERVICE }} working-directory: ./src shell: bash env: @@ -45,8 +46,8 @@ jobs: - name: 'Checkout Github Action' uses: actions/checkout@master - - name: Compose build ${{ env.SERVICES }} - run: docker-compose build ${{ env.SERVICES }} + - name: Compose build ${{ env.SERVICE }} + run: docker-compose build ${{ env.SERVICE }} working-directory: ./src shell: pwsh env: @@ -54,10 +55,7 @@ jobs: REGISTRY: ${{ env.REGISTRY_ENDPOINT }} PLATFORM: win NODE_IMAGE: stefanscherer/node-windows:10 - BuildLinux: - env: - DOCKER_CONFIG: $HOME/.docker runs-on: ubuntu-latest if: ${{ github.event_name != 'pull_request' }} steps: @@ -78,33 +76,22 @@ jobs: echo "BRANCH=$currentbranch" >> $GITHUB_ENV shell: bash - - name: Compose build ${{ env.SERVICES }} - run: sudo -E docker-compose build ${{ env.SERVICES }} + - name: Compose build ${{ env.SERVICE }} + run: sudo -E docker-compose build ${{ env.SERVICE }} working-directory: ./src shell: bash env: TAG: ${{ env.BRANCH }} REGISTRY: ${{ env.REGISTRY_ENDPOINT }} - - name: Compose push ${{ env.SERVICES }} - run: sudo -E docker-compose push ${{ env.SERVICES }} + - name: Compose push ${{ env.SERVICE }} + run: sudo -E docker-compose push ${{ env.SERVICE }} working-directory: ./src shell: bash env: TAG: ${{ env.BRANCH }} REGISTRY: ${{ env.REGISTRY_ENDPOINT }} - - 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.REGISTRY_ENDPOINT }}/${{ env.SERVICES }}:${{ env.BRANCH }} ${{ env.REGISTRY_ENDPOINT }}/${{ env.SERVICES }}:linux-${{ env.BRANCH }} - docker --config ~/.docker manifest create ${{ env.REGISTRY_ENDPOINT }}/${{ env.SERVICES }}:latest ${{ env.REGISTRY_ENDPOINT }}/${{ env.SERVICES }}:linux-latest - docker --config ~/.docker manifest push ${{ env.REGISTRY_ENDPOINT }}/${{ env.SERVICES }}:${{ env.BRANCH }} - docker --config ~/.docker manifest push ${{ env.REGISTRY_ENDPOINT }}/${{ env.SERVICES }}:latest - shell: bash - BuildWindows: runs-on: windows-2019 if: ${{ false }} @@ -124,18 +111,54 @@ jobs: shell: pwsh run: echo "BRANCH=$($env:GITHUB_REF.replace('refs/heads/', ''))" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - - name: Compose build ${{ env.SERVICES }} - run: docker-compose build ${{ env.SERVICES }} + - name: Compose build ${{ env.SERVICE }} + run: docker-compose build ${{ env.SERVICE }} working-directory: ./src shell: pwsh env: TAG: ${{ env.BRANCH }} REGISTRY: ${{ env.REGISTRY_ENDPOINT }} - - name: Compose push ${{ env.SERVICES }} - run: docker-compose push ${{ env.SERVICES }}' + - name: Compose push ${{ env.SERVICE }} + run: docker-compose push ${{ env.SERVICE }}' working-directory: ./src shell: pwsh env: TAG: ${{ env.BRANCH }} - REGISTRY: ${{ env.REGISTRY_ENDPOINT }} \ No newline at end of file + REGISTRY: ${{ env.REGISTRY_ENDPOINT }} + + BuildMultiarch: + env: + DOCKER_CONFIG: $HOME/.docker + runs-on: ubuntu-latest + needs: + - BuildLinux + if: ${{ github.event_name != 'pull_request' }} + steps: + - uses: actions/checkout@v2 + + - name: Login to Container Registry + uses: docker/login-action@v1 + with: + registry: ${{ env.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: 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.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-${{ env.BRANCH }} + docker --config ~/.docker manifest create ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:latest ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-latest + docker --config ~/.docker manifest push ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} + docker --config ~/.docker manifest push ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:latest + shell: bash + \ No newline at end of file From ac51d01582e922ef2ddf60814284cf143cd797ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Thu, 24 Dec 2020 12:51:31 +0100 Subject: [PATCH 076/110] WIP --- .github/workflows/basket-api.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 3c7aa8621..607f929fb 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -156,6 +156,7 @@ jobs: mkdir -p ~/.docker sed '$ s/.$//' $DOCKER_CONFIG/config.json > ~/.docker/config.json echo ',"experimental": "enabled" }' >> ~/.docker/config.json + docker images docker --config ~/.docker manifest create ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-${{ env.BRANCH }} docker --config ~/.docker manifest create ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:latest ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-latest docker --config ~/.docker manifest push ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} From 9d1a7b52580ac98b6f2c7e9d3cb1d2c780badcb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Thu, 24 Dec 2020 12:56:21 +0100 Subject: [PATCH 077/110] test --- .github/workflows/basket-api.yml | 49 +++++++++----------------------- 1 file changed, 14 insertions(+), 35 deletions(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 607f929fb..bfba21b72 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -92,6 +92,19 @@ jobs: TAG: ${{ env.BRANCH }} REGISTRY: ${{ env.REGISTRY_ENDPOINT }} + - 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.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-${{ env.BRANCH }} + docker --config ~/.docker manifest create ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:latest ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-latest + docker --config ~/.docker manifest push ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} + docker --config ~/.docker manifest push ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:latest + shell: bash + env: + DOCKER_CONFIG: $HOME/.docker + BuildWindows: runs-on: windows-2019 if: ${{ false }} @@ -126,40 +139,6 @@ jobs: env: TAG: ${{ env.BRANCH }} REGISTRY: ${{ env.REGISTRY_ENDPOINT }} - - BuildMultiarch: - env: - DOCKER_CONFIG: $HOME/.docker - runs-on: ubuntu-latest - needs: - - BuildLinux - if: ${{ github.event_name != 'pull_request' }} - steps: - - uses: actions/checkout@v2 - - - name: Login to Container Registry - uses: docker/login-action@v1 - with: - registry: ${{ env.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: Create multiarch manifest - run: | - mkdir -p ~/.docker - sed '$ s/.$//' $DOCKER_CONFIG/config.json > ~/.docker/config.json - echo ',"experimental": "enabled" }' >> ~/.docker/config.json - docker images - docker --config ~/.docker manifest create ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-${{ env.BRANCH }} - docker --config ~/.docker manifest create ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:latest ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-latest - docker --config ~/.docker manifest push ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} - docker --config ~/.docker manifest push ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:latest - shell: bash + \ No newline at end of file From ef2d9f9fa54fb2337599300440c53aed4ab6b17e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Thu, 24 Dec 2020 13:02:08 +0100 Subject: [PATCH 078/110] test sudo --- .github/workflows/basket-api.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index bfba21b72..3d482c8f8 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -95,15 +95,13 @@ jobs: - name: Create multiarch manifest run: | mkdir -p ~/.docker - sed '$ s/.$//' $DOCKER_CONFIG/config.json > ~/.docker/config.json + sudo -E sed '$ s/.$//' $DOCKER_CONFIG/config.json > ~/.docker/config.json echo ',"experimental": "enabled" }' >> ~/.docker/config.json docker --config ~/.docker manifest create ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-${{ env.BRANCH }} docker --config ~/.docker manifest create ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:latest ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-latest docker --config ~/.docker manifest push ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} docker --config ~/.docker manifest push ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:latest shell: bash - env: - DOCKER_CONFIG: $HOME/.docker BuildWindows: runs-on: windows-2019 From 64d4365081f63ec4695751a17e10fcd03f2b953c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Thu, 24 Dec 2020 13:07:38 +0100 Subject: [PATCH 079/110] test docker dir --- .github/workflows/basket-api.yml | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 3d482c8f8..5091046e3 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -56,6 +56,8 @@ jobs: PLATFORM: win NODE_IMAGE: stefanscherer/node-windows:10 BuildLinux: + env: + DOCKER_CONFIG: $HOME/.docker runs-on: ubuntu-latest if: ${{ github.event_name != 'pull_request' }} steps: @@ -76,26 +78,26 @@ jobs: 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: ${{ env.REGISTRY_ENDPOINT }} + # - name: Compose build ${{ env.SERVICE }} + # run: sudo -E docker-compose build ${{ env.SERVICE }} + # working-directory: ./src + # shell: bash + # env: + # TAG: ${{ env.BRANCH }} + # REGISTRY: ${{ env.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: ${{ env.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: ${{ env.REGISTRY_ENDPOINT }} - name: Create multiarch manifest run: | mkdir -p ~/.docker - sudo -E sed '$ s/.$//' $DOCKER_CONFIG/config.json > ~/.docker/config.json + sed '$ s/.$//' $DOCKER_CONFIG/config.json > ~/.docker/config.json echo ',"experimental": "enabled" }' >> ~/.docker/config.json docker --config ~/.docker manifest create ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-${{ env.BRANCH }} docker --config ~/.docker manifest create ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:latest ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-latest From f42e729754b619535946f1030089c32845f0223c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Thu, 24 Dec 2020 13:08:54 +0100 Subject: [PATCH 080/110] test --- .github/workflows/basket-api.yml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 5091046e3..826608f24 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -78,21 +78,21 @@ jobs: 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: ${{ env.REGISTRY_ENDPOINT }} + - name: Compose build ${{ env.SERVICE }} + run: sudo -E docker-compose build ${{ env.SERVICE }} + working-directory: ./src + shell: bash + env: + TAG: ${{ env.BRANCH }} + REGISTRY: ${{ env.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: ${{ env.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: ${{ env.REGISTRY_ENDPOINT }} - name: Create multiarch manifest run: | From b2149b5e7ba6b7c47e40b7a5f6ae3c02e8cc4c0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Thu, 24 Dec 2020 13:12:28 +0100 Subject: [PATCH 081/110] WIP --- .github/workflows/basket-api.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 826608f24..81a78367e 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -56,8 +56,6 @@ jobs: PLATFORM: win NODE_IMAGE: stefanscherer/node-windows:10 BuildLinux: - env: - DOCKER_CONFIG: $HOME/.docker runs-on: ubuntu-latest if: ${{ github.event_name != 'pull_request' }} steps: @@ -97,7 +95,7 @@ jobs: - name: Create multiarch manifest run: | mkdir -p ~/.docker - sed '$ s/.$//' $DOCKER_CONFIG/config.json > ~/.docker/config.json + sed '$ s/.$//' $HOME/.docker/config.json > ~/.docker/config.json echo ',"experimental": "enabled" }' >> ~/.docker/config.json docker --config ~/.docker manifest create ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-${{ env.BRANCH }} docker --config ~/.docker manifest create ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:latest ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-latest From 495dd8cb6d7c82bc4ca338b1f2d4d5a4ff770588 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Thu, 24 Dec 2020 13:23:18 +0100 Subject: [PATCH 082/110] test --- .github/workflows/basket-api.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 81a78367e..27f9f4c16 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -95,6 +95,7 @@ jobs: - name: Create multiarch manifest run: | mkdir -p ~/.docker + cat $HOME/.docker/config.json sed '$ s/.$//' $HOME/.docker/config.json > ~/.docker/config.json echo ',"experimental": "enabled" }' >> ~/.docker/config.json docker --config ~/.docker manifest create ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-${{ env.BRANCH }} From 0a9a9e6f3d880368bbf0235568f6c1de059ceacd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Thu, 24 Dec 2020 13:33:42 +0100 Subject: [PATCH 083/110] test --- .github/workflows/basket-api.yml | 36 +++++++++++++++++++------------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 27f9f4c16..0880e85de 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -76,28 +76,34 @@ jobs: 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: ${{ env.REGISTRY_ENDPOINT }} + # - name: Compose build ${{ env.SERVICE }} + # run: sudo -E docker-compose build ${{ env.SERVICE }} + # working-directory: ./src + # shell: bash + # env: + # TAG: ${{ env.BRANCH }} + # REGISTRY: ${{ env.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: ${{ env.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: ${{ env.REGISTRY_ENDPOINT }} - name: Create multiarch manifest run: | mkdir -p ~/.docker + echo "PRINT 1" cat $HOME/.docker/config.json + echo "END PRINT 1" + echo "PRINT 2" sed '$ s/.$//' $HOME/.docker/config.json > ~/.docker/config.json - echo ',"experimental": "enabled" }' >> ~/.docker/config.json + echo "END PRINT 2" + echo "PRINT 3" + echo ', "experimental": "enabled" }' >> ~/.docker/config.json + echo "END PRINT 3" docker --config ~/.docker manifest create ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-${{ env.BRANCH }} docker --config ~/.docker manifest create ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:latest ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-latest docker --config ~/.docker manifest push ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} From 6970eebfaf3895a17ede826f393a5b976b757c80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Thu, 24 Dec 2020 13:36:33 +0100 Subject: [PATCH 084/110] test --- .github/workflows/basket-api.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 0880e85de..5ac08078d 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -97,13 +97,12 @@ jobs: mkdir -p ~/.docker echo "PRINT 1" cat $HOME/.docker/config.json - echo "END PRINT 1" - echo "PRINT 2" + echo "STEP 2" sed '$ s/.$//' $HOME/.docker/config.json > ~/.docker/config.json - echo "END PRINT 2" - echo "PRINT 3" + echo "STEP 3" echo ', "experimental": "enabled" }' >> ~/.docker/config.json - echo "END PRINT 3" + echo "STEP 4" + cat ~/.docker/config.json docker --config ~/.docker manifest create ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-${{ env.BRANCH }} docker --config ~/.docker manifest create ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:latest ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-latest docker --config ~/.docker manifest push ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} From 6bbaa01c0328ffb31ee6f0f07ffd60d2e29ddd1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Thu, 24 Dec 2020 13:39:22 +0100 Subject: [PATCH 085/110] test --- .github/workflows/basket-api.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 5ac08078d..f9de030fa 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -99,6 +99,8 @@ jobs: cat $HOME/.docker/config.json echo "STEP 2" sed '$ s/.$//' $HOME/.docker/config.json > ~/.docker/config.json + echo "STEP 2.5" + cat ~/.docker/config.json echo "STEP 3" echo ', "experimental": "enabled" }' >> ~/.docker/config.json echo "STEP 4" From c8b53ad4335754834bea66b9324b8d1a3cc372e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Thu, 24 Dec 2020 13:43:08 +0100 Subject: [PATCH 086/110] test --- .github/workflows/basket-api.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index f9de030fa..5d2b56ed8 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -98,7 +98,7 @@ jobs: echo "PRINT 1" cat $HOME/.docker/config.json echo "STEP 2" - sed '$ s/.$//' $HOME/.docker/config.json > ~/.docker/config.json + sed '$ s/.$//' $HOME/.docker/config.json >> ~/.docker/config.json echo "STEP 2.5" cat ~/.docker/config.json echo "STEP 3" From 4663b416f52c3450e952bccd41534d41e3e2b42c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Thu, 24 Dec 2020 13:46:42 +0100 Subject: [PATCH 087/110] test --- .github/workflows/basket-api.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 5d2b56ed8..f9de030fa 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -98,7 +98,7 @@ jobs: echo "PRINT 1" cat $HOME/.docker/config.json echo "STEP 2" - sed '$ s/.$//' $HOME/.docker/config.json >> ~/.docker/config.json + sed '$ s/.$//' $HOME/.docker/config.json > ~/.docker/config.json echo "STEP 2.5" cat ~/.docker/config.json echo "STEP 3" From 259f9ec97a0237a7a19b96b02769f3fb2a8efd85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Thu, 24 Dec 2020 13:48:36 +0100 Subject: [PATCH 088/110] test --- .github/workflows/basket-api.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index f9de030fa..2a4844949 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -95,15 +95,9 @@ jobs: - name: Create multiarch manifest run: | mkdir -p ~/.docker - echo "PRINT 1" - cat $HOME/.docker/config.json - echo "STEP 2" - sed '$ s/.$//' $HOME/.docker/config.json > ~/.docker/config.json - echo "STEP 2.5" - cat ~/.docker/config.json - echo "STEP 3" + echo $HOME/.docker/config.json > ~/.docker/config.json + sed '$ s/.$//' ~/.docker/config.json echo ', "experimental": "enabled" }' >> ~/.docker/config.json - echo "STEP 4" cat ~/.docker/config.json docker --config ~/.docker manifest create ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-${{ env.BRANCH }} docker --config ~/.docker manifest create ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:latest ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-latest From d8c5d072e7dbccaff5d06da4f4acf2a690f167cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Thu, 24 Dec 2020 13:50:18 +0100 Subject: [PATCH 089/110] test --- .github/workflows/basket-api.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 2a4844949..ecb409b3d 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -96,6 +96,7 @@ jobs: run: | mkdir -p ~/.docker echo $HOME/.docker/config.json > ~/.docker/config.json + cat ~/.docker/config.json sed '$ s/.$//' ~/.docker/config.json echo ', "experimental": "enabled" }' >> ~/.docker/config.json cat ~/.docker/config.json From 40d7a162d90be39bc7a124fab0aad823a3feabdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Thu, 24 Dec 2020 13:52:11 +0100 Subject: [PATCH 090/110] test --- .github/workflows/basket-api.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index ecb409b3d..472952ae7 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -95,7 +95,7 @@ jobs: - name: Create multiarch manifest run: | mkdir -p ~/.docker - echo $HOME/.docker/config.json > ~/.docker/config.json + sudo echo $HOME/.docker/config.json > ~/.docker/config.json cat ~/.docker/config.json sed '$ s/.$//' ~/.docker/config.json echo ', "experimental": "enabled" }' >> ~/.docker/config.json From b7354fc085b18a1aad889f11925c68f6fe7453e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Thu, 24 Dec 2020 13:53:26 +0100 Subject: [PATCH 091/110] test cp --- .github/workflows/basket-api.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 472952ae7..6147501bc 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -95,7 +95,7 @@ jobs: - name: Create multiarch manifest run: | mkdir -p ~/.docker - sudo echo $HOME/.docker/config.json > ~/.docker/config.json + cp $HOME/.docker/config.json ~/.docker/config.json cat ~/.docker/config.json sed '$ s/.$//' ~/.docker/config.json echo ', "experimental": "enabled" }' >> ~/.docker/config.json From 913241ead6a688c3a97c1b00f638c0dcff17adb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Thu, 24 Dec 2020 13:56:40 +0100 Subject: [PATCH 092/110] test --- .github/workflows/basket-api.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 6147501bc..9997ad7ed 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -95,11 +95,12 @@ jobs: - name: Create multiarch manifest run: | mkdir -p ~/.docker - cp $HOME/.docker/config.json ~/.docker/config.json - cat ~/.docker/config.json - sed '$ s/.$//' ~/.docker/config.json - echo ', "experimental": "enabled" }' >> ~/.docker/config.json + cp $HOME/.docker/config.json ~/.docker/config-tmp.json + cat ~/.docker/config-tmp.json + sed '$ s/.$//' ~/.docker/config-tmp.json + echo ', "experimental": "enabled" }' >> ~/.docker/config-tmp.json cat ~/.docker/config.json + cp ~/.docker/config-tmp.json $HOME/.docker/config.json docker --config ~/.docker manifest create ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-${{ env.BRANCH }} docker --config ~/.docker manifest create ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:latest ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-latest docker --config ~/.docker manifest push ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} From 288760c43de28cd51c82e290b5b4939dfa916bef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Thu, 24 Dec 2020 14:32:45 +0100 Subject: [PATCH 093/110] test --- .github/workflows/basket-api.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 9997ad7ed..f16616e75 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -94,13 +94,7 @@ jobs: - name: Create multiarch manifest run: | - mkdir -p ~/.docker - cp $HOME/.docker/config.json ~/.docker/config-tmp.json - cat ~/.docker/config-tmp.json - sed '$ s/.$//' ~/.docker/config-tmp.json - echo ', "experimental": "enabled" }' >> ~/.docker/config-tmp.json - cat ~/.docker/config.json - cp ~/.docker/config-tmp.json $HOME/.docker/config.json + echo '{"experimental": true}' | sudo tee -a /etc/docker/daemon.json docker --config ~/.docker manifest create ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-${{ env.BRANCH }} docker --config ~/.docker manifest create ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:latest ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-latest docker --config ~/.docker manifest push ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} From 9c149681bc07e8c0e54809dd3b8838e91bd0620e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Thu, 24 Dec 2020 14:36:49 +0100 Subject: [PATCH 094/110] test --- .github/workflows/basket-api.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index f16616e75..d28255bf8 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -94,7 +94,10 @@ jobs: - name: Create multiarch manifest run: | - echo '{"experimental": true}' | sudo tee -a /etc/docker/daemon.json + 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 --config ~/.docker manifest create ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-${{ env.BRANCH }} docker --config ~/.docker manifest create ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:latest ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-latest docker --config ~/.docker manifest push ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} From 442a0f4b715115fca0719c1193544444a16dbfc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Thu, 24 Dec 2020 14:38:09 +0100 Subject: [PATCH 095/110] test --- .github/workflows/basket-api.yml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index d28255bf8..831221da8 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -76,21 +76,21 @@ jobs: 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: ${{ env.REGISTRY_ENDPOINT }} + - name: Compose build ${{ env.SERVICE }} + run: sudo -E docker-compose build ${{ env.SERVICE }} + working-directory: ./src + shell: bash + env: + TAG: ${{ env.BRANCH }} + REGISTRY: ${{ env.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: ${{ env.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: ${{ env.REGISTRY_ENDPOINT }} - name: Create multiarch manifest run: | From b68b6253e1468a34714c9332185a3192850763fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Thu, 24 Dec 2020 14:48:50 +0100 Subject: [PATCH 096/110] final --- .github/workflows/basket-api.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 831221da8..796b2566b 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -46,15 +46,14 @@ jobs: - name: 'Checkout Github Action' uses: actions/checkout@master - - name: Compose build ${{ env.SERVICE }} + - name: Compose build ${{ env.SERVICE }} run: docker-compose build ${{ env.SERVICE }} working-directory: ./src shell: pwsh env: - TAG: ${{ env.branch }} + TAG: ${{ env.BRANCH }} REGISTRY: ${{ env.REGISTRY_ENDPOINT }} - PLATFORM: win - NODE_IMAGE: stefanscherer/node-windows:10 + BuildLinux: runs-on: ubuntu-latest if: ${{ github.event_name != 'pull_request' }} @@ -99,9 +98,7 @@ jobs: echo $'{\n "experimental": "enabled"\n}' | sudo tee ~/.docker/config.json sudo service docker restart docker --config ~/.docker manifest create ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-${{ env.BRANCH }} - docker --config ~/.docker manifest create ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:latest ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-latest docker --config ~/.docker manifest push ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} - docker --config ~/.docker manifest push ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:latest shell: bash BuildWindows: From 230c706086faa3ea64cd0d6d820914547a64f4f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Thu, 24 Dec 2020 15:00:24 +0100 Subject: [PATCH 097/110] test --- .github/workflows/basket-api.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 796b2566b..c1ffdf4f8 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -39,6 +39,7 @@ jobs: REGISTRY: ${{ env.REGISTRY_ENDPOINT }} BuildContainersForPR_Windows: + runs-on: windows-2019 if: ${{ false }} # if: ${{ github.event_name == 'pull_request' }} @@ -93,10 +94,11 @@ jobs: - name: Create multiarch manifest 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 sed '$ s/.$//' ~/.docker/config.json + echo ',"experimental": "enabled" }' >> ~/.docker/config.json sudo service docker restart + cat ~/.docker/config.json docker --config ~/.docker manifest create ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-${{ env.BRANCH }} docker --config ~/.docker manifest push ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} shell: bash From be461f24b42e9695f337b638aa59a3149835f49f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Thu, 24 Dec 2020 15:00:34 +0100 Subject: [PATCH 098/110] test --- .github/workflows/basket-api.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index c1ffdf4f8..c1b1b8d1f 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -94,7 +94,6 @@ jobs: - name: Create multiarch manifest run: | - mkdir -p ~/.docker sudo sed '$ s/.$//' ~/.docker/config.json echo ',"experimental": "enabled" }' >> ~/.docker/config.json sudo service docker restart From 0fb4f46de3c6a86d08ea9a4710ef5c686e0c2825 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Thu, 24 Dec 2020 15:09:34 +0100 Subject: [PATCH 099/110] test --- .github/workflows/basket-api.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index c1b1b8d1f..b519205dc 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -62,6 +62,15 @@ jobs: - 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: @@ -94,10 +103,6 @@ jobs: - name: Create multiarch manifest run: | - sudo sed '$ s/.$//' ~/.docker/config.json - echo ',"experimental": "enabled" }' >> ~/.docker/config.json - sudo service docker restart - cat ~/.docker/config.json docker --config ~/.docker manifest create ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-${{ env.BRANCH }} docker --config ~/.docker manifest push ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} shell: bash From 0cba9fc72fcbab6d200e2860d75f53cece50ea53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Thu, 24 Dec 2020 15:24:41 +0100 Subject: [PATCH 100/110] final version --- .github/workflows/basket-api.yml | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index b519205dc..fac87c086 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -16,8 +16,6 @@ on: - master - dev env: - REGISTRY_ENDPOINT: borjasanes - REGISTRY_HOST: docker.io SERVICE: basket-api IMAGE: basket.api @@ -36,7 +34,7 @@ jobs: shell: bash env: TAG: ${{ env.BRANCH }} - REGISTRY: ${{ env.REGISTRY_ENDPOINT }} + REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} BuildContainersForPR_Windows: @@ -53,7 +51,7 @@ jobs: shell: pwsh env: TAG: ${{ env.BRANCH }} - REGISTRY: ${{ env.REGISTRY_ENDPOINT }} + REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} BuildLinux: runs-on: ubuntu-latest @@ -74,7 +72,7 @@ jobs: - name: Login to Container Registry uses: docker/login-action@v1 with: - registry: ${{ env.REGISTRY_HOST }} + registry: ${{ secrets.REGISTRY_HOST }} username: ${{ secrets.USERNAME }} password: ${{ secrets.PASSWORD }} @@ -91,7 +89,7 @@ jobs: shell: bash env: TAG: ${{ env.BRANCH }} - REGISTRY: ${{ env.REGISTRY_ENDPOINT }} + REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} - name: Compose push ${{ env.SERVICE }} run: sudo -E docker-compose push ${{ env.SERVICE }} @@ -99,7 +97,7 @@ jobs: shell: bash env: TAG: ${{ env.BRANCH }} - REGISTRY: ${{ env.REGISTRY_ENDPOINT }} + REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} - name: Create multiarch manifest run: | @@ -132,7 +130,7 @@ jobs: shell: pwsh env: TAG: ${{ env.BRANCH }} - REGISTRY: ${{ env.REGISTRY_ENDPOINT }} + REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} - name: Compose push ${{ env.SERVICE }} run: docker-compose push ${{ env.SERVICE }}' @@ -140,7 +138,7 @@ jobs: shell: pwsh env: TAG: ${{ env.BRANCH }} - REGISTRY: ${{ env.REGISTRY_ENDPOINT }} + REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} \ No newline at end of file From 27a274ad872d63535a1f1f8e9dabd574930130ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Thu, 24 Dec 2020 15:24:59 +0100 Subject: [PATCH 101/110] final basket workflow --- .github/workflows/basket-api.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index fac87c086..36eab37b6 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -5,7 +5,7 @@ on: branches: - master - dev - - feature/github-actions + paths: - src/BuildingBlocks/* - src/Services/Basket/* From b67b05ff4c8fb2dead607136d1b73ea62d92e552 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Thu, 24 Dec 2020 15:26:12 +0100 Subject: [PATCH 102/110] final version --- .github/workflows/basket-api.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 36eab37b6..fac87c086 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -5,7 +5,7 @@ on: branches: - master - dev - + - feature/github-actions paths: - src/BuildingBlocks/* - src/Services/Basket/* From 19a1e776659488f4c6ce536a5126a673213f9510 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Thu, 24 Dec 2020 15:32:03 +0100 Subject: [PATCH 103/110] fix secret ref --- .github/workflows/basket-api.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index fac87c086..a909f6d5d 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -6,6 +6,7 @@ on: - master - dev - feature/github-actions + paths: - src/BuildingBlocks/* - src/Services/Basket/* @@ -101,8 +102,8 @@ jobs: - name: Create multiarch manifest run: | - docker --config ~/.docker manifest create ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-${{ env.BRANCH }} - docker --config ~/.docker manifest push ${{ env.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} + 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: From 469957403cd8bb4ba7a8a0f47cf75b574962de39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Thu, 24 Dec 2020 20:49:04 +0100 Subject: [PATCH 104/110] basket catalog identity ordering workflows --- .github/workflows/basket-api.yml | 10 +- .github/workflows/catalog-api.yml | 141 ++++++++++++++++++ .github/workflows/catalog-api/workflow.yml | 25 ---- .github/workflows/identity-api.yml | 141 ++++++++++++++++++ .github/workflows/identity-api/workflow.yml | 25 ---- .github/workflows/infrastructure/workflow.yml | 27 ---- .../mobile-shopping-agg/workflow.yml | 24 --- .github/workflows/ordering-api.yml | 141 ++++++++++++++++++ .github/workflows/ordering-api/workflow.yml | 27 ---- .github/workflows/webshoppingagg.yml | 140 +++++++++++++++++ 10 files changed, 566 insertions(+), 135 deletions(-) create mode 100644 .github/workflows/catalog-api.yml delete mode 100644 .github/workflows/catalog-api/workflow.yml create mode 100644 .github/workflows/identity-api.yml delete mode 100644 .github/workflows/identity-api/workflow.yml delete mode 100644 .github/workflows/infrastructure/workflow.yml delete mode 100644 .github/workflows/mobile-shopping-agg/workflow.yml create mode 100644 .github/workflows/ordering-api.yml delete mode 100644 .github/workflows/ordering-api/workflow.yml create mode 100644 .github/workflows/webshoppingagg.yml diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index a909f6d5d..d9fe47035 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -3,9 +3,8 @@ name: basket-api on: push: branches: - - master + - main - dev - - feature/github-actions paths: - src/BuildingBlocks/* @@ -14,7 +13,7 @@ on: pull_request: branches: - - master + - main - dev env: SERVICE: basket-api @@ -139,7 +138,4 @@ jobs: shell: pwsh env: TAG: ${{ env.BRANCH }} - REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} - - - \ No newline at end of file + REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} \ No newline at end of file diff --git a/.github/workflows/catalog-api.yml b/.github/workflows/catalog-api.yml new file mode 100644 index 000000000..797311042 --- /dev/null +++ b/.github/workflows/catalog-api.yml @@ -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 }} \ No newline at end of file diff --git a/.github/workflows/catalog-api/workflow.yml b/.github/workflows/catalog-api/workflow.yml deleted file mode 100644 index 86e945388..000000000 --- a/.github/workflows/catalog-api/workflow.yml +++ /dev/null @@ -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 \ No newline at end of file diff --git a/.github/workflows/identity-api.yml b/.github/workflows/identity-api.yml new file mode 100644 index 000000000..e22ee83c0 --- /dev/null +++ b/.github/workflows/identity-api.yml @@ -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 }} \ No newline at end of file diff --git a/.github/workflows/identity-api/workflow.yml b/.github/workflows/identity-api/workflow.yml deleted file mode 100644 index 3c6f692e1..000000000 --- a/.github/workflows/identity-api/workflow.yml +++ /dev/null @@ -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 \ No newline at end of file diff --git a/.github/workflows/infrastructure/workflow.yml b/.github/workflows/infrastructure/workflow.yml deleted file mode 100644 index 50e5a5907..000000000 --- a/.github/workflows/infrastructure/workflow.yml +++ /dev/null @@ -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 \ No newline at end of file diff --git a/.github/workflows/mobile-shopping-agg/workflow.yml b/.github/workflows/mobile-shopping-agg/workflow.yml deleted file mode 100644 index 791da1360..000000000 --- a/.github/workflows/mobile-shopping-agg/workflow.yml +++ /dev/null @@ -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 \ No newline at end of file diff --git a/.github/workflows/ordering-api.yml b/.github/workflows/ordering-api.yml new file mode 100644 index 000000000..33ba506fa --- /dev/null +++ b/.github/workflows/ordering-api.yml @@ -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 }} \ No newline at end of file diff --git a/.github/workflows/ordering-api/workflow.yml b/.github/workflows/ordering-api/workflow.yml deleted file mode 100644 index d9bd9061a..000000000 --- a/.github/workflows/ordering-api/workflow.yml +++ /dev/null @@ -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 \ No newline at end of file diff --git a/.github/workflows/webshoppingagg.yml b/.github/workflows/webshoppingagg.yml new file mode 100644 index 000000000..dc51c8242 --- /dev/null +++ b/.github/workflows/webshoppingagg.yml @@ -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 }} \ No newline at end of file From 5e516dd3fb15d9bb95b8d9a5834797f273cd7b55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Mon, 28 Dec 2020 09:09:43 +0100 Subject: [PATCH 105/110] added github workflows --- .github/workflows/mobileshoppingagg.yml | 140 +++++++++++++++++ .../workflows/ordering-backgroundtasks.yml | 141 ++++++++++++++++++ .github/workflows/ordering-signalrhub.yml | 141 ++++++++++++++++++ .github/workflows/payment-api.yml | 141 ++++++++++++++++++ .github/workflows/webhooks-api.yml | 141 ++++++++++++++++++ .github/workflows/webhooks-client.yml | 141 ++++++++++++++++++ .github/workflows/webmvc.yml | 141 ++++++++++++++++++ .github/workflows/webspa.yml | 141 ++++++++++++++++++ .github/workflows/webstatus.yml | 141 ++++++++++++++++++ 9 files changed, 1268 insertions(+) create mode 100644 .github/workflows/mobileshoppingagg.yml create mode 100644 .github/workflows/ordering-backgroundtasks.yml create mode 100644 .github/workflows/ordering-signalrhub.yml create mode 100644 .github/workflows/payment-api.yml create mode 100644 .github/workflows/webhooks-api.yml create mode 100644 .github/workflows/webhooks-client.yml create mode 100644 .github/workflows/webmvc.yml create mode 100644 .github/workflows/webspa.yml create mode 100644 .github/workflows/webstatus.yml diff --git a/.github/workflows/mobileshoppingagg.yml b/.github/workflows/mobileshoppingagg.yml new file mode 100644 index 000000000..f57147120 --- /dev/null +++ b/.github/workflows/mobileshoppingagg.yml @@ -0,0 +1,140 @@ +name: mobileshoppingagg + +on: + push: + branches: + - main + - dev + + paths: + - src/ApiGateways/Mobile.Bff.Shopping/aggregator/* + - .github/workflows/mobileshoppingagg.yml + + pull_request: + branches: + - main + - dev +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 }} + + 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 }} \ No newline at end of file diff --git a/.github/workflows/ordering-backgroundtasks.yml b/.github/workflows/ordering-backgroundtasks.yml new file mode 100644 index 000000000..084234356 --- /dev/null +++ b/.github/workflows/ordering-backgroundtasks.yml @@ -0,0 +1,141 @@ +name: ordering-backgroundtasks + +on: + push: + branches: + - main + - dev + + paths: + - src/BuildingBlocks/* + - src/Services/Ordering/* + - .github/workflows/ordering-backgroundtasks.yml + + pull_request: + branches: + - main + - dev +env: + SERVICE: ordering-backgroundtasks + IMAGE: ordering.backgroundtasks + +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 }} \ No newline at end of file diff --git a/.github/workflows/ordering-signalrhub.yml b/.github/workflows/ordering-signalrhub.yml new file mode 100644 index 000000000..ab44e1746 --- /dev/null +++ b/.github/workflows/ordering-signalrhub.yml @@ -0,0 +1,141 @@ +name: ordering-signalrhub + +on: + push: + branches: + - main + - dev + + paths: + - src/BuildingBlocks/* + - src/Services/Ordering/* + - .github/workflows/ordering-signalrhub.yml + + pull_request: + branches: + - main + - dev +env: + SERVICE: ordering-signalrhub + IMAGE: ordering.signalrhub + +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 }} \ No newline at end of file diff --git a/.github/workflows/payment-api.yml b/.github/workflows/payment-api.yml new file mode 100644 index 000000000..37a4b433c --- /dev/null +++ b/.github/workflows/payment-api.yml @@ -0,0 +1,141 @@ +name: payment-api + +on: + push: + branches: + - main + - dev + + paths: + - src/BuildingBlocks/* + - src/Services/Payment/* + - .github/workflows/payment-api.yml + + pull_request: + branches: + - main + - dev +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 }} + + 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 }} \ No newline at end of file diff --git a/.github/workflows/webhooks-api.yml b/.github/workflows/webhooks-api.yml new file mode 100644 index 000000000..1d28a1fea --- /dev/null +++ b/.github/workflows/webhooks-api.yml @@ -0,0 +1,141 @@ +name: webhooks-api + +on: + push: + branches: + - main + - dev + + paths: + - src/BuildingBlocks/* + - src/Services/Webhooks/* + - .github/workflows/webhooks-api.yml + + pull_request: + branches: + - main + - dev +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 }} + + 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 }} \ No newline at end of file diff --git a/.github/workflows/webhooks-client.yml b/.github/workflows/webhooks-client.yml new file mode 100644 index 000000000..e199f5159 --- /dev/null +++ b/.github/workflows/webhooks-client.yml @@ -0,0 +1,141 @@ +name: webhooks-client + +on: + push: + branches: + - main + - dev + + paths: + - src/BuildingBlocks/* + - src/Web/WebhookClient/* + - .github/workflows/webhooks-client.yml + + pull_request: + branches: + - main + - dev +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 }} + + 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 }} \ No newline at end of file diff --git a/.github/workflows/webmvc.yml b/.github/workflows/webmvc.yml new file mode 100644 index 000000000..a130f2983 --- /dev/null +++ b/.github/workflows/webmvc.yml @@ -0,0 +1,141 @@ +name: webmvc + +on: + push: + branches: + - main + - dev + + paths: + - src/BuildingBlocks/* + - src/Web/WebMVC/* + - .github/workflows/webmvc.yml + + pull_request: + branches: + - main + - dev +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 }} + + 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 }} \ No newline at end of file diff --git a/.github/workflows/webspa.yml b/.github/workflows/webspa.yml new file mode 100644 index 000000000..4723ef5cf --- /dev/null +++ b/.github/workflows/webspa.yml @@ -0,0 +1,141 @@ +name: webspa + +on: + push: + branches: + - main + - dev + + paths: + - src/BuildingBlocks/* + - src/Web/WebSPA/* + - .github/workflows/webspa.yml + + pull_request: + branches: + - main + - dev +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 }} + + 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 }} \ No newline at end of file diff --git a/.github/workflows/webstatus.yml b/.github/workflows/webstatus.yml new file mode 100644 index 000000000..644b57cc8 --- /dev/null +++ b/.github/workflows/webstatus.yml @@ -0,0 +1,141 @@ +name: webstatus + +on: + push: + branches: + - main + - dev + + paths: + - src/BuildingBlocks/* + - src/Web/WebStatus/* + - .github/workflows/webstatus.yml + + pull_request: + branches: + - main + - dev +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 }} + + 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 }} \ No newline at end of file From 90fe35f7aab4c1f473286caf1eb007d3a7488dcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Mon, 28 Dec 2020 09:09:51 +0100 Subject: [PATCH 106/110] remove azure pipelines --- .github/workflows/payment-api/workflow.yml | 25 ----- .../workflows/web-shopping-agg/workflow.yml | 24 ----- .github/workflows/webhooks-api/workflow.yml | 25 ----- .../workflows/webhooks-client/workflow.yml | 25 ----- .github/workflows/webmvc/workflow.yml | 25 ----- .github/workflows/webspa/workflow.yml | 27 ------ .github/workflows/webstatus/workflow.yml | 25 ----- build/azure-devops/apigws/azure-pipelines.yml | 32 ------- .../basket-api/azure-pipelines.yml | 27 ------ build/azure-devops/buildimages.yaml | 94 ------------------- .../catalog-api/azure-pipelines.yml | 27 ------ .../identity-api/azure-pipelines.yml | 27 ------ .../infrastructure/azure-pipelines.yml | 28 ------ .../mobile-shopping-agg/azure-pipelines.yml | 27 ------ build/azure-devops/multiarch.yaml | 33 ------- .../ordering-api/azure-pipelines.yml | 29 ------ .../payment-api/azure-pipelines.yml | 27 ------ build/azure-devops/readme.md | 5 - .../web-shopping-agg/azure-pipelines.yml | 26 ----- .../webhooks-api/azure-pipelines.yml | 27 ------ .../webhooks-client/azure-pipelines.yml | 27 ------ build/azure-devops/webmvc/azure-pipelines.yml | 27 ------ build/azure-devops/webspa/azure-pipelines.yml | 27 ------ .../webstatus/azure-pipelines.yml | 27 ------ 24 files changed, 693 deletions(-) delete mode 100644 .github/workflows/payment-api/workflow.yml delete mode 100644 .github/workflows/web-shopping-agg/workflow.yml delete mode 100644 .github/workflows/webhooks-api/workflow.yml delete mode 100644 .github/workflows/webhooks-client/workflow.yml delete mode 100644 .github/workflows/webmvc/workflow.yml delete mode 100644 .github/workflows/webspa/workflow.yml delete mode 100644 .github/workflows/webstatus/workflow.yml delete mode 100644 build/azure-devops/apigws/azure-pipelines.yml delete mode 100644 build/azure-devops/basket-api/azure-pipelines.yml delete mode 100644 build/azure-devops/buildimages.yaml delete mode 100644 build/azure-devops/catalog-api/azure-pipelines.yml delete mode 100644 build/azure-devops/identity-api/azure-pipelines.yml delete mode 100644 build/azure-devops/infrastructure/azure-pipelines.yml delete mode 100644 build/azure-devops/mobile-shopping-agg/azure-pipelines.yml delete mode 100644 build/azure-devops/multiarch.yaml delete mode 100644 build/azure-devops/ordering-api/azure-pipelines.yml delete mode 100644 build/azure-devops/payment-api/azure-pipelines.yml delete mode 100644 build/azure-devops/readme.md delete mode 100644 build/azure-devops/web-shopping-agg/azure-pipelines.yml delete mode 100644 build/azure-devops/webhooks-api/azure-pipelines.yml delete mode 100644 build/azure-devops/webhooks-client/azure-pipelines.yml delete mode 100644 build/azure-devops/webmvc/azure-pipelines.yml delete mode 100644 build/azure-devops/webspa/azure-pipelines.yml delete mode 100644 build/azure-devops/webstatus/azure-pipelines.yml diff --git a/.github/workflows/payment-api/workflow.yml b/.github/workflows/payment-api/workflow.yml deleted file mode 100644 index 3e3b5c780..000000000 --- a/.github/workflows/payment-api/workflow.yml +++ /dev/null @@ -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/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 \ No newline at end of file diff --git a/.github/workflows/web-shopping-agg/workflow.yml b/.github/workflows/web-shopping-agg/workflow.yml deleted file mode 100644 index 670d67b1c..000000000 --- a/.github/workflows/web-shopping-agg/workflow.yml +++ /dev/null @@ -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/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 \ No newline at end of file diff --git a/.github/workflows/webhooks-api/workflow.yml b/.github/workflows/webhooks-api/workflow.yml deleted file mode 100644 index 652dbc9b4..000000000 --- a/.github/workflows/webhooks-api/workflow.yml +++ /dev/null @@ -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/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 \ No newline at end of file diff --git a/.github/workflows/webhooks-client/workflow.yml b/.github/workflows/webhooks-client/workflow.yml deleted file mode 100644 index 839846a24..000000000 --- a/.github/workflows/webhooks-client/workflow.yml +++ /dev/null @@ -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/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 \ No newline at end of file diff --git a/.github/workflows/webmvc/workflow.yml b/.github/workflows/webmvc/workflow.yml deleted file mode 100644 index 545d9ffe9..000000000 --- a/.github/workflows/webmvc/workflow.yml +++ /dev/null @@ -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/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 \ No newline at end of file diff --git a/.github/workflows/webspa/workflow.yml b/.github/workflows/webspa/workflow.yml deleted file mode 100644 index aefced84a..000000000 --- a/.github/workflows/webspa/workflow.yml +++ /dev/null @@ -1,27 +0,0 @@ -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) \ No newline at end of file diff --git a/.github/workflows/webstatus/workflow.yml b/.github/workflows/webstatus/workflow.yml deleted file mode 100644 index 3e06bf712..000000000 --- a/.github/workflows/webstatus/workflow.yml +++ /dev/null @@ -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/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 \ No newline at end of file diff --git a/build/azure-devops/apigws/azure-pipelines.yml b/build/azure-devops/apigws/azure-pipelines.yml deleted file mode 100644 index f2399b341..000000000 --- a/build/azure-devops/apigws/azure-pipelines.yml +++ /dev/null @@ -1,32 +0,0 @@ -trigger: - branches: - include: - - master - - dev - paths: - include: - - src/ApiGateways/* - - build/azure-devops/buildimages.yml - - build/azure-devops/multiarch.yml - - build/azure-devops/apigws/* - - deploy/k8s/helm/apigwmm/* - - deploy/k8s/helm/apigwms/* - - deploy/k8s/helm/apigwwm/* - - deploy/k8s/helm/apigwws/* - exclude: - - src/ApiGateways/Mobile.Bff.Shopping/aggregator/* - - src/ApiGateways/Web.Bff.Shopping/aggregator/* -jobs: -- job: PublishCharts - condition: ne('$(Build.Reason)', 'PullRequest') - pool: - vmImage: 'ubuntu-16.04' - steps: - - task: CopyFiles@2 - inputs: - sourceFolder: $(Build.SourcesDirectory)/deploy/k8s/helm - targetFolder: $(Build.ArtifactStagingDirectory)/deploy/k8s/helm - - task: PublishBuildArtifacts@1 - inputs: - pathtoPublish: $(Build.ArtifactStagingDirectory)/deploy/k8s/helm - artifactName: helm diff --git a/build/azure-devops/basket-api/azure-pipelines.yml b/build/azure-devops/basket-api/azure-pipelines.yml deleted file mode 100644 index 8aa99a9be..000000000 --- a/build/azure-devops/basket-api/azure-pipelines.yml +++ /dev/null @@ -1,27 +0,0 @@ -variables: - registryEndpoint: eshop-registry -trigger: - branches: - include: - - master - - dev - paths: - include: - - 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/* -jobs: -- template: ../buildimages.yaml - parameters: - services: basket-api - registryEndpoint: $(registryEndpoint) - helmfrom: $(Build.SourcesDirectory)/deploy/k8s/helm - helmto: $(Build.ArtifactStagingDirectory)/deploy/k8s/helm -- template: ../multiarch.yaml - parameters: - image: basket.api - branch: $(Build.SourceBranchName) - registryEndpoint: $(registryEndpoint) diff --git a/build/azure-devops/buildimages.yaml b/build/azure-devops/buildimages.yaml deleted file mode 100644 index 2e58cad21..000000000 --- a/build/azure-devops/buildimages.yaml +++ /dev/null @@ -1,94 +0,0 @@ -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 diff --git a/build/azure-devops/catalog-api/azure-pipelines.yml b/build/azure-devops/catalog-api/azure-pipelines.yml deleted file mode 100644 index b22146ec8..000000000 --- a/build/azure-devops/catalog-api/azure-pipelines.yml +++ /dev/null @@ -1,27 +0,0 @@ -variables: - registryEndpoint: eshop-registry -trigger: - branches: - include: - - master - - dev - paths: - include: - - 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/* -jobs: -- template: ../buildimages.yaml - parameters: - services: catalog-api - registryEndpoint: $(registryEndpoint) - helmfrom: $(Build.SourcesDirectory)/deploy/k8s/helm - helmto: $(Build.ArtifactStagingDirectory)/deploy/k8s/helm -- template: ../multiarch.yaml - parameters: - image: catalog.api - branch: $(Build.SourceBranchName) - registryEndpoint: $(registryEndpoint) diff --git a/build/azure-devops/identity-api/azure-pipelines.yml b/build/azure-devops/identity-api/azure-pipelines.yml deleted file mode 100644 index e3dc070b8..000000000 --- a/build/azure-devops/identity-api/azure-pipelines.yml +++ /dev/null @@ -1,27 +0,0 @@ -variables: - registryEndpoint: eshop-registry -trigger: - branches: - include: - - master - - dev - paths: - include: - - 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/* -jobs: -- template: ../buildimages.yaml - parameters: - services: identity-api - registryEndpoint: $(registryEndpoint) - helmfrom: $(Build.SourcesDirectory)/deploy/k8s/helm - helmto: $(Build.ArtifactStagingDirectory)/deploy/k8s/helm -- template: ../multiarch.yaml - parameters: - image: identity.api - branch: $(Build.SourceBranchName) - registryEndpoint: $(registryEndpoint) diff --git a/build/azure-devops/infrastructure/azure-pipelines.yml b/build/azure-devops/infrastructure/azure-pipelines.yml deleted file mode 100644 index 214e56d37..000000000 --- a/build/azure-devops/infrastructure/azure-pipelines.yml +++ /dev/null @@ -1,28 +0,0 @@ -pool: - vmImage: 'ubuntu-16.04' -variables: - registryEndpoint: eshop-registry -trigger: - branches: - include: - - master - - dev - paths: - include: - - 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/* -steps: -- task: CopyFiles@2 - inputs: - sourceFolder: $(Build.SourcesDirectory)/deploy/k8s/helm - targetFolder: $(Build.ArtifactStagingDirectory)/deploy/k8s/helm -- task: PublishBuildArtifacts@1 - inputs: - pathtoPublish: $(Build.ArtifactStagingDirectory)/deploy/k8s/helm - artifactName: helm diff --git a/build/azure-devops/mobile-shopping-agg/azure-pipelines.yml b/build/azure-devops/mobile-shopping-agg/azure-pipelines.yml deleted file mode 100644 index 878f064b5..000000000 --- a/build/azure-devops/mobile-shopping-agg/azure-pipelines.yml +++ /dev/null @@ -1,27 +0,0 @@ -variables: - registryEndpoint: eshop-registry -trigger: - branches: - include: - - master - - dev - paths: - include: - - 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/* -jobs: -- template: ../buildimages.yaml - parameters: - services: mobileshoppingagg - registryEndpoint: $(registryEndpoint) - helmfrom: $(Build.SourcesDirectory)/deploy/k8s/helm - helmto: $(Build.ArtifactStagingDirectory)/deploy/k8s/helm -- template: ../multiarch.yaml - parameters: - image: mobileshoppingagg - branch: $(Build.SourceBranchName) - registryEndpoint: $(registryEndpoint) - diff --git a/build/azure-devops/multiarch.yaml b/build/azure-devops/multiarch.yaml deleted file mode 100644 index 1639fff87..000000000 --- a/build/azure-devops/multiarch.yaml +++ /dev/null @@ -1,33 +0,0 @@ -parameters: - image: '' - branch: '' - registry: 'eshop' - registryEndpoint: '' - -jobs: -- job: manifest - condition: and(succeeded(),ne('${{ variables['Build.Reason'] }}', 'PullRequest')) - dependsOn: - # - BuildWindows - - BuildLinux - pool: - vmImage: 'Ubuntu 16.04' - steps: - - task: Docker@1 - displayName: Docker Login - inputs: - command: login - containerregistrytype: 'Container Registry' - dockerRegistryEndpoint: ${{ parameters.registryEndpoint }} - # Disabled windows deploy - # docker --config ~/.docker manifest create ${{ parameters.registry }}/${{ parameters.image }}:${{ parameters.branch }} ${{ parameters.registry }}/${{ parameters.image }}:linux-${{ parameters.branch }} ${{ parameters.registry }}/${{ parameters.image }}:win-${{ parameters.branch }} - # docker --config ~/.docker manifest create ${{ parameters.registry }}/${{ parameters.image }}:latest ${{ parameters.registry }}/${{ parameters.image }}:linux-latest ${{ parameters.registry }}/${{ parameters.image }}:win-latest - - bash: | - mkdir -p ~/.docker - sed '$ s/.$//' $DOCKER_CONFIG/config.json > ~/.docker/config.json - echo ',"experimental": "enabled" }' >> ~/.docker/config.json - docker --config ~/.docker manifest create ${{ parameters.registry }}/${{ parameters.image }}:${{ parameters.branch }} ${{ parameters.registry }}/${{ parameters.image }}:linux-${{ parameters.branch }} - docker --config ~/.docker manifest create ${{ parameters.registry }}/${{ parameters.image }}:latest ${{ parameters.registry }}/${{ parameters.image }}:linux-latest - docker --config ~/.docker manifest push ${{ parameters.registry }}/${{ parameters.image }}:${{ parameters.branch }} - docker --config ~/.docker manifest push ${{ parameters.registry }}/${{ parameters.image }}:latest - displayName: Create multiarch manifest diff --git a/build/azure-devops/ordering-api/azure-pipelines.yml b/build/azure-devops/ordering-api/azure-pipelines.yml deleted file mode 100644 index d11c4e270..000000000 --- a/build/azure-devops/ordering-api/azure-pipelines.yml +++ /dev/null @@ -1,29 +0,0 @@ -variables: - registryEndpoint: eshop-registry -trigger: - branches: - include: - - master - - dev - paths: - include: - - 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/* -jobs: -- template: ../buildimages.yaml - parameters: - services: ordering-api - registryEndpoint: $(registryEndpoint) - helmfrom: $(Build.SourcesDirectory)/deploy/k8s/helm - helmto: $(Build.ArtifactStagingDirectory)/deploy/k8s/helm -- template: ../multiarch.yaml - parameters: - image: ordering.api - branch: $(Build.SourceBranchName) - registryEndpoint: $(registryEndpoint) \ No newline at end of file diff --git a/build/azure-devops/payment-api/azure-pipelines.yml b/build/azure-devops/payment-api/azure-pipelines.yml deleted file mode 100644 index 6acdec6d3..000000000 --- a/build/azure-devops/payment-api/azure-pipelines.yml +++ /dev/null @@ -1,27 +0,0 @@ -variables: - registryEndpoint: eshop-registry -trigger: - branches: - include: - - master - - dev - paths: - include: - - 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/* -jobs: -- template: ../buildimages.yaml - parameters: - services: payment-api - registryEndpoint: $(registryEndpoint) - helmfrom: $(Build.SourcesDirectory)/deploy/k8s/helm - helmto: $(Build.ArtifactStagingDirectory)/deploy/k8s/helm -- template: ../multiarch.yaml - parameters: - image: payment.api - branch: $(Build.SourceBranchName) - registryEndpoint: $(registryEndpoint) \ No newline at end of file diff --git a/build/azure-devops/readme.md b/build/azure-devops/readme.md deleted file mode 100644 index 03680be34..000000000 --- a/build/azure-devops/readme.md +++ /dev/null @@ -1,5 +0,0 @@ -# Azure DevOps build definitions - -This folder contains the Azure DevOps build definitions in YAML format. Each folder contains one `azure-pipelines.yml` that contains the build definition for one microservice (usually a Docker image, but some microservices generates more than one Docker image). - -For more information about YAML builds read the [Azure DevOps documentation](https://docs.microsoft.com/azure/devops/pipelines/get-started-yaml?view=azure-devops). \ No newline at end of file diff --git a/build/azure-devops/web-shopping-agg/azure-pipelines.yml b/build/azure-devops/web-shopping-agg/azure-pipelines.yml deleted file mode 100644 index 6537591cd..000000000 --- a/build/azure-devops/web-shopping-agg/azure-pipelines.yml +++ /dev/null @@ -1,26 +0,0 @@ -variables: - registryEndpoint: eshop-registry -trigger: - branches: - include: - - master - - dev - paths: - include: - - 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/* -jobs: -- template: ../buildimages.yaml - parameters: - services: webshoppingagg - registryEndpoint: $(registryEndpoint) - helmfrom: $(Build.SourcesDirectory)/deploy/k8s/helm - helmto: $(Build.ArtifactStagingDirectory)/deploy/k8s/helm -- template: ../multiarch.yaml - parameters: - image: webshoppingagg - branch: $(Build.SourceBranchName) - registryEndpoint: $(registryEndpoint) \ No newline at end of file diff --git a/build/azure-devops/webhooks-api/azure-pipelines.yml b/build/azure-devops/webhooks-api/azure-pipelines.yml deleted file mode 100644 index d5e679c90..000000000 --- a/build/azure-devops/webhooks-api/azure-pipelines.yml +++ /dev/null @@ -1,27 +0,0 @@ -variables: - registryEndpoint: eshop-registry -trigger: - branches: - include: - - master - - dev - paths: - include: - - 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/* -jobs: -- template: ../buildimages.yaml - parameters: - services: webhooks-api - registryEndpoint: $(registryEndpoint) - helmfrom: $(Build.SourcesDirectory)/deploy/k8s/helm - helmto: $(Build.ArtifactStagingDirectory)/deploy/k8s/helm -- template: ../multiarch.yaml - parameters: - image: webhooks.api - branch: $(Build.SourceBranchName) - registryEndpoint: $(registryEndpoint) \ No newline at end of file diff --git a/build/azure-devops/webhooks-client/azure-pipelines.yml b/build/azure-devops/webhooks-client/azure-pipelines.yml deleted file mode 100644 index f12a38487..000000000 --- a/build/azure-devops/webhooks-client/azure-pipelines.yml +++ /dev/null @@ -1,27 +0,0 @@ -variables: - registryEndpoint: eshop-registry -trigger: - branches: - include: - - master - - dev - paths: - include: - - 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/* -jobs: -- template: ../buildimages.yaml - parameters: - services: webhooks-client - registryEndpoint: $(registryEndpoint) - helmfrom: $(Build.SourcesDirectory)/deploy/k8s/helm - helmto: $(Build.ArtifactStagingDirectory)/deploy/k8s/helm -- template: ../multiarch.yaml - parameters: - image: webhooks.client - branch: $(Build.SourceBranchName) - registryEndpoint: $(registryEndpoint) diff --git a/build/azure-devops/webmvc/azure-pipelines.yml b/build/azure-devops/webmvc/azure-pipelines.yml deleted file mode 100644 index cd2fba59c..000000000 --- a/build/azure-devops/webmvc/azure-pipelines.yml +++ /dev/null @@ -1,27 +0,0 @@ -variables: - registryEndpoint: eshop-registry -trigger: - branches: - include: - - master - - dev - paths: - include: - - src/BuildingBlocks/* - - src/Web/WebMVC/* - - build/azure-devops/buildimages.yml - - build/azure-devops/multiarch.yml - - build/azure-devops/webmvc/* - - deploy/k8s/helm/webmvc/* -jobs: -- template: ../buildimages.yaml - parameters: - services: webmvc - registryEndpoint: $(registryEndpoint) - helmfrom: $(Build.SourcesDirectory)/deploy/k8s/helm - helmto: $(Build.ArtifactStagingDirectory)/deploy/k8s/helm -- template: ../multiarch.yaml - parameters: - image: webmvc - branch: $(Build.SourceBranchName) - registryEndpoint: $(registryEndpoint) \ No newline at end of file diff --git a/build/azure-devops/webspa/azure-pipelines.yml b/build/azure-devops/webspa/azure-pipelines.yml deleted file mode 100644 index aefced84a..000000000 --- a/build/azure-devops/webspa/azure-pipelines.yml +++ /dev/null @@ -1,27 +0,0 @@ -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) \ No newline at end of file diff --git a/build/azure-devops/webstatus/azure-pipelines.yml b/build/azure-devops/webstatus/azure-pipelines.yml deleted file mode 100644 index eeb8c15a1..000000000 --- a/build/azure-devops/webstatus/azure-pipelines.yml +++ /dev/null @@ -1,27 +0,0 @@ -variables: - registryEndpoint: eshop-registry -trigger: - branches: - include: - - master - - dev - paths: - include: - - src/BuildingBlocks/* - - src/Web/WebStatus/* - - build/azure-devops/buildimages.yml - - build/azure-devops/multiarch.yml - - build/azure-devops/webstatus/* - - deploy/k8s/helm/webstatus/* -jobs: -- template: ../buildimages.yaml - parameters: - services: webstatus - registryEndpoint: $(registryEndpoint) - helmfrom: $(Build.SourcesDirectory)/deploy/k8s/helm - helmto: $(Build.ArtifactStagingDirectory)/deploy/k8s/helm -- template: ../multiarch.yaml - parameters: - image: webstatus - branch: $(Build.SourceBranchName) - registryEndpoint: $(registryEndpoint) \ No newline at end of file From 32d056e0da478fc8d577f6f11abeb570133717e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Mon, 28 Dec 2020 09:12:22 +0100 Subject: [PATCH 107/110] test builds on branch --- .github/workflows/basket-api.yml | 1 + .github/workflows/catalog-api.yml | 1 + .github/workflows/identity-api.yml | 1 + .github/workflows/mobileshoppingagg.yml | 1 + .github/workflows/ordering-api.yml | 1 + .github/workflows/ordering-backgroundtasks.yml | 1 + .github/workflows/ordering-signalrhub.yml | 1 + .github/workflows/payment-api.yml | 1 + .github/workflows/webhooks-api.yml | 1 + .github/workflows/webhooks-client.yml | 1 + .github/workflows/webmvc.yml | 1 + .github/workflows/webshoppingagg.yml | 1 + .github/workflows/webspa.yml | 1 + .github/workflows/webstatus.yml | 1 + 14 files changed, 14 insertions(+) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index d9fe47035..9d8fa0db8 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -5,6 +5,7 @@ on: branches: - main - dev + - feature/github-actions paths: - src/BuildingBlocks/* diff --git a/.github/workflows/catalog-api.yml b/.github/workflows/catalog-api.yml index 797311042..efeec5f74 100644 --- a/.github/workflows/catalog-api.yml +++ b/.github/workflows/catalog-api.yml @@ -5,6 +5,7 @@ on: branches: - main - dev + - feature/github-actions paths: - src/BuildingBlocks/* diff --git a/.github/workflows/identity-api.yml b/.github/workflows/identity-api.yml index e22ee83c0..302e24dd2 100644 --- a/.github/workflows/identity-api.yml +++ b/.github/workflows/identity-api.yml @@ -5,6 +5,7 @@ on: branches: - main - dev + - feature/github-actions paths: - src/BuildingBlocks/* diff --git a/.github/workflows/mobileshoppingagg.yml b/.github/workflows/mobileshoppingagg.yml index f57147120..07773aabc 100644 --- a/.github/workflows/mobileshoppingagg.yml +++ b/.github/workflows/mobileshoppingagg.yml @@ -5,6 +5,7 @@ on: branches: - main - dev + - feature/github-actions paths: - src/ApiGateways/Mobile.Bff.Shopping/aggregator/* diff --git a/.github/workflows/ordering-api.yml b/.github/workflows/ordering-api.yml index 33ba506fa..7df1b7700 100644 --- a/.github/workflows/ordering-api.yml +++ b/.github/workflows/ordering-api.yml @@ -5,6 +5,7 @@ on: branches: - main - dev + - feature/github-actions paths: - src/BuildingBlocks/* diff --git a/.github/workflows/ordering-backgroundtasks.yml b/.github/workflows/ordering-backgroundtasks.yml index 084234356..6ed208c33 100644 --- a/.github/workflows/ordering-backgroundtasks.yml +++ b/.github/workflows/ordering-backgroundtasks.yml @@ -5,6 +5,7 @@ on: branches: - main - dev + - feature/github-actions paths: - src/BuildingBlocks/* diff --git a/.github/workflows/ordering-signalrhub.yml b/.github/workflows/ordering-signalrhub.yml index ab44e1746..6eb8596d0 100644 --- a/.github/workflows/ordering-signalrhub.yml +++ b/.github/workflows/ordering-signalrhub.yml @@ -5,6 +5,7 @@ on: branches: - main - dev + - feature/github-actions paths: - src/BuildingBlocks/* diff --git a/.github/workflows/payment-api.yml b/.github/workflows/payment-api.yml index 37a4b433c..38be5951b 100644 --- a/.github/workflows/payment-api.yml +++ b/.github/workflows/payment-api.yml @@ -5,6 +5,7 @@ on: branches: - main - dev + - feature/github-actions paths: - src/BuildingBlocks/* diff --git a/.github/workflows/webhooks-api.yml b/.github/workflows/webhooks-api.yml index 1d28a1fea..73a8711eb 100644 --- a/.github/workflows/webhooks-api.yml +++ b/.github/workflows/webhooks-api.yml @@ -5,6 +5,7 @@ on: branches: - main - dev + - feature/github-actions paths: - src/BuildingBlocks/* diff --git a/.github/workflows/webhooks-client.yml b/.github/workflows/webhooks-client.yml index e199f5159..394090b73 100644 --- a/.github/workflows/webhooks-client.yml +++ b/.github/workflows/webhooks-client.yml @@ -5,6 +5,7 @@ on: branches: - main - dev + - feature/github-actions paths: - src/BuildingBlocks/* diff --git a/.github/workflows/webmvc.yml b/.github/workflows/webmvc.yml index a130f2983..9f4c4d47e 100644 --- a/.github/workflows/webmvc.yml +++ b/.github/workflows/webmvc.yml @@ -5,6 +5,7 @@ on: branches: - main - dev + - feature/github-actions paths: - src/BuildingBlocks/* diff --git a/.github/workflows/webshoppingagg.yml b/.github/workflows/webshoppingagg.yml index dc51c8242..98aa63849 100644 --- a/.github/workflows/webshoppingagg.yml +++ b/.github/workflows/webshoppingagg.yml @@ -5,6 +5,7 @@ on: branches: - main - dev + - feature/github-actions paths: - src/ApiGateways/Web.Bff.Shopping/aggregator/* diff --git a/.github/workflows/webspa.yml b/.github/workflows/webspa.yml index 4723ef5cf..1068b1fea 100644 --- a/.github/workflows/webspa.yml +++ b/.github/workflows/webspa.yml @@ -5,6 +5,7 @@ on: branches: - main - dev + - feature/github-actions paths: - src/BuildingBlocks/* diff --git a/.github/workflows/webstatus.yml b/.github/workflows/webstatus.yml index 644b57cc8..84afe7fef 100644 --- a/.github/workflows/webstatus.yml +++ b/.github/workflows/webstatus.yml @@ -5,6 +5,7 @@ on: branches: - main - dev + - feature/github-actions paths: - src/BuildingBlocks/* From bb62bd7052a9fc2273a764ef05d27f8e44a08419 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Mon, 28 Dec 2020 11:34:36 +0100 Subject: [PATCH 108/110] final workflows --- .github/workflows/basket-api.yml | 1 - .github/workflows/catalog-api.yml | 1 - .github/workflows/identity-api.yml | 1 - .github/workflows/mobileshoppingagg.yml | 1 - .github/workflows/ordering-api.yml | 1 - .github/workflows/ordering-backgroundtasks.yml | 1 - .github/workflows/ordering-signalrhub.yml | 1 - .github/workflows/payment-api.yml | 1 - .github/workflows/webhooks-api.yml | 1 - .github/workflows/webhooks-client.yml | 1 - .github/workflows/webshoppingagg.yml | 1 - .github/workflows/webspa.yml | 1 - .github/workflows/webstatus.yml | 1 - 13 files changed, 13 deletions(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 9d8fa0db8..d9fe47035 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -5,7 +5,6 @@ on: branches: - main - dev - - feature/github-actions paths: - src/BuildingBlocks/* diff --git a/.github/workflows/catalog-api.yml b/.github/workflows/catalog-api.yml index efeec5f74..797311042 100644 --- a/.github/workflows/catalog-api.yml +++ b/.github/workflows/catalog-api.yml @@ -5,7 +5,6 @@ on: branches: - main - dev - - feature/github-actions paths: - src/BuildingBlocks/* diff --git a/.github/workflows/identity-api.yml b/.github/workflows/identity-api.yml index 302e24dd2..e22ee83c0 100644 --- a/.github/workflows/identity-api.yml +++ b/.github/workflows/identity-api.yml @@ -5,7 +5,6 @@ on: branches: - main - dev - - feature/github-actions paths: - src/BuildingBlocks/* diff --git a/.github/workflows/mobileshoppingagg.yml b/.github/workflows/mobileshoppingagg.yml index 07773aabc..f57147120 100644 --- a/.github/workflows/mobileshoppingagg.yml +++ b/.github/workflows/mobileshoppingagg.yml @@ -5,7 +5,6 @@ on: branches: - main - dev - - feature/github-actions paths: - src/ApiGateways/Mobile.Bff.Shopping/aggregator/* diff --git a/.github/workflows/ordering-api.yml b/.github/workflows/ordering-api.yml index 7df1b7700..33ba506fa 100644 --- a/.github/workflows/ordering-api.yml +++ b/.github/workflows/ordering-api.yml @@ -5,7 +5,6 @@ on: branches: - main - dev - - feature/github-actions paths: - src/BuildingBlocks/* diff --git a/.github/workflows/ordering-backgroundtasks.yml b/.github/workflows/ordering-backgroundtasks.yml index 6ed208c33..084234356 100644 --- a/.github/workflows/ordering-backgroundtasks.yml +++ b/.github/workflows/ordering-backgroundtasks.yml @@ -5,7 +5,6 @@ on: branches: - main - dev - - feature/github-actions paths: - src/BuildingBlocks/* diff --git a/.github/workflows/ordering-signalrhub.yml b/.github/workflows/ordering-signalrhub.yml index 6eb8596d0..ab44e1746 100644 --- a/.github/workflows/ordering-signalrhub.yml +++ b/.github/workflows/ordering-signalrhub.yml @@ -5,7 +5,6 @@ on: branches: - main - dev - - feature/github-actions paths: - src/BuildingBlocks/* diff --git a/.github/workflows/payment-api.yml b/.github/workflows/payment-api.yml index 38be5951b..37a4b433c 100644 --- a/.github/workflows/payment-api.yml +++ b/.github/workflows/payment-api.yml @@ -5,7 +5,6 @@ on: branches: - main - dev - - feature/github-actions paths: - src/BuildingBlocks/* diff --git a/.github/workflows/webhooks-api.yml b/.github/workflows/webhooks-api.yml index 73a8711eb..1d28a1fea 100644 --- a/.github/workflows/webhooks-api.yml +++ b/.github/workflows/webhooks-api.yml @@ -5,7 +5,6 @@ on: branches: - main - dev - - feature/github-actions paths: - src/BuildingBlocks/* diff --git a/.github/workflows/webhooks-client.yml b/.github/workflows/webhooks-client.yml index 394090b73..e199f5159 100644 --- a/.github/workflows/webhooks-client.yml +++ b/.github/workflows/webhooks-client.yml @@ -5,7 +5,6 @@ on: branches: - main - dev - - feature/github-actions paths: - src/BuildingBlocks/* diff --git a/.github/workflows/webshoppingagg.yml b/.github/workflows/webshoppingagg.yml index 98aa63849..dc51c8242 100644 --- a/.github/workflows/webshoppingagg.yml +++ b/.github/workflows/webshoppingagg.yml @@ -5,7 +5,6 @@ on: branches: - main - dev - - feature/github-actions paths: - src/ApiGateways/Web.Bff.Shopping/aggregator/* diff --git a/.github/workflows/webspa.yml b/.github/workflows/webspa.yml index 1068b1fea..4723ef5cf 100644 --- a/.github/workflows/webspa.yml +++ b/.github/workflows/webspa.yml @@ -5,7 +5,6 @@ on: branches: - main - dev - - feature/github-actions paths: - src/BuildingBlocks/* diff --git a/.github/workflows/webstatus.yml b/.github/workflows/webstatus.yml index 84afe7fef..644b57cc8 100644 --- a/.github/workflows/webstatus.yml +++ b/.github/workflows/webstatus.yml @@ -5,7 +5,6 @@ on: branches: - main - dev - - feature/github-actions paths: - src/BuildingBlocks/* From 899bf200b4c898108db07a7b86a154d25c86633e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Tue, 12 Jan 2021 14:59:00 +0100 Subject: [PATCH 109/110] remove windows build --- .github/workflows/basket-api.yml | 54 +------------------ .github/workflows/catalog-api.yml | 54 +------------------ .github/workflows/identity-api.yml | 54 +------------------ .github/workflows/mobileshoppingagg.yml | 54 +------------------ .github/workflows/ordering-api.yml | 54 +------------------ .../workflows/ordering-backgroundtasks.yml | 54 +------------------ .github/workflows/ordering-signalrhub.yml | 54 +------------------ .github/workflows/payment-api.yml | 54 +------------------ .github/workflows/webhooks-api.yml | 54 +------------------ .github/workflows/webhooks-client.yml | 54 +------------------ .github/workflows/webmvc.yml | 54 +------------------ .github/workflows/webshoppingagg.yml | 54 +------------------ .github/workflows/webspa.yml | 54 +------------------ .github/workflows/webstatus.yml | 54 +------------------ 14 files changed, 14 insertions(+), 742 deletions(-) diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index d9fe47035..a42f3fc1d 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -36,23 +36,6 @@ jobs: 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' }} @@ -103,39 +86,4 @@ jobs: 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 }} \ No newline at end of file + shell: bash \ No newline at end of file diff --git a/.github/workflows/catalog-api.yml b/.github/workflows/catalog-api.yml index 797311042..922df9606 100644 --- a/.github/workflows/catalog-api.yml +++ b/.github/workflows/catalog-api.yml @@ -36,23 +36,6 @@ jobs: 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' }} @@ -103,39 +86,4 @@ jobs: 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 }} \ No newline at end of file + shell: bash \ No newline at end of file diff --git a/.github/workflows/identity-api.yml b/.github/workflows/identity-api.yml index e22ee83c0..ba3228d7c 100644 --- a/.github/workflows/identity-api.yml +++ b/.github/workflows/identity-api.yml @@ -36,23 +36,6 @@ jobs: 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' }} @@ -103,39 +86,4 @@ jobs: 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 }} \ No newline at end of file + shell: bash \ No newline at end of file diff --git a/.github/workflows/mobileshoppingagg.yml b/.github/workflows/mobileshoppingagg.yml index f57147120..809224e70 100644 --- a/.github/workflows/mobileshoppingagg.yml +++ b/.github/workflows/mobileshoppingagg.yml @@ -35,23 +35,6 @@ jobs: 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' }} @@ -102,39 +85,4 @@ jobs: 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 }} \ No newline at end of file + shell: bash \ No newline at end of file diff --git a/.github/workflows/ordering-api.yml b/.github/workflows/ordering-api.yml index 33ba506fa..8fca094cd 100644 --- a/.github/workflows/ordering-api.yml +++ b/.github/workflows/ordering-api.yml @@ -36,23 +36,6 @@ jobs: 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' }} @@ -103,39 +86,4 @@ jobs: 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 }} \ No newline at end of file + shell: bash \ No newline at end of file diff --git a/.github/workflows/ordering-backgroundtasks.yml b/.github/workflows/ordering-backgroundtasks.yml index 084234356..2b62faa82 100644 --- a/.github/workflows/ordering-backgroundtasks.yml +++ b/.github/workflows/ordering-backgroundtasks.yml @@ -36,23 +36,6 @@ jobs: 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' }} @@ -103,39 +86,4 @@ jobs: 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 }} \ No newline at end of file + shell: bash \ No newline at end of file diff --git a/.github/workflows/ordering-signalrhub.yml b/.github/workflows/ordering-signalrhub.yml index ab44e1746..b60b76b2e 100644 --- a/.github/workflows/ordering-signalrhub.yml +++ b/.github/workflows/ordering-signalrhub.yml @@ -36,23 +36,6 @@ jobs: 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' }} @@ -103,39 +86,4 @@ jobs: 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 }} \ No newline at end of file + shell: bash \ No newline at end of file diff --git a/.github/workflows/payment-api.yml b/.github/workflows/payment-api.yml index 37a4b433c..0ef5d31da 100644 --- a/.github/workflows/payment-api.yml +++ b/.github/workflows/payment-api.yml @@ -36,23 +36,6 @@ jobs: 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' }} @@ -103,39 +86,4 @@ jobs: 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 }} \ No newline at end of file + shell: bash \ No newline at end of file diff --git a/.github/workflows/webhooks-api.yml b/.github/workflows/webhooks-api.yml index 1d28a1fea..c0ad095fc 100644 --- a/.github/workflows/webhooks-api.yml +++ b/.github/workflows/webhooks-api.yml @@ -36,23 +36,6 @@ jobs: 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' }} @@ -103,39 +86,4 @@ jobs: 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 }} \ No newline at end of file + shell: bash \ No newline at end of file diff --git a/.github/workflows/webhooks-client.yml b/.github/workflows/webhooks-client.yml index e199f5159..b7472d9aa 100644 --- a/.github/workflows/webhooks-client.yml +++ b/.github/workflows/webhooks-client.yml @@ -36,23 +36,6 @@ jobs: 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' }} @@ -103,39 +86,4 @@ jobs: 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 }} \ No newline at end of file + shell: bash \ No newline at end of file diff --git a/.github/workflows/webmvc.yml b/.github/workflows/webmvc.yml index 9f4c4d47e..1f032e85e 100644 --- a/.github/workflows/webmvc.yml +++ b/.github/workflows/webmvc.yml @@ -37,23 +37,6 @@ jobs: 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' }} @@ -104,39 +87,4 @@ jobs: 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 }} \ No newline at end of file + shell: bash \ No newline at end of file diff --git a/.github/workflows/webshoppingagg.yml b/.github/workflows/webshoppingagg.yml index dc51c8242..0129710cb 100644 --- a/.github/workflows/webshoppingagg.yml +++ b/.github/workflows/webshoppingagg.yml @@ -35,23 +35,6 @@ jobs: 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' }} @@ -102,39 +85,4 @@ jobs: 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 }} \ No newline at end of file + shell: bash \ No newline at end of file diff --git a/.github/workflows/webspa.yml b/.github/workflows/webspa.yml index 4723ef5cf..72e878d4f 100644 --- a/.github/workflows/webspa.yml +++ b/.github/workflows/webspa.yml @@ -36,23 +36,6 @@ jobs: 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' }} @@ -103,39 +86,4 @@ jobs: 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 }} \ No newline at end of file + shell: bash \ No newline at end of file diff --git a/.github/workflows/webstatus.yml b/.github/workflows/webstatus.yml index 644b57cc8..c615f292c 100644 --- a/.github/workflows/webstatus.yml +++ b/.github/workflows/webstatus.yml @@ -36,23 +36,6 @@ jobs: 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' }} @@ -103,39 +86,4 @@ jobs: 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 }} \ No newline at end of file + shell: bash \ No newline at end of file From 0b786afa3baaef93f5b7bc69fb5f90338f42ee23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Tue, 12 Jan 2021 15:18:58 +0100 Subject: [PATCH 110/110] remove trigger on working branch --- .github/workflows/webmvc.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/webmvc.yml b/.github/workflows/webmvc.yml index 1f032e85e..8f57642db 100644 --- a/.github/workflows/webmvc.yml +++ b/.github/workflows/webmvc.yml @@ -5,7 +5,6 @@ on: branches: - main - dev - - feature/github-actions paths: - src/BuildingBlocks/*