Skip to content

Commit ff494e2

Browse files
authored
Enable continuous delivery release flow (#166)
1 parent a713261 commit ff494e2

File tree

6 files changed

+81
-7
lines changed

6 files changed

+81
-7
lines changed

.github/dependabot.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
version: 2
3+
updates:
4+
- package-ecosystem: github-actions
5+
directory: /
6+
schedule:
7+
interval: daily

.github/release-drafter.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
11
_extends: .github
2-
name-template: v$NEXT_PATCH_VERSION 🌈
3-
tag-template: $NEXT_PATCH_VERSION
4-
version-template: $MAJOR.$MINOR.$PATCH

.github/workflows/cd.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Note: additional setup is required, see https://www.jenkins.io/redirect/continuous-delivery-of-plugins
2+
3+
name: cd
4+
on:
5+
workflow_dispatch:
6+
check_run:
7+
types:
8+
- completed
9+
10+
jobs:
11+
validate:
12+
runs-on: ubuntu-latest
13+
outputs:
14+
should_release: ${{ steps.verify-ci-status.outputs.result == 'success' && steps.interesting-categories.outputs.interesting == 'true' }}
15+
steps:
16+
- name: Verify CI status
17+
uses: jenkins-infra/[email protected]
18+
id: verify-ci-status
19+
with:
20+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21+
output_result: true
22+
23+
- name: Release Drafter
24+
uses: release-drafter/release-drafter@v5
25+
if: steps.verify-ci-status.outputs.result == 'success'
26+
with:
27+
name: next
28+
tag: next
29+
version: next
30+
env:
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
33+
- name: Check interesting categories
34+
uses: jenkins-infra/[email protected]
35+
id: interesting-categories
36+
if: steps.verify-ci-status.outputs.result == 'success'
37+
with:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
40+
release:
41+
runs-on: ubuntu-latest
42+
needs: [validate]
43+
if: needs.validate.outputs.should_release == 'true'
44+
steps:
45+
- name: Check out
46+
uses: actions/[email protected]
47+
with:
48+
fetch-depth: 0
49+
- name: Set up JDK 8
50+
uses: actions/setup-java@v2
51+
with:
52+
distribution: 'adopt'
53+
java-version: 8
54+
- name: Release
55+
uses: jenkins-infra/[email protected]
56+
with:
57+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
58+
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
59+
MAVEN_TOKEN: ${{ secrets.MAVEN_TOKEN }}

.mvn/extensions.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<extensions xmlns="http://maven.apache.org/EXTENSIONS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/EXTENSIONS/1.0.0 http://maven.apache.org/xsd/core-extensions-1.0.0.xsd">
2+
<extension>
3+
<groupId>io.jenkins.tools.incrementals</groupId>
4+
<artifactId>git-changelist-maven-extension</artifactId>
5+
<version>1.2</version>
6+
</extension>
7+
</extensions>

.mvn/maven.config

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

pom.xml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@
99
</parent>
1010
<groupId>io.jenkins.plugins</groupId>
1111
<artifactId>dark-theme</artifactId>
12-
<version>0.0.13-SNAPSHOT</version>
12+
<version>${changelist}</version>
1313
<packaging>hpi</packaging>
1414
<properties>
15+
<changelist>-SNAPSHOT</changelist>
16+
<gitHubRepo>jenkinsci/dark-theme-plugin</gitHubRepo>
1517
<revision>0.0.3</revision>
1618
<changelist>-SNAPSHOT</changelist>
1719
<jenkins.version>2.303.3</jenkins.version>
@@ -67,9 +69,9 @@
6769
</developers>
6870

6971
<scm>
70-
<connection>scm:git:git://github.com/jenkinsci/${project.artifactId}-plugin.git</connection>
71-
<developerConnection>scm:git:[email protected]:jenkinsci/${project.artifactId}-plugin.git</developerConnection>
72-
<url>https://github.com/jenkinsci/${project.artifactId}-plugin</url>
72+
<connection>scm:git:git://github.com/${gitHubRepo}.git</connection>
73+
<developerConnection>scm:git:[email protected]:${gitHubRepo}.git</developerConnection>
74+
<url>https://github.com/${gitHubRepo}</url>
7375
<tag>${scmTag}</tag>
7476
</scm>
7577

0 commit comments

Comments
 (0)