Skip to content

Commit 1728196

Browse files
authored
Merge pull request #173 from jenkinsci/feat/master/cd
Enable CD
2 parents 4fbc7d4 + 501ca22 commit 1728196

File tree

5 files changed

+65
-6
lines changed

5 files changed

+65
-6
lines changed

.github/dependabot.yml

+4
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,7 @@ updates:
1818
- dependency-name: org.jenkins-ci.plugins*
1919
versions:
2020
- ">= 0"
21+
- package-ecosystem: github-actions
22+
directory: /
23+
schedule:
24+
interval: weekly

.github/release-drafter.yml

-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
11
_extends: .github
2-
tag-template: role-strategy-$NEXT_MINOR_VERSION
3-
name-template: Role Strategy Plugin $NEXT_MINOR_VERSION

.github/workflows/cd.yaml

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

+3-4
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010

1111
<artifactId>role-strategy</artifactId>
1212
<packaging>hpi</packaging>
13-
<version>${revision}${changelist}</version>
13+
<version>${changelist}</version>
1414
<name>Role-based Authorization Strategy</name>
1515
<url>https://github.com/jenkinsci/role-strategy-plugin</url>
1616

1717
<scm>
18-
<connection>scm:git:ssh://github.com/jenkinsci/${project.artifactId}-plugin.git</connection>
18+
<connection>scm:git:https://github.com/jenkinsci/${project.artifactId}-plugin.git</connection>
1919
<developerConnection>scm:git:ssh://[email protected]/jenkinsci/${project.artifactId}-plugin.git</developerConnection>
2020
<url>https://github.com/jenkinsci/${project.artifactId}-plugin</url>
2121
<tag>${scmTag}</tag>
@@ -40,8 +40,7 @@
4040
</developers>
4141

4242
<properties>
43-
<revision>3.2.1</revision>
44-
<changelist>-SNAPSHOT</changelist>
43+
<changelist>999999-SNAPSHOT</changelist>
4544
<jenkins.version>2.222.4</jenkins.version>
4645
<java.level>8</java.level>
4746
<useBeta>true</useBeta>

0 commit comments

Comments
 (0)