Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't try to publish artifacts on RC GitHub releases #8733

Merged
merged 2 commits into from
Dec 3, 2023

Conversation

lemeurherve
Copy link
Member

@lemeurherve lemeurherve commented Dec 1, 2023

This PR adds a condition to not run publication steps in the "Publish artifact" GitHub Action if the current version is a release candidate (ie ends with -SNAPSHOT) so the job doesn't fail, as RC versions aren't published on GitHub releases.

Related conversation during the 2.426.2 RC preparation in the #jenkinsci/release chat room: https://matrix.to/#/!JlkqzpdEnsUUuVtjgE:matrix.org/$rS0DQu7jyc6K6zo3L6c6gqeui97hZrzsWQPEkk8XfhI?via=gitter.im&via=matrix.org

See JENKINS-XXXXX.

Testing done

Tested on a fork.

Proposed changelog entries

No changelog entry, doesn't concern Core code.

Proposed upgrade guidelines

N/A

Submitter checklist

Preview Give feedback

Desired reviewers

@mention

Before the changes are marked as ready-for-merge:

Maintainer checklist

Preview Give feedback

@lemeurherve lemeurherve changed the title chore: don't run 'Publish artifact' GitHub Action for RC Don't try to publish artifacts on RC GitHub releases Dec 1, 2023
@NotMyFault NotMyFault added the skip-changelog Should not be shown in the changelog label Dec 1, 2023
Copy link
Member

@NotMyFault NotMyFault left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@NotMyFault NotMyFault requested a review from a team December 1, 2023 22:36
@@ -34,16 +35,23 @@ jobs:
is_lts=false
fi

echo "Version is $version, is_lts: $is_lts"
is_rc=false
if [[ ${version} == *"-SNAPSHOT" ]]; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The mvn command executed L28 returns the project.version from the pom.xml, which doesn't correspond to the tag.

https://github.com/jenkinsci/jenkins/pull/8733/files#diff-11648584ad8169da42bec78a0209137863ad69726133730cefff2f1eb66d20c4R28

jenkins/pom.xml

Lines 37 to 77 in 78f1e9c

<version>${revision}${changelist}</version>
<packaging>pom</packaging>
<name>Jenkins main module</name>
<description>The module that constitutes the main jenkins.war</description>
<url>https://github.com/jenkinsci/jenkins</url>
<licenses>
<license>
<name>The MIT license</name>
<url>https://opensource.org/licenses/MIT</url>
<distribution>repo</distribution>
</license>
</licenses>
<modules>
<module>bom</module>
<module>websocket/spi</module>
<module>websocket/jetty10</module>
<module>core</module>
<module>war</module>
<module>test</module>
<module>cli</module>
<module>coverage</module>
</modules>
<scm child.scm.connection.inherit.append.path="false" child.scm.developerConnection.inherit.append.path="false" child.scm.url.inherit.append.path="false">
<connection>scm:git:https://github.com/jenkinsci/jenkins.git</connection>
<developerConnection>scm:git:[email protected]:jenkinsci/jenkins.git</developerConnection>
<tag>${scmTag}</tag>
<url>https://github.com/jenkinsci/jenkins</url>
</scm>
<issueManagement>
<system>jira</system>
<url>https://issues.jenkins.io/issues/?jql=component=15593</url>
</issueManagement>
<properties>
<revision>2.435</revision>
<changelist>-SNAPSHOT</changelist>

@timja timja merged commit 932cb22 into jenkinsci:master Dec 3, 2023
@lemeurherve lemeurherve deleted the dont-publish-rc-on-gh branch December 3, 2023 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-changelog Should not be shown in the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants