jenkins-infra / packer-images

This repository hosts the packer definitions for the Jenkins Infrastructure
MIT License
18 stars 18 forks source link

Builds fail since the tag version now has a "v" prefix #227

Closed lemeurherve closed 2 years ago

lemeurherve commented 2 years ago

Since https://github.com/jenkins-infra/packer-images/commit/a07904029994d3e5306e8f45ee6fa9fb2d9093d2 the release-drafter isn't surcharged in this repo, and instead rely only on the global .github configuration, which defines (https://github.com/jenkins-infra/.github/blob/dfa1b56452124590001ad12bd305a89c6fa39e04/.github/release-drafter.yml#L2-L3) for version in names and tags:

name-template: 'v$RESOLVED_VERSION 🌈'
tag-template: 'v$RESOLVED_VERSION'

As a result, the new tags contain a "v" prefix (cf 0.23.0 vs. v0.24.0), which isn't accepted and fail the builds:

image
dduportal commented 2 years ago

Looks good, thanks for fixing my mess!

Not important question: is there a reason for not removing the vprefix in the packer templates?

lemeurherve commented 2 years ago

removing the vprefix in the packer templates?

I don't see what templates you are talking about, do you have a link please?

dduportal commented 2 years ago

No problem :)

I was referring to: https://github.com/jenkins-infra/packer-images/blob/main/jenkins-agent.pkr.hcl#L51

There is a comment stating the need for a valid semver in Azure, but I'm sure I could have done that better in the packer template, by defining a local value that would trim the v prefix for instance, or any other HCL function.

lemeurherve commented 2 years ago

I see, 👍 We decided with @smerle33 the version without any prefix was preferable for most/all our builds anyway, so no v :)

dduportal commented 2 years ago

I see, 👍 We decided with @smerle33 the version without any prefix was preferable for most/all our builds anyway, so no v :)

Totally make sense, thanks for fixing it globally!