Skip to content

Pipeline variable not able to be used in tagname #38

@ghost

Description

Within my Jenkins pipeline I have defined a variable (build number)
Within the task were I create the docker images nd push it to ACR using the ACR Quick Task plugin.
I would like to use that variable as my tag

So my Image name with tag field, looks like
image_name:$VARIABLE

But I get this error:

ERROR: Failed to queue an ACR Quick Task: Some of the properties of 'runRequest' are invalid. InnerErrors: DockerBuildRequest:Image name 'image_name:$VARIABLE' is invalid. \nThe acceptable patterns are 'repository' or 'repository:tag'.The repository and tag names follow the standardized docker repository and tag naming conventions. Tag templates are supported within '{' and '}'.
ERROR: ACR Quick Task ended with HasError
Finished: FAILURE

To check if my variable is set, I created the build step "execute shell" and echo the $VARIABLE and there I get a number:

[task-name] $ /bin/sh -xe /tmp/jenkins6236765085731703135.sh
+ VARIABLE=12

To use the latest tag is not an option

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions