empty string?

This commit is contained in:
Brad Warren 2020-08-12 15:59:44 -07:00
parent 90091c557d
commit 507c6ff431
4 changed files with 20 additions and 25 deletions

View file

@ -8,9 +8,10 @@ pr: none
stages:
- template: templates/stages/test-and-package-stage.yml
parameters:
dockerTag: ${{variables['Build.SourceBranchName']}}
- template: templates/stages/changelog-stage.yml
- template: templates/stages/deploy-stage.yml
parameters:
snapReleaseChannel: beta
dockerTag: ${{variables['Build.SourceBranchName']}}
- template: templates/stages/notify-failure-stage.yml

View file

@ -1,12 +1,17 @@
parameters:
- name: dockerTag
type: string
jobs:
# If this job name is changed, the value of builtDockerTag in the deploy
# stage needs to be updated.
- job: docker_build
pool:
vmImage: ubuntu-18.04
steps:
- bash: |
docker images
tools/docker/build.sh nightly
docker images
tools/docker/build.sh ${{ parameters.dockerTag }}
echo "##vso[task.setvariable variable=builtDockerTag;isOutput=true]${{ parameters.dockerTag }}"
displayName: Build the Docker images
- job: installer_build
pool:

View file

@ -5,9 +5,6 @@ parameters:
values:
- edge
- beta
- name: dockerTag
type: string
default: nightly
stages:
- stage: Deploy
@ -65,23 +62,8 @@ stages:
- job: publish_docker
pool:
vmImage: ubuntu-18.04
variables:
builtDockerTag: $[ stageDependencies.TestAndPackage.docker_build.outputs['foo.bar'] ]
steps:
- task: Docker@2
inputs:
command: login
# The credentials used here are for the shared certbotbot account
# on Docker Hub. The credentials are stored in a service account
# which was created by following the instructions at
# https://docs.microsoft.com/en-us/azure/devops/pipelines/library/service-endpoints?view=azure-devops&tabs=yaml#sep-docreg.
# The name given to this service account must match the value
# given to containerRegistry below. "Grant access to all
# pipelines" should also be checked. To revoke these
# credentials, we can change the password on the certbotbot
# Docker Hub account or remove the account from the
# Certbot organization on Docker Hub.
containerRegistry: docker-hub
displayName: Login to Docker Hub
- bash: tools/docker/build.sh ${{ parameters.dockerTag }}
displayName: Build the Docker images
- bash: tools/docker/deploy.sh ${{ parameters.dockerTag }}
- bash: echo $(builtDockerTag)
displayName: Deploy the Docker images

View file

@ -1,4 +1,11 @@
parameters:
- name: dockerTag
type: string
default: nightly
stages:
# If this stage name is changed, the value of builtDockerTag in the deploy
# stage needs to be updated.
- stage: TestAndPackage
jobs:
- template: ../jobs/standard-tests-jobs.yml