Skip to content

Commit 18b7f53

Browse files
authored
Enable automated releases (#274)
1 parent 9969123 commit 18b7f53

5 files changed

Lines changed: 58 additions & 32 deletions

File tree

.github/release-drafter.yml

Lines changed: 0 additions & 3 deletions
This file was deleted.

.github/workflows/cd.yaml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Note: additional setup is required, see https://www.jenkins.io/redirect/continuous-delivery-of-plugins
2+
#
3+
# Please find additional hints for individual trigger use case
4+
# configuration options inline this script below.
5+
#
6+
---
7+
name: cd
8+
on:
9+
workflow_dispatch:
10+
inputs:
11+
validate_only:
12+
required: false
13+
type: boolean
14+
description: |
15+
Run validation with release drafter only
16+
→ Skip the release job
17+
# Note: Change this default to true,
18+
# if the checkbox should be checked by default.
19+
default: false
20+
# If you don't want any automatic trigger in general, then
21+
# the following check_run trigger lines should all be commented.
22+
# Note: Consider the use case #2 config for 'validate_only' below
23+
# as an alternative option!
24+
check_run:
25+
types:
26+
- completed
27+
28+
permissions:
29+
checks: read
30+
contents: write
31+
32+
jobs:
33+
maven-cd:
34+
uses: jenkins-infra/github-reusable-workflows/.github/workflows/maven-cd.yml@v1
35+
with:
36+
# Comment / uncomment the validate_only config appropriate to your preference:
37+
#
38+
# Use case #1 (automatic release):
39+
# - Let any successful Jenkins build trigger another release,
40+
# if there are merged pull requests of interest
41+
# - Perform a validation only run with drafting a release note,
42+
# if manually triggered AND inputs.validate_only has been checked.
43+
#
44+
validate_only: ${{ inputs.validate_only == true }}
45+
#
46+
# Alternative use case #2 (no automatic release):
47+
# - Same as use case #1 - but:
48+
# - Let any check_run trigger a validate_only run.
49+
# => enforce the release job to be skipped.
50+
#
51+
#validate_only: ${{ inputs.validate_only == true || github.event_name == 'check_run' }}
52+
secrets:
53+
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
54+
MAVEN_TOKEN: ${{ secrets.MAVEN_TOKEN }}

.github/workflows/release-drafter.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

.mvn/maven.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
-Pconsume-incrementals
22
-Pmight-produce-incrementals
3+
-Dchangelist.format=%d.v%s

pom.xml

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,14 @@
1111

1212
<groupId>io.jenkins.plugins</groupId>
1313
<artifactId>checks-api</artifactId>
14-
<version>${revision}${changelist}</version>
14+
<version>${changelist}</version>
1515
<packaging>hpi</packaging>
1616

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

2020
<properties>
21-
<revision>2.2.4</revision>
22-
<changelist>-SNAPSHOT</changelist>
21+
<changelist>999999-SNAPSHOT</changelist>
2322
<gitHubRepo>jenkinsci/${project.artifactId}-plugin</gitHubRepo>
2423

2524
<testcontainers.version>1.20.5</testcontainers.version>
@@ -37,7 +36,7 @@
3736
<connection>scm:git:https://github.com/${gitHubRepo}.git</connection>
3837
<developerConnection>scm:git:git@github.com:${gitHubRepo}.git</developerConnection>
3938
<url>https://github.com/${gitHubRepo}</url>
40-
<tag>v2.2.2</tag>
39+
<tag>${scmTag}</tag>
4140
</scm>
4241

4342
<dependencies>
@@ -190,13 +189,4 @@
190189
<url>https://repo.jenkins-ci.org/public/</url>
191190
</pluginRepository>
192191
</pluginRepositories>
193-
194-
<developers>
195-
<developer>
196-
<id>xiongkezhi</id>
197-
<name>Kezhi Xiong</name>
198-
<email>august.xkz@gmail.com</email>
199-
</developer>
200-
</developers>
201-
202192
</project>

0 commit comments

Comments
 (0)