You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Whenver I use $CI_COMMIT_TAG Kaniko fails to build with the following error -
$ IMAGE_TAG="namespace/project:$CI_COMMIT_TAG"
$ echo $IMAGE_TAG
namespace/project:v1.0.24
$ cat ${DOCKER_HUB_AUTH} > /kaniko/.docker/config.json
$ /kaniko/executor --context="${CI_PROJECT_DIR}" --dockerfile="./Dockerfile" --destination="$IMAGE_TAG" --build-arg CI_TOKEN="${CI_JOB_TOKEN}" --verbosity debug
DEBU[0000] Copying file /builds/namespace/project/Dockerfile to /kaniko/Dockerfile
error checking push permissions -- make sure you entered the correct tag name, and that you are authenticated correctly, and try again: checking push permission for "namespace/project:v1.0.24": POST https://index.docker.io/v2/namespace/project/blobs/uploads/: UNAUTHORIZED: authentication required; [map[Action:pull Class: Name:namespace/project Type:repository] map[Action:push Class: Name:namespace/project Type:repository]]
I have tried various different ways of setting the destination string and it always fails whenever the variable $CI_COMMIT_TAG is in use. If I hardcode the tag name it works correctly, if I try using a different Gitlab CI variable such as $CI_COMMIT_SHORT_SHA it works correctly and pushes to Docker hub.
As you can see in the CI log the git tag is available and not empty, it can be echo'd correctly.
Expected behavior
I expect to be able to push to Docker hub with a git tag as set via Gitlab CI as a CI variable.
To Reproduce
Attempt to run a Kaniko build using gitlab CI $CI_COMMIT_TAG environment variable.
The text was updated successfully, but these errors were encountered:
Actual behavior
Using Kaniko in my gitlab-ci.yml file to build and push images on new tags -
Whenver I use
$CI_COMMIT_TAG
Kaniko fails to build with the following error -I have tried various different ways of setting the destination string and it always fails whenever the variable
$CI_COMMIT_TAG
is in use. If I hardcode the tag name it works correctly, if I try using a different Gitlab CI variable such as$CI_COMMIT_SHORT_SHA
it works correctly and pushes to Docker hub.As you can see in the CI log the git tag is available and not empty, it can be echo'd correctly.
Expected behavior
I expect to be able to push to Docker hub with a git tag as set via Gitlab CI as a CI variable.
To Reproduce
Attempt to run a Kaniko build using gitlab CI
$CI_COMMIT_TAG
environment variable.The text was updated successfully, but these errors were encountered: