Skip to content

Commit 6b005ad

Browse files
authored
Merge pull request #1139 from Vlatombe/set-up-cd
2 parents 233bec7 + 3b52227 commit 6b005ad

File tree

5 files changed

+66
-6
lines changed

5 files changed

+66
-6
lines changed

.github/dependabot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,7 @@ updates:
1313
directory: '/src/main/resources/org/csanchez/jenkins/plugins/kubernetes'
1414
schedule:
1515
interval: 'daily'
16+
- package-ecosystem: github-actions
17+
directory: /
18+
schedule:
19+
interval: weekly

.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: $NEXT_PATCH_VERSION
3-
tag-template: kubernetes-$NEXT_PATCH_VERSION
4-
version-template: $MAJOR.$MINOR.$PATCH

.github/workflows/cd.yaml

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/[email protected]
51+
with:
52+
distribution: temurin
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

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: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
<groupId>org.csanchez.jenkins.plugins</groupId>
1111
<artifactId>kubernetes</artifactId>
12-
<version>${revision}${changelist}</version>
12+
<version>${changelist}</version>
1313
<name>Kubernetes plugin</name>
1414
<description>Jenkins plugin to run dynamic agents in a Kubernetes cluster</description>
1515
<packaging>hpi</packaging>
@@ -39,8 +39,7 @@
3939
</developers>
4040

4141
<properties>
42-
<revision>1.31.4</revision>
43-
<changelist>-SNAPSHOT</changelist>
42+
<changelist>999999-SNAPSHOT</changelist>
4443
<!-- in minikube
4544
minikube ip | sed -e 's/\([0-9]*\.[0-9]*\.[0-9]*\).*/\1.1/' -->
4645
<connectorHost />

0 commit comments

Comments
 (0)