Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Docker V2 task - Simplify the task inputs for YAML #9707

Merged
merged 6 commits into from
Mar 15, 2019

Conversation

ajinkya599
Copy link
Contributor

@ajinkya599 ajinkya599 commented Feb 28, 2019

Simplify the task inputs for YAML by removing Container registry type and other complex inputs which can be supported using arguments.

Added support for multiple logins/logouts.

Bumping up versions of other tasks dependent on docker-common. Using milestone based versioning. (DockerComposeV0, DockerV0, DockerV1, KubernetesV0, KubernetesV1)

Tasks/DockerV2/task.json Outdated Show resolved Hide resolved
Tasks/Common/docker-common/azdevutils.ts Outdated Show resolved Hide resolved
Tasks/DockerV2/docker.ts Outdated Show resolved Hide resolved
Tasks/DockerV2/dockerbuild.ts Outdated Show resolved Hide resolved
Tasks/DockerV2/dockerbuild.ts Outdated Show resolved Hide resolved
Tasks/Common/docker-common/azdevutils.ts Outdated Show resolved Hide resolved
Tasks/Common/docker-common/azdevutils.ts Outdated Show resolved Hide resolved
Tasks/Common/docker-common/azdevutils.ts Outdated Show resolved Hide resolved
addLabel(command, hostName, "build.repository.name", "BUILD_REPOSITORY_NAME");
}

export function addBuildLabels(command: ToolRunner, hostName: string): void {
Copy link
Contributor

Choose a reason for hiding this comment

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

Add suffix of Args to all such function. We should add pipeline labels for build .

export function addCommonLabels(command: ToolRunner, hostName: string): void {
addLabel(command, hostName, "system.teamfoundationcollectionuri", "SYSTEM_TEAMFOUNDATIONCOLLECTIONURI");
addLabel(command, hostName, "system.teamproject", "SYSTEM_TEAMPROJECT");
addLabel(command, hostName, "build.repository.name", "BUILD_REPOSITORY_NAME");
Copy link
Contributor

Choose a reason for hiding this comment

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

build.repository.name should probably be pipeline.repository.name

if (hostName) {
addCommonLabels(command, hostName);
let hostType = tl.getVariable("SYSTEM_HOSTTYPE");
if (hostType.toLowerCase() === "build") {
Copy link
Contributor

Choose a reason for hiding this comment

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

is the hostType pipeline as well for pipelines? If not, can you please file a bug on build team for this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hostType is build only. You will be writing the mail as discussed.

Tasks/DockerV2/utils.ts Outdated Show resolved Hide resolved
Tasks/DockerV2/dockerpush.ts Outdated Show resolved Hide resolved
Tasks/DockerV2/dockerpush.ts Outdated Show resolved Hide resolved
Tasks/Common/docker-common/containerconnection.ts Outdated Show resolved Hide resolved
Tasks/Common/docker-common/containerconnection.ts Outdated Show resolved Hide resolved
Tasks/Common/docker-common/containerconnection.ts Outdated Show resolved Hide resolved
Tasks/Common/docker-common/containerconnection.ts Outdated Show resolved Hide resolved
Tasks/DockerV2/dockerlogout.ts Show resolved Hide resolved
Tasks/DockerV2/dockerbuild.ts Show resolved Hide resolved
@ajinkya599 ajinkya599 changed the title Docker V2 task - Simplify the task inputs for YAML Adding Docker V2 task - Simplify the task inputs for YAML Mar 13, 2019
@ajinkya599 ajinkya599 force-pushed the users/aj/dockerV2 branch 3 times, most recently from 24c9063 to 0e92fe5 Compare March 13, 2019 10:04
…ner registry type and other complex inputs which can be supported using arguments
- Fixed some issues with buildAndPush and login
- Added debug logs
- bumping up versions of other tasks dependent on docker-common (causing PR build failures)
- Bump up versions for tasks depending on docker-common (Use milestone versioning)
@ajinkya599 ajinkya599 merged commit 3d08e79 into master Mar 15, 2019
@photomoose
Copy link

When will this be available for use in Pipelines? Attempts at using it result in the following error:

"An error occurred while loading the YAML build pipeline. wrong number of segments"

@bansalaseem
Copy link
Contributor

It should be available in next 3-4 weeks on Azure Devops.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants