Skip to content

Commit

Permalink
Merge pull request #320 from jglick/cd
Browse files Browse the repository at this point in the history
Enable CD
  • Loading branch information
jglick committed Nov 23, 2021
2 parents 08e76c5 + a295d8f commit ff4d8c2
Show file tree
Hide file tree
Showing 7 changed files with 95 additions and 29 deletions.
4 changes: 0 additions & 4 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
_extends: .github
tag-template: plugins-compat-tester-aggregator-$NEXT_MINOR_VERSION
# We want to use semver here... at some point
version-template: $MAJOR.$MINOR.$PATCH
name-template: Plugin Compatibility Tester $NEXT_PATCH_VERSION
59 changes: 59 additions & 0 deletions .github/workflows/cd.yaml
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.3.4
with:
fetch-depth: 0
- name: Set up JDK 8
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: 8
- name: Release
uses: jenkins-infra/jenkins-maven-cd-action@v1.1.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
2 changes: 1 addition & 1 deletion plugins-compat-tester-cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.jenkins-ci.tests</groupId>
<artifactId>plugins-compat-tester-aggregator</artifactId>
<version>${revision}${changelist}</version>
<version>${changelist}</version>
</parent>

<artifactId>plugins-compat-tester-cli</artifactId>
Expand Down
15 changes: 14 additions & 1 deletion plugins-compat-tester-model/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.jenkins-ci.tests</groupId>
<artifactId>plugins-compat-tester-aggregator</artifactId>
<version>${revision}${changelist}</version>
<version>${changelist}</version>
</parent>

<artifactId>plugins-compat-tester-model</artifactId>
Expand Down Expand Up @@ -53,4 +53,17 @@
<artifactId>jenkins-core</artifactId>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>

</project>
15 changes: 14 additions & 1 deletion plugins-compat-tester/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.jenkins-ci.tests</groupId>
<artifactId>plugins-compat-tester-aggregator</artifactId>
<version>${revision}${changelist}</version>
<version>${changelist}</version>
</parent>

<artifactId>plugins-compat-tester</artifactId>
Expand Down Expand Up @@ -194,4 +194,17 @@
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>

</project>
28 changes: 6 additions & 22 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<groupId>org.jenkins-ci.tests</groupId>
<artifactId>plugins-compat-tester-aggregator</artifactId>
<version>${revision}${changelist}</version>
<version>${changelist}</version>
<name>Plugins compatibility tester Aggregator</name>
<description>Jenkins Plugin Compatibility Tester (PCT) against latest released version</description>
<url>https://github.com/jenkinsci/plugin-compat-tester</url>
Expand All @@ -24,8 +24,7 @@
</scm>

<properties>
<revision>0.5.2</revision>
<changelist>-SNAPSHOT</changelist>
<changelist>999999-SNAPSHOT</changelist>
<gitHubRepo>jenkinsci/plugin-compat-tester</gitHubRepo>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<logbackVersion>1.2.3</logbackVersion>
Expand All @@ -43,7 +42,6 @@
<module>plugins-compat-tester</module>
<module>plugins-compat-tester-cli</module>
<module>plugins-compat-tester-model</module>
<!--<module>plugins-compat-tester-rest</module>-->
</modules>

<dependencyManagement>
Expand Down Expand Up @@ -138,28 +136,14 @@
</pluginRepository>
</pluginRepositories>

<distributionManagement>
<repository>
<uniqueVersion>false</uniqueVersion>
<id>maven.jenkins-ci.org</id>
<url>https://repo.jenkins-ci.org/releases/</url>
</repository>
<snapshotRepository>
<id>maven.jenkins-ci.org</id>
<url>https://repo.jenkins-ci.org/snapshots/</url>
</snapshotRepository>
</distributionManagement>

<build>
<plugins>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<inherited>false</inherited>
<configuration>
<mavenExecutorId>forked-path</mavenExecutorId>
<useReleaseProfile>false</useReleaseProfile>
<preparationGoals>clean install</preparationGoals>
<goals>deploy</goals>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
Expand Down

0 comments on commit ff4d8c2

Please sign in to comment.