Open ghost opened 5 years ago
@yuwzho Could you please take a look at this?
Also having this problem.
Hi @sshorkey @FrankGNL We do nothing about the variable inside the plugin. Our as well many other Jenkins plugins' suggestion is to use the EnvInject Plugin to handle the varibale.
For instance, the imageNames
can be written as imageNames: [[image: "<your image name>:$env.BUILD_NUMBER"]]
I'm facing the same issue when trying to use a build variable in a Freestyle job:
This variable exists and is used elsewhere in the build, but errors when using this plugin:
ERROR: Failed to queue an ACR Quick Task: Some of the properties of 'runRequest' are invalid.. InnerErrors: DockerBuildRequest:Image name 'my-app:${DESIRED_TAG}' is invalid. The 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 '}}'.
I also tried without curly braces, like following. But the error still occurs.
my-app:$DESIRED_TAG
How can we make this input dynamic? Using latest is also not an option for me.
There is a built-in Jenkins class which can handle environment variable expansion, so I've opened a PR with the fix: https://github.com/jenkinsci/azure-container-registry-tasks-plugin/pull/5.
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:
To check if my variable is set, I created the build step "execute shell" and echo the $VARIABLE and there I get a number:
To use the latest tag is not an option