jenkins-infra / jenkins-maven-cd-action

1 stars 7 forks source link

Use annotated tags when releasing #25

Closed dduportal closed 2 years ago

dduportal commented 2 years ago

In https://github.com/jenkins-infra/helpdesk/issues/3084#issuecomment-1243798216, we ran into an issue where Jenkins was not triggering builds for a given tag because the timestamp was not when the release was published but when the release-drafter tag was initially created.

This is caused by the fact the punlishing a GitHub release generates a ligthweight git tag as per https://github.com/orgs/community/discussions/4924 .

The tag is created by https://github.com/jenkins-infra/jenkins-maven-cd-action/blob/8c5d1f581d6e39e7c89c4f36df40c27af2ae1ca7/run.sh#L12 which publishes the GH release created by release-drafter (through the GH api).

We were able to fix the issue on our custom made library by adding the -a flag when creating our tag in the Jenkins infra (ref. https://github.com/jenkins-infra/pipeline-library/pull/360) , but it is a "pure git" solution.

Not sure how to solve this issue there, maybe updating the tag created by the published release to annotate it?