Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions .azurePipeline/templateDockerBuildPush.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,16 @@ jobs:
docker login -u $(dockerHubId) -p $(dockerHubPassword)
displayName: 'Dockerhub login'
- script: |
if [[ -z "${{ parameters.dockerFilePath }}" ]]; then
docker build -t ${{ parameters.imageName }}:$(DOCKER_TAG) $(DOCKER_BUILD_ARGS) ${{ parameters.folder }}
if [[ "$SKIP" == "False" ]]; then
if [[ -z "${{ parameters.dockerFilePath }}" ]]; then
docker build -t ${{ parameters.imageName }}:$(DOCKER_TAG) $(DOCKER_BUILD_ARGS) ${{ parameters.folder }}
else
docker build -t ${{ parameters.imageName }}:$(DOCKER_TAG) -f ${{ parameters.dockerFilePath }} $(DOCKER_BUILD_ARGS) ${{ parameters.folder }}
fi
docker push ${{ parameters.imageName }}:$(DOCKER_TAG)
else
docker build -t ${{ parameters.imageName }}:$(DOCKER_TAG) -f ${{ parameters.dockerFilePath }} $(DOCKER_BUILD_ARGS) ${{ parameters.folder }}
echo "Skipping build"
fi
docker push ${{ parameters.imageName }}:$(DOCKER_TAG)
displayName: 'Build and push docker image'

# Updated from the documentation https://docs.microsoft.com/en-us/azure/devops/pipelines/process/templates?view=azure-devops
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ stages:
dependsOn: HashBaseDependencies
imageName: data61/anonlink-app
# this part is still todo automated
dockerBuildArgs: "--build-arg VERSION=02a973ce02c96d24376c5770c0426ccb0958a0d59136a4f2fc11c8666c43062a"
dockerBuildArgs: "--build-arg VERSION=ed0be6ee130ec505b2a65af26ba570e1033ffb7e0cc6b27b6a8520df94f65d20"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is really annoying. When we change the base image requirements, although a new version gets build, it will not be tested. We already had a non-functioning base image. We really need to find a way to test the new base images straight away.

#dockerBuildArgs: "--build-arg VERSION=$[dependencies.HashBaseDependencies.outputs['SetDockerBaseTag.DOCKER_BASE_TAG']]"

- stage: stage_docker_nginx_image_build
Expand Down