Skip to content

Conversation

Bemesko
Copy link

@Bemesko Bemesko commented Dec 10, 2024

First of all, many thanks to @Parsa2820 for the PR on the original repository: microsoft/azure-pipelines-tasks#16604. All I'm doing here is making sure these changes can go ahead and be merged even after it was closed on the original repo.

Currently, even when setting both the addPipelineData and addBaseImageData to false in the Docker@2 task, the resulting docker command still includes 2 default labels:

--label com.azure.dev.image.system.teamfoundationcollectionuri=https://dev.azure.com/<my-org>/ 
--label com.azure.dev.image.build.sourceversion=<source version id>

When running the task inside a release it also includes the label release.releaseid.

This PR changes the behavior of the Docker@2 task so that adding labels with the values of system.teamfoundationcollectionuri and build.sourceversion can be enabled/disabled with the addPipelineData boolean variable, which can be set in the pipeline.

Task name: DockerV2

Description: Control the mentioned docker image labels. Previously these labels were always added, and there was no option to remove them. This behavior caused the private repository URI to be exposed in the docker image.

Documentation changes required: (Y/N) N

Added unit tests: (Y/N) N

Attached related issue: (Y/N) microsoft/azure-pipelines-tasks#13268 (Not sure if the issues on the old repository are still relevant, I'd gladly open one in here if necessary).

Checklist:

  • Task version was bumped - please check instruction how to do it
  • Checked that applied changes work as expected

@Bemesko Bemesko requested review from a team and manolerazvan as code owners December 10, 2024 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant