Skip to content

Commit

Permalink
Enable CD (#176)
Browse files Browse the repository at this point in the history
* ci: Enable CD

* build: Bump baseline

* build: Update API
  • Loading branch information
NotMyFault committed Feb 28, 2022
1 parent 3b29f87 commit 52c702c
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 6 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Note: additional setup is required, see https://www.jenkins.io/redirect/continuous-delivery-of-plugins

name: cd
on:
workflow_dispatch:
check_run:
types:
- completed

jobs:
validate:
runs-on: ubuntu-latest
outputs:
should_release: ${{ steps.verify-ci-status.outputs.result == 'success' && steps.interesting-categories.outputs.interesting == 'true' }}
steps:
- name: Verify CI status
uses: jenkins-infra/verify-ci-status-action@v1.2.0
id: verify-ci-status
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
output_result: true

- name: Release Drafter
uses: release-drafter/release-drafter@v5
if: steps.verify-ci-status.outputs.result == 'success'
with:
name: next
tag: next
version: next
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Check interesting categories
uses: jenkins-infra/interesting-category-action@v1.0.0
id: interesting-categories
if: steps.verify-ci-status.outputs.result == 'success'
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

release:
runs-on: ubuntu-latest
needs: [validate]
if: needs.validate.outputs.should_release == 'true'
steps:
- name: Check out
uses: actions/checkout@v2.4.0
with:
fetch-depth: 0
- name: Set up JDK 8
uses: actions/setup-java@v3.0.0
with:
distribution: temurin
java-version: 11
- name: Release
uses: jenkins-infra/jenkins-maven-cd-action@v1.2.0
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_TOKEN: ${{ secrets.MAVEN_TOKEN }}
1 change: 1 addition & 0 deletions .mvn/maven.config
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
-Pconsume-incrementals
-Pmight-produce-incrementals
-Dchangelist.format=%d.v%s
12 changes: 6 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</parent>

<artifactId>envinject</artifactId>
<version>${revision}${changelist}</version>
<version>2.${changelist}</version>
<packaging>hpi</packaging>
<name>Environment Injector Plugin</name>
<url>https://github.com/jenkinsci/envinject-plugin</url>
Expand Down Expand Up @@ -64,10 +64,9 @@
</developers>

<properties>
<revision>2.4.1</revision>
<changelist>-SNAPSHOT</changelist>
<changelist>999999-SNAPSHOT</changelist>
<ivy.plugin.version>2.1</ivy.plugin.version>
<jenkins.version>2.303.3</jenkins.version>
<jenkins.version>2.319.3</jenkins.version>
<java.level>8</java.level>
<!-- Remove once JENKINS-45055 is fixed -->
<spotbugs.failOnError>false</spotbugs.failOnError>
Expand All @@ -84,14 +83,15 @@
<scm>
<connection>scm:git:git://github.com/jenkinsci/envinject-plugin.git</connection>
<developerConnection>scm:git:git@github.com:jenkinsci/envinject-plugin.git</developerConnection>
<url>https://github.com/jenkinsci/envinject-plugin</url>
<tag>${scmTag}</tag>
</scm>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.jenkins.tools.bom</groupId>
<artifactId>bom-2.303.x</artifactId>
<artifactId>bom-2.319.x</artifactId>
<version>1155.v77b_fd92a_26fc</version>
<scope>import</scope>
<type>pom</type>
Expand All @@ -103,7 +103,7 @@
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>envinject-api</artifactId>
<version>1.8</version>
<version>1.180.v98d833b_27470</version>
</dependency>

<dependency>
Expand Down

0 comments on commit 52c702c

Please sign in to comment.