apigws build test with templates
This commit is contained in:
parent
2de66ba682
commit
ac0da28f59
@ -16,68 +16,10 @@ trigger:
|
|||||||
- src/ApiGateways/Mobile.Bff.Shopping/aggregator/*
|
- src/ApiGateways/Mobile.Bff.Shopping/aggregator/*
|
||||||
- src/ApiGateways/Web.Bff.Shopping/aggregator/*
|
- src/ApiGateways/Web.Bff.Shopping/aggregator/*
|
||||||
jobs:
|
jobs:
|
||||||
- job: BuildLinux
|
- template: ../buildimages.yaml
|
||||||
pool:
|
parameters:
|
||||||
vmImage: 'ubuntu-16.04'
|
images: mobileshoppingapigw mobilemarketingapigw webshoppingapigw webmarketingapigw
|
||||||
steps:
|
registryEndpoint: $(registryEndpoint)
|
||||||
- task: DockerCompose@0
|
|
||||||
displayName: Compose build apigws
|
|
||||||
inputs:
|
|
||||||
dockerComposeCommand: 'build mobileshoppingapigw mobilemarketingapigw webshoppingapigw webmarketingapigw'
|
|
||||||
containerregistrytype: Container Registry
|
|
||||||
dockerRegistryEndpoint: $(registryEndpoint)
|
|
||||||
dockerComposeFile: docker-compose.yml
|
|
||||||
qualifyImageNames: true
|
|
||||||
projectName: ""
|
|
||||||
dockerComposeFileArgs: |
|
|
||||||
TAG=$(Build.SourceBranchName)
|
|
||||||
- task: DockerCompose@0
|
|
||||||
displayName: Compose push apigws
|
|
||||||
inputs:
|
|
||||||
dockerComposeCommand: 'push mobileshoppingapigw mobilemarketingapigw webshoppingapigw webmarketingapigw'
|
|
||||||
containerregistrytype: Container Registry
|
|
||||||
dockerRegistryEndpoint: $(registryEndpoint)
|
|
||||||
dockerComposeFile: docker-compose.yml
|
|
||||||
qualifyImageNames: true
|
|
||||||
projectName: ""
|
|
||||||
dockerComposeFileArgs: |
|
|
||||||
TAG=$(Build.SourceBranchName)
|
|
||||||
- task: CopyFiles@2
|
|
||||||
inputs:
|
|
||||||
sourceFolder: $(Build.SourcesDirectory)/k8s/helm
|
|
||||||
targetFolder: $(Build.ArtifactStagingDirectory)/k8s/helm
|
|
||||||
- task: PublishBuildArtifacts@1
|
|
||||||
inputs:
|
|
||||||
pathtoPublish: $(Build.ArtifactStagingDirectory)/k8s/helm
|
|
||||||
artifactName: helm
|
|
||||||
- job: BuildWindows
|
|
||||||
pool:
|
|
||||||
vmImage: 'windows-2019'
|
|
||||||
steps:
|
|
||||||
- task: DockerCompose@0
|
|
||||||
displayName: Compose build apigws
|
|
||||||
inputs:
|
|
||||||
dockerComposeCommand: 'build mobileshoppingapigw mobilemarketingapigw webshoppingapigw webmarketingapigw'
|
|
||||||
containerregistrytype: Container Registry
|
|
||||||
dockerRegistryEndpoint: $(registryEndpoint)
|
|
||||||
dockerComposeFile: docker-compose.yml
|
|
||||||
qualifyImageNames: true
|
|
||||||
projectName: ""
|
|
||||||
dockerComposeFileArgs: |
|
|
||||||
TAG=$(Build.SourceBranchName)
|
|
||||||
PLATFORM=win
|
|
||||||
- task: DockerCompose@0
|
|
||||||
displayName: Compose push apigws
|
|
||||||
inputs:
|
|
||||||
dockerComposeCommand: 'push mobileshoppingapigw mobilemarketingapigw webshoppingapigw webmarketingapigw'
|
|
||||||
containerregistrytype: Container Registry
|
|
||||||
dockerRegistryEndpoint: $(registryEndpoint)
|
|
||||||
dockerComposeFile: docker-compose.yml
|
|
||||||
qualifyImageNames: true
|
|
||||||
projectName: ""
|
|
||||||
dockerComposeFileArgs: |
|
|
||||||
TAG=$(Build.SourceBranchName)
|
|
||||||
PLATFORM=win
|
|
||||||
- template: ../multiarch.yaml
|
- template: ../multiarch.yaml
|
||||||
parameters:
|
parameters:
|
||||||
image: ocelotapigw
|
image: ocelotapigw
|
||||||
|
92
build/azure-devops/buildimages.yaml
Normal file
92
build/azure-devops/buildimages.yaml
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
parameters:
|
||||||
|
images: ''
|
||||||
|
registryEndpoint: ''
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
- job: BuildContainersForPR_Linux
|
||||||
|
condition: eq(${{ variables['Build.Reason'] }}, 'PullRequest'))
|
||||||
|
pool:
|
||||||
|
vmImage: 'ubuntu-16.04'
|
||||||
|
steps:
|
||||||
|
- task: Bash@3
|
||||||
|
displayName: Create multiarch manifest
|
||||||
|
inputs:
|
||||||
|
script: docker-compose build ${{ parameters.images }}
|
||||||
|
env:
|
||||||
|
TAG: ${{ variables['Build.SourceBranchName'] }}
|
||||||
|
- job: BuildContainersForPR_Windows
|
||||||
|
condition: eq(${{ variables['Build.Reason'] }}, 'PullRequest'))
|
||||||
|
pool:
|
||||||
|
vmImage: 'windows-2019'
|
||||||
|
steps:
|
||||||
|
- task: Bash@3
|
||||||
|
displayName: Create multiarch manifest
|
||||||
|
inputs:
|
||||||
|
env:
|
||||||
|
TAG: ${{ variables['Build.SourceBranchName'] }}
|
||||||
|
PLATFORM: win
|
||||||
|
script: docker-compose build ${{ parameters.images }}
|
||||||
|
- job: BuildLinux
|
||||||
|
condition: ne(${{ variables['Build.Reason'] }}, 'PullRequest'))
|
||||||
|
pool:
|
||||||
|
vmImage: 'ubuntu-16.04'
|
||||||
|
steps:
|
||||||
|
- task: DockerCompose@0
|
||||||
|
displayName: Compose build ${{ parameters.images }}
|
||||||
|
inputs:
|
||||||
|
dockerComposeCommand: 'build ${{ parameters.images }}'
|
||||||
|
containerregistrytype: Container Registry
|
||||||
|
dockerRegistryEndpoint: ${{ parameters.registryEndpoint }}
|
||||||
|
dockerComposeFile: docker-compose.yml
|
||||||
|
qualifyImageNames: true
|
||||||
|
projectName: ""
|
||||||
|
dockerComposeFileArgs: |
|
||||||
|
TAG=${{ variables['Build.SourceBranchName'] }}
|
||||||
|
- task: DockerCompose@0
|
||||||
|
displayName: Compose push apigws
|
||||||
|
inputs:
|
||||||
|
dockerComposeCommand: 'push ${{ parameters.images }}'
|
||||||
|
containerregistrytype: Container Registry
|
||||||
|
dockerRegistryEndpoint: ${{ parameters.registryEndpoint }}
|
||||||
|
dockerComposeFile: docker-compose.yml
|
||||||
|
qualifyImageNames: true
|
||||||
|
projectName: ""
|
||||||
|
dockerComposeFileArgs: |
|
||||||
|
TAG=${{ variables['Build.SourceBranchName'] }}
|
||||||
|
- task: CopyFiles@2
|
||||||
|
inputs:
|
||||||
|
sourceFolder: ${{ variables.Build.SourcesDirectory }}/k8s/helm
|
||||||
|
targetFolder: ${{ variables['Build.ArtifactStagingDirectory'] }}/k8s/helm
|
||||||
|
- task: PublishBuildArtifacts@1
|
||||||
|
inputs:
|
||||||
|
pathtoPublish: ${{ variables['Build.ArtifactStagingDirectory'] }}/k8s/helm
|
||||||
|
artifactName: helm
|
||||||
|
- job: BuildWindows
|
||||||
|
condition: ne(${{ variables['Build.Reason'] }}, 'PullRequest'))
|
||||||
|
pool:
|
||||||
|
vmImage: 'windows-2019'
|
||||||
|
steps:
|
||||||
|
- task: DockerCompose@0
|
||||||
|
displayName: Compose build apigws
|
||||||
|
inputs:
|
||||||
|
dockerComposeCommand: 'build mobileshoppingapigw mobilemarketingapigw webshoppingapigw webmarketingapigw'
|
||||||
|
containerregistrytype: Container Registry
|
||||||
|
dockerRegistryEndpoint: ${{ parameters.registryEndpoint }}
|
||||||
|
dockerComposeFile: docker-compose.yml
|
||||||
|
qualifyImageNames: true
|
||||||
|
projectName: ""
|
||||||
|
dockerComposeFileArgs: |
|
||||||
|
TAG=${{ variables['Build.SourceBranchName'] }}
|
||||||
|
PLATFORM=win
|
||||||
|
- task: DockerCompose@0
|
||||||
|
displayName: Compose push apigws
|
||||||
|
inputs:
|
||||||
|
dockerComposeCommand: 'push mobileshoppingapigw mobilemarketingapigw webshoppingapigw webmarketingapigw'
|
||||||
|
containerregistrytype: Container Registry
|
||||||
|
dockerRegistryEndpoint: ${{ parameters.registryEndpoint }}
|
||||||
|
dockerComposeFile: docker-compose.yml
|
||||||
|
qualifyImageNames: true
|
||||||
|
projectName: ""
|
||||||
|
dockerComposeFileArgs: |
|
||||||
|
TAG=${{ variables['Build.SourceBranchName'] }}
|
||||||
|
PLATFORM=win
|
@ -5,6 +5,7 @@ parameters:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
- job: manifest
|
- job: manifest
|
||||||
|
condition: ne(variables['Build.Reason'], 'PullRequest'))
|
||||||
pool:
|
pool:
|
||||||
vmImage: 'Ubuntu 16.04'
|
vmImage: 'Ubuntu 16.04'
|
||||||
steps:
|
steps:
|
||||||
@ -14,14 +15,16 @@ jobs:
|
|||||||
command: login
|
command: login
|
||||||
containerregistrytype: 'Container Registry'
|
containerregistrytype: 'Container Registry'
|
||||||
dockerRegistryEndpoint: ${{ parameters.registryEndpoint }}
|
dockerRegistryEndpoint: ${{ parameters.registryEndpoint }}
|
||||||
- bash: |
|
- task: Bash@3
|
||||||
mkdir -p ~/.docker
|
displayName: Create multiarch manifest
|
||||||
echo '{ "experimental": "enabled" }' > ~/.docker/config.json
|
inputs:
|
||||||
docker --config ~/.docker manifest create eshop/${{ parameters.image }}:${{ parameters.branch }} eshop/${{ parameters.image }}:linux-${{ parameters.branch }} eshop/${{ parameters.image }}:win-${{ parameters.branch }}
|
script: |
|
||||||
docker --config ~/.docker manifest create eshop/${{ parameters.image }}:latest eshop/${{ parameters.image }}:linux-latest eshop/${{ parameters.image }}:win-latest
|
mkdir -p ~/.docker
|
||||||
docker --config ~/.docker push eshop/${{ parameters.image }}:${{ parameters.branch }}
|
echo '{ "experimental": "enabled" }' > ~/.docker/config.json
|
||||||
docker --config ~/.docker push eshop/${{ parameters.image }}:latest
|
docker --config ~/.docker manifest create eshop/${{ parameters.image }}:${{ parameters.branch }} eshop/${{ parameters.image }}:linux-${{ parameters.branch }} eshop/${{ parameters.image }}:win-${{ parameters.branch }}
|
||||||
displayName: 'Create Manifest'
|
docker --config ~/.docker manifest create eshop/${{ parameters.image }}:latest eshop/${{ parameters.image }}:linux-latest eshop/${{ parameters.image }}:win-latest
|
||||||
|
docker --config ~/.docker push eshop/${{ parameters.image }}:${{ parameters.branch }}
|
||||||
|
docker --config ~/.docker push eshop/${{ parameters.image }}:latest
|
||||||
dependsOn:
|
dependsOn:
|
||||||
- BuildWindows
|
- BuildWindows
|
||||||
- BuildLinux
|
- BuildLinux
|
||||||
|
Loading…
x
Reference in New Issue
Block a user