kaniko icon indicating copy to clipboard operation
kaniko copied to clipboard

debug-* tags don't follow semantic version

Open dmaciel opened this issue 6 years ago • 6 comments

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

dmaciel avatar Oct 04 '20 16:10 dmaciel

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 avatar Oct 06 '20 20:10 tejal29

@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 ?

sladyn98 avatar Oct 12 '20 17:10 sladyn98

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

tejal29 avatar Oct 14 '20 17:10 tejal29

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

tejal29 avatar Oct 14 '20 17:10 tejal29

Sounds good :+1:

sladyn98 avatar Oct 16 '20 13:10 sladyn98

I created a PR for this @tejal29 . Thanks for the help

sladyn98 avatar Oct 19 '20 13:10 sladyn98