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

Docker V0 and V1 store build output in temp file #14773

Conversation

jcfiorenzano
Copy link
Contributor

Task name: Docker

Description: the build command is going to store the output of docker in a temp file and is going to store its path in an output variable

Added unit tests: N

Attached related issue: #14537

Checklist:

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

Tasks/DockerV1/task.json Outdated Show resolved Hide resolved
Tasks/DockerV0/task.json Outdated Show resolved Hide resolved
Tasks/DockerV0/utils.ts Show resolved Hide resolved
Tasks/DockerV0/containerbuild.ts Outdated Show resolved Hide resolved
Tasks/DockerV1/containerbuild.ts Show resolved Hide resolved
Tasks/DockerV1/containerbuild.ts Outdated Show resolved Hide resolved
@jcfiorenzano
Copy link
Contributor Author

jcfiorenzano commented May 4, 2021

Hi @ajinkya599 this is the result of this PR running in a pipeline:

DockerV0:

Variable set:
image

File content:

Sending build context to Docker daemon  66.05kB

Step 1/1 : FROM ubuntu:16.04
 ---> aefd7f02ae24
Successfully built aefd7f02ae24
Successfully tagged test-docker:31
SECURITY WARNING: You are building a Docker image from Windows against a non-Windows Docker host. All files and directories added to build context will have '-rwxr-xr-x' permissions. It is recommended to double check and reset permissions for sensitive files and directories.

Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them

DockerV1:

Variable set:
image

File content:

Sending build context to Docker daemon  66.05kB

Step 1/3 : FROM ubuntu:16.04
 ---> aefd7f02ae24
Step 2/3 : LABEL me.vsts.contoso.image.build.sourceversion=e7fa3b0c53bdb6c480f2140f1a9e9f20a0f215e6
 ---> Running in 75e53052d909
Removing intermediate container 75e53052d909
 ---> 281c21efe972
Step 3/3 : LABEL me.vsts.contoso.image.system.teamfoundationcollectionuri=https://contoso.vsts.me/
 ---> Running in 789e7afd6cc9
Removing intermediate container 789e7afd6cc9
 ---> 5288a4f2f801
Successfully built 5288a4f2f801
Successfully tagged test-docker:32
SECURITY WARNING: You are building a Docker image from Windows against a non-Windows Docker host. All files and directories added to build context will have '-rwxr-xr-x' permissions. It is recommended to double check and reset permissions for sensitive files and directories.

Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them

Copy link
Contributor

@ajinkya599 ajinkya599 left a comment

Choose a reason for hiding this comment

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

🚀

@alexander-smolyakov
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 4 pipeline(s).

Tests were failing when run in an agent becuase the path was looking at the wrong path
@ajinkya599
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 4 pipeline(s).

@ajinkya599 ajinkya599 merged commit ea2446c into microsoft:master May 5, 2021
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.

3 participants