Skip to content

Commit

Permalink
Merge pull request #19 from hashar/automate-release
Browse files Browse the repository at this point in the history
Automate release
  • Loading branch information
hashar authored Nov 19, 2024
2 parents 886cfd5 + 456f885 commit fa88309
Show file tree
Hide file tree
Showing 5 changed files with 82 additions and 5 deletions.
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuring-dependabot-version-updates

version: 2
updates:
- package-ecosystem: maven
directory: /
schedule:
interval: monthly
- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly
53 changes: 53 additions & 0 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Note: additional setup is required, see https://www.jenkins.io/redirect/continuous-delivery-of-plugins
#
# Please find additional hints for individual trigger use case
# configuration options inline this script below.
#
name: cd
on:
workflow_dispatch:
inputs:
validate_only:
required: false
type: boolean
description: |
Run validation with release drafter only
→ Skip the release job
# Note: Change this default to true,
# if the checkbox should be checked by default.
default: false
# If you don't want any automatic trigger in general, then
# the following check_run trigger lines should all be commented.
# Note: Consider the use case #2 config for 'validate_only' below
# as an alternative option!
check_run:
types:
- completed

permissions:
checks: read
contents: write

jobs:
maven-cd:
uses: jenkins-infra/github-reusable-workflows/.github/workflows/maven-cd.yml@v1
with:
# Comment / uncomment the validate_only config appropriate to your preference:
#
# Use case #1 (automatic release):
# - Let any successful Jenkins build trigger another release,
# if there are merged pull requests of interest
# - Perform a validation only run with drafting a release note,
# if manually triggered AND inputs.validate_only has been checked.
#
validate_only: ${{ inputs.validate_only == true }}
#
# Alternative use case #2 (no automatic release):
# - Same as use case #1 - but:
# - Let any check_run trigger a validate_only run.
# => enforce the release job to be skipped.
#
#validate_only: ${{ inputs.validate_only == true || github.event_name == 'check_run' }}
secrets:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_TOKEN: ${{ secrets.MAVEN_TOKEN }}
7 changes: 7 additions & 0 deletions .mvn/extensions.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<extensions xmlns="http://maven.apache.org/EXTENSIONS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/EXTENSIONS/1.0.0 http://maven.apache.org/xsd/core-extensions-1.0.0.xsd">
<extension>
<groupId>io.jenkins.tools.incrementals</groupId>
<artifactId>git-changelist-maven-extension</artifactId>
<version>1.8</version>
</extension>
</extensions>
3 changes: 3 additions & 0 deletions .mvn/maven.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-Pconsume-incrementals
-Pmight-produce-incrementals
-Dchangelist.format=%d.v%s
12 changes: 7 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</parent>

<artifactId>leastload</artifactId>
<version>3.1.0-SNAPSHOT</version>
<version>${changelist}</version>
<packaging>hpi</packaging>

<name>Least Load plugin</name>
Expand All @@ -32,13 +32,15 @@
</licenses>

<scm>
<connection>scm:git:git://github.com/jenkinsci/${project.artifactId}-plugin.git</connection>
<developerConnection>scm:git:[email protected]:jenkinsci/${project.artifactId}-plugin.git</developerConnection>
<url>https://github.com/jenkinsci/${project.artifactId}-plugin</url>
<tag>HEAD</tag>
<connection>scm:git:git://github.com/${gitHubRepo}.git</connection>
<developerConnection>scm:git:[email protected]:${gitHubRepo}.git</developerConnection>
<url>https://github.com/${gitHubRepo}</url>
<tag>${scmTag}</tag>
</scm>

<properties>
<changelist>999999-SNAPSHOT</changelist>
<gitHubRepo>jenkinsci/leastload-plugin</gitHubRepo>
<spotbugs.effort>Max</spotbugs.effort>
<spotbugs.threshold>Low</spotbugs.threshold>
</properties>
Expand Down

0 comments on commit fa88309

Please sign in to comment.