On Tuesday, November 9, 2021 at 10:47:29 PM UTC-3 Jesse Glick wrote: > On Tue, Nov 9, 2021 at 3:06 PM José Lamas Ríos wrote: > >> Regarding 'conceptually compatible' I'm not sure whether you refer to >>> automatic deployment in general or to the way it's implemented in this case >>> >> > Well, any scheme by which the update center pattern-matches on plugin > version numbers. > > I think the most natural way to support JEP-229 in the experimental update > center would be: > > - Give `jenkins-maven-cd-action` an option to leave releases in draft > after deployment. > - Patch `isAlphaOrBeta` in the UC code to look for a GitHub release > matching the version number of the plugin. If it exists, and it is > currently in draft, treat the plugin like it is beta. > > I think that although this might work, it would be confusing. An experimental (alpha or beta) release is not the same thing as a release in draft state. I think 'draft' refers to the release process (we are preparing a release, and although we have a draft we haven't completed it yet), while 'experimental' refers to the content of the release (we did release it, but its content and functionality may not be fully validated).
Making the UC code be aware of the GitHub releases and consider their draft or final states also seems to be an undesirable coupling of so far independent mechanisms. GitHub does allow marking releases as in draft state and also, as a separate concept, optionally marking them as 'pre-release', which in their words is a way "to notify users that the release is not ready for production and may be unstable". https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository I may be wrong, but still fail to see why the use of JEP-229 may not be compatible with the publication of experimental releases, that can be a) exposed in a separate update center as usual and b) marked as "Pre-release" when published on GitHub. In my previous experiment I had tried adding "-beta" to the <version> in the pom file and that failed when archiving the artifacts because it was using <changelist> instead <version> when looking for them. I think that changing that code to use <version> (ie: not taking as granted that version == changelist) would be more appropriate, but as an alternative I tried this: - Reverted the pom to declare <version>${changelist}</version> - Added instead the beta qualifier to the changelist.format in maven.config (ie: -Dchangelist.format=%d.%s*-beta* ) - Forced a new release. The release was successful. As expected, it's not listed in the regular update center (https://updates.jenkins.io/update-center.json) but it does appear on the experimental one ( https://updates.jenkins.io/experimental/update-center.json) as version 252.356d312df76f-beta It also got published as a GitHub release using the same version identifier. However, since it wasn't declared as "pre-release", it showed there as "Latest", as a regular release. I later manually fixed that through the web UI, but it would be nice that the jenkins-maven-cd-action also recognized 'beta' or 'alpha' qualifiers in the version identifier to take care of that, the same way it's done for the update center. I think this would be easy to achieve by modifying its run.sh as follows: gh api -X PATCH -F draft=false -F name=$version -F tag_name=$version /repos/$GITHUB_REPOSITORY/releases/$release [[ $version = *alpha* || $version = *beta* ]] && isAlphaOrBeta=true || isAlphaOrBeta=false gh api -X PATCH -F draft=false -F name=$version -F tag_name=$version -F prerelease=$isAlphaOrBeta /repos/$GITHUB_REPOSITORY/releases/$release Does it make sense? It does seem simple and good enough for me, but I may be missing something. -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/fc88f856-64dd-4e8c-a83c-730e2abae372n%40googlegroups.com.