Skip to content

Commit

Permalink
Enable automated releases (#274)
Browse files Browse the repository at this point in the history
  • Loading branch information
timja authored Feb 25, 2025
1 parent 9969123 commit 18b7f53
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 32 deletions.
3 changes: 0 additions & 3 deletions .github/release-drafter.yml

This file was deleted.

54 changes: 54 additions & 0 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Note: additional setup is required, see https://www.jenkins.io/redirect/continuous-delivery-of-plugins
#
# Please find additional hints for individual trigger use case
# configuration options inline this script below.
#
---
name: cd
on:
workflow_dispatch:
inputs:
validate_only:
required: false
type: boolean
description: |
Run validation with release drafter only
→ Skip the release job
# Note: Change this default to true,
# if the checkbox should be checked by default.
default: false
# If you don't want any automatic trigger in general, then
# the following check_run trigger lines should all be commented.
# Note: Consider the use case #2 config for 'validate_only' below
# as an alternative option!
check_run:
types:
- completed

permissions:
checks: read
contents: write

jobs:
maven-cd:
uses: jenkins-infra/github-reusable-workflows/.github/workflows/maven-cd.yml@v1
with:
# Comment / uncomment the validate_only config appropriate to your preference:
#
# Use case #1 (automatic release):
# - Let any successful Jenkins build trigger another release,
# if there are merged pull requests of interest
# - Perform a validation only run with drafting a release note,
# if manually triggered AND inputs.validate_only has been checked.
#
validate_only: ${{ inputs.validate_only == true }}
#
# Alternative use case #2 (no automatic release):
# - Same as use case #1 - but:
# - Let any check_run trigger a validate_only run.
# => enforce the release job to be skipped.
#
#validate_only: ${{ inputs.validate_only == true || github.event_name == 'check_run' }}
secrets:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_TOKEN: ${{ secrets.MAVEN_TOKEN }}
16 changes: 0 additions & 16 deletions .github/workflows/release-drafter.yml

This file was deleted.

1 change: 1 addition & 0 deletions .mvn/maven.config
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
-Pconsume-incrementals
-Pmight-produce-incrementals
-Dchangelist.format=%d.v%s
16 changes: 3 additions & 13 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,14 @@

<groupId>io.jenkins.plugins</groupId>
<artifactId>checks-api</artifactId>
<version>${revision}${changelist}</version>
<version>${changelist}</version>
<packaging>hpi</packaging>

<name>Checks API plugin</name>
<description>Defines an API for Jenkins to publish checks to SCM platforms.</description>

<properties>
<revision>2.2.4</revision>
<changelist>-SNAPSHOT</changelist>
<changelist>999999-SNAPSHOT</changelist>
<gitHubRepo>jenkinsci/${project.artifactId}-plugin</gitHubRepo>

<testcontainers.version>1.20.5</testcontainers.version>
Expand All @@ -37,7 +36,7 @@
<connection>scm:git:https://github.com/${gitHubRepo}.git</connection>
<developerConnection>scm:git:[email protected]:${gitHubRepo}.git</developerConnection>
<url>https://github.com/${gitHubRepo}</url>
<tag>v2.2.2</tag>
<tag>${scmTag}</tag>
</scm>

<dependencies>
Expand Down Expand Up @@ -190,13 +189,4 @@
<url>https://repo.jenkins-ci.org/public/</url>
</pluginRepository>
</pluginRepositories>

<developers>
<developer>
<id>xiongkezhi</id>
<name>Kezhi Xiong</name>
<email>[email protected]</email>
</developer>
</developers>

</project>

0 comments on commit 18b7f53

Please sign in to comment.