Skip to content

Commit a571859

Browse files
feat: enable continous delivery (#158)
1 parent b7a84d4 commit a571859

File tree

5 files changed

+68
-6
lines changed

5 files changed

+68
-6
lines changed

.github/dependabot.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,8 @@ updates:
33
- package-ecosystem: "maven"
44
directory: "/"
55
schedule:
6-
interval: "weekly"
6+
interval: "daily"
7+
- package-ecosystem: "github-actions"
8+
directory: /
9+
schedule:
10+
interval: "daily"

.github/release-drafter.yml

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
# https://github.com/jenkinsci/.github/blob/master/.github/release-drafter.adoc
2+
# https://www.jenkins.io/doc/developer/publishing/releasing-cd/#release-notes
23
_extends: .github
3-
# Semantic versioning is used d=for this plugin: https://semver.org/
4-
version-template: $MAJOR.$MINOR.$PATCH
5-
tag-template: saml-$NEXT_PATCH_VERSION
6-
name-template: $NEXT_PATCH_VERSION
4+

.github/workflows/cd.yaml

+59
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/maven.config

+1
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

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ under the License.
2929
</parent>
3030

3131
<artifactId>saml</artifactId>
32-
<version>${revision}${changelist}</version>
32+
<version>${revision}-${changelist}</version>
3333
<packaging>hpi</packaging>
3434
<name>SAML Plugin</name>
3535
<url>https://github.com/jenkinsci/saml-plugin</url>

0 commit comments

Comments
 (0)