|
| 1 | +parameters: |
| 2 | + images: '' |
| 3 | + registryEndpoint: '' |
| 4 | + |
| 5 | +jobs: |
| 6 | +- job: BuildContainersForPR_Linux |
| 7 | + condition: eq(${{ variables['Build.Reason'] }}, 'PullRequest')) |
| 8 | + pool: |
| 9 | + vmImage: 'ubuntu-16.04' |
| 10 | + steps: |
| 11 | + - task: Bash@3 |
| 12 | + displayName: Create multiarch manifest |
| 13 | + inputs: |
| 14 | + script: docker-compose build ${{ parameters.images }} |
| 15 | + env: |
| 16 | + TAG: ${{ variables['Build.SourceBranchName'] }} |
| 17 | +- job: BuildContainersForPR_Windows |
| 18 | + condition: eq(${{ variables['Build.Reason'] }}, 'PullRequest')) |
| 19 | + pool: |
| 20 | + vmImage: 'windows-2019' |
| 21 | + steps: |
| 22 | + - task: Bash@3 |
| 23 | + displayName: Create multiarch manifest |
| 24 | + inputs: |
| 25 | + env: |
| 26 | + TAG: ${{ variables['Build.SourceBranchName'] }} |
| 27 | + PLATFORM: win |
| 28 | + script: docker-compose build ${{ parameters.images }} |
| 29 | +- job: BuildLinux |
| 30 | + condition: ne(${{ variables['Build.Reason'] }}, 'PullRequest')) |
| 31 | + pool: |
| 32 | + vmImage: 'ubuntu-16.04' |
| 33 | + steps: |
| 34 | + - task: DockerCompose@0 |
| 35 | + displayName: Compose build ${{ parameters.images }} |
| 36 | + inputs: |
| 37 | + dockerComposeCommand: 'build ${{ parameters.images }}' |
| 38 | + containerregistrytype: Container Registry |
| 39 | + dockerRegistryEndpoint: ${{ parameters.registryEndpoint }} |
| 40 | + dockerComposeFile: docker-compose.yml |
| 41 | + qualifyImageNames: true |
| 42 | + projectName: "" |
| 43 | + dockerComposeFileArgs: | |
| 44 | + TAG=${{ variables['Build.SourceBranchName'] }} |
| 45 | + - task: DockerCompose@0 |
| 46 | + displayName: Compose push apigws |
| 47 | + inputs: |
| 48 | + dockerComposeCommand: 'push ${{ parameters.images }}' |
| 49 | + containerregistrytype: Container Registry |
| 50 | + dockerRegistryEndpoint: ${{ parameters.registryEndpoint }} |
| 51 | + dockerComposeFile: docker-compose.yml |
| 52 | + qualifyImageNames: true |
| 53 | + projectName: "" |
| 54 | + dockerComposeFileArgs: | |
| 55 | + TAG=${{ variables['Build.SourceBranchName'] }} |
| 56 | + - task: CopyFiles@2 |
| 57 | + inputs: |
| 58 | + sourceFolder: ${{ variables.Build.SourcesDirectory }}/k8s/helm |
| 59 | + targetFolder: ${{ variables['Build.ArtifactStagingDirectory'] }}/k8s/helm |
| 60 | + - task: PublishBuildArtifacts@1 |
| 61 | + inputs: |
| 62 | + pathtoPublish: ${{ variables['Build.ArtifactStagingDirectory'] }}/k8s/helm |
| 63 | + artifactName: helm |
| 64 | +- job: BuildWindows |
| 65 | + condition: ne(${{ variables['Build.Reason'] }}, 'PullRequest')) |
| 66 | + pool: |
| 67 | + vmImage: 'windows-2019' |
| 68 | + steps: |
| 69 | + - task: DockerCompose@0 |
| 70 | + displayName: Compose build apigws |
| 71 | + inputs: |
| 72 | + dockerComposeCommand: 'build mobileshoppingapigw mobilemarketingapigw webshoppingapigw webmarketingapigw' |
| 73 | + containerregistrytype: Container Registry |
| 74 | + dockerRegistryEndpoint: ${{ parameters.registryEndpoint }} |
| 75 | + dockerComposeFile: docker-compose.yml |
| 76 | + qualifyImageNames: true |
| 77 | + projectName: "" |
| 78 | + dockerComposeFileArgs: | |
| 79 | + TAG=${{ variables['Build.SourceBranchName'] }} |
| 80 | + PLATFORM=win |
| 81 | + - task: DockerCompose@0 |
| 82 | + displayName: Compose push apigws |
| 83 | + inputs: |
| 84 | + dockerComposeCommand: 'push mobileshoppingapigw mobilemarketingapigw webshoppingapigw webmarketingapigw' |
| 85 | + containerregistrytype: Container Registry |
| 86 | + dockerRegistryEndpoint: ${{ parameters.registryEndpoint }} |
| 87 | + dockerComposeFile: docker-compose.yml |
| 88 | + qualifyImageNames: true |
| 89 | + projectName: "" |
| 90 | + dockerComposeFileArgs: | |
| 91 | + TAG=${{ variables['Build.SourceBranchName'] }} |
| 92 | + PLATFORM=win |
0 commit comments