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 task output variable has no value #14537

Closed
jcfiorenzano opened this issue Mar 5, 2021 · 3 comments
Closed

Docker task output variable has no value #14537

jcfiorenzano opened this issue Mar 5, 2021 · 3 comments

Comments

@jcfiorenzano
Copy link
Contributor

Required Information

Question, Bug, or Feature?
Type: Bug

Enter Task Name: DockerV1(1.181.0) , DockerV2 (2.182.0)

Environment

  • Server - Azure Pipelines or TFS on-premises? Azure Pipelines

    • If using Hosted agent, provide agent queue name: Azure Pipelines

Issue Description

My team is using the content of the output variable "Docker.Output" to do further processing with its content, we have face cases where the value of this variable is empty even though the execution was successful

For example
image
image

Looking at that build telemetry we found that the Docker.Output variable was empty

image

@ajinkya599
Copy link
Contributor

Hi @jcfiorenzano,
In the build you shared, I see that ReferenceName is not set for the Docker tasks.
Can you please verify whether the task ReferenceName is set correctly in the pipelines? [Reference]

@ajinkya599
Copy link
Contributor

ajinkya599 commented Mar 18, 2021

Summary from offline discussion -

  • Short: This is expected for DockerV0 and DockerV1. Waiting for @jcfiorenzano to share the debug logs with DockerV2.
  • Long:
    • The behaviour of output variable was different for older versions of the Docker task (DockerV0 and DockerV1). It stored the output of the Docker command in the variable (and not a file path). Also, they didn’t support all commands (Docker build/push etc would output empty) and skip writing the variable if the output is too large (env variable max length).
    • This was changed in DockerV2. In DockerV2, we started writing the output to a file and set the DockerOutput as the output file path.
    • The logs shared (offline) were for DockerV1. To investigate further, need debug logs where DockerV2 is being used and the issue is happening.
    • ReferenceName was not the issue as the behaviour is: "If there is one instance of task in the job, it gets the name Docker.DockerOutput, and if there are multiple, they get the names Docker1.DockerOutput, Docker2.DockerOutput and so on"

@ajinkya599
Copy link
Contributor

This is expected behavior for DockerV0 and DockerV1.
Closing as confirmed offline that this is not happening for DockerV2.

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

No branches or pull requests

3 participants