debug-* tags don't follow semantic version
I'm working on a tool to check for update on containers and for parsing versions I'm using this library https://github.com/hashicorp/go-version
The debug-* images don't follow semver and the library is not able to process them, will it be possible to switch the "debug" string at the end? so instead of debug-v1.2.0 we can have v1.2.0-debug (or v1.2.0+debug if we use it as metadata). Technically the 'v' in the front is not semver compliant neither, but at least the library is able to handle that case.
There is not need to delete the "debug-" tag, but having "-debug" or "*+debug" will be helpful for scripting
sure. we can provide that. You could easily do that by making a change to this cloudbuild.yaml to create another tag https://github.com/GoogleContainerTools/kaniko/blob/master/deploy/cloudbuild-release.yaml#L24
@tejal29 @dmaciel Would love to send in a PR for this.
name: "gcr.io/cloud-builders/docker"
args: ["tag", "gcr.io/kaniko-project/warmer:$TAG_NAME",
"gcr.io/kaniko-project/warmer:latest"]
What new tags would I need to add here ?
The warmer image is fine i guess.
you will have to do the following for the debug image.
you will have to make this change in 2 files. couldbuild-release.yaml and cloudbuild.yaml
- name: "gcr.io/cloud-builders/docker"
args: ["tag", "gcr.io/kaniko-project/executor:debug-$TAG_NAME",
"gcr.io/kaniko-project/executor:$TAG_NAME-debug"]
The above command will run
docker tag gcr.io/kaniko-project/executor:debug-v1.2.0 gcr.io/kaniko-project/executor:v1.2.0-debug
Oh and in the images
images: ["gcr.io/kaniko-project/executor:$TAG_NAME",
"gcr.io/kaniko-project/executor:latest",
"gcr.io/kaniko-project/executor:debug-$TAG_NAME",
"gcr.io/kaniko-project/executor:debug",
"gcr.io/kaniko-project/warmer:$TAG_NAME",
"gcr.io/kaniko-project/warmer:latest"]
Add the newly tagged gcr.io/kaniko-project/executor:$TAG_NAME-debug
Sounds good :+1:
I created a PR for this @tejal29 . Thanks for the help