Skip to content

Commit

Permalink
Setting up automated plugin release (#9)
Browse files Browse the repository at this point in the history
* Ignore ide specific files not to be shared to allow easy commit and work with scm.
* Release notes now use all default release drafter
* Adding the GitHub action to prepare the release, let dependabot check for updates in github actions.
* POM file modifications for automatic generation of the version numbers
* Only manually triggered releases for now
* Automatic releases are now enabled on merge to master, This comes with a new version number format, see https://www.jenkins.io/jep/229
  • Loading branch information
amandel authored Oct 21, 2021
1 parent da9c4aa commit 638f6d7
Show file tree
Hide file tree
Showing 7 changed files with 143 additions and 21 deletions.
5 changes: 5 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,8 @@ updates:
- amandel
labels:
- skip-changelog

- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
2 changes: 0 additions & 2 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
_extends: .github
name-template: Log File Filter $NEXT_MINOR_VERSION
tag-template: log-file-filter-$NEXT_MINOR_VERSION
59 changes: 59 additions & 0 deletions .github/workflow/cd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: cd
on:
workflow_dispatch:
# for now only manually triggered
# see https://www.jenkins.io/doc/developer/publishing/releasing-cd/#releasing
# 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/[email protected]
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/[email protected]
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/[email protected]
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/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_TOKEN: ${{ secrets.MAVEN_TOKEN }}
16 changes: 0 additions & 16 deletions .github/workflow/release-drafter.yml

This file was deleted.

76 changes: 76 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,79 @@
/.project
/pom.xml.bak
/.settings/

# source https://github.com/github/gitignore/blob/master/Global/JetBrains.gitignore
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# AWS User-specific
.idea/**/aws.xml

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser
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
5 changes: 2 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@

<groupId>com.tsystems.sbs</groupId>
<artifactId>log-file-filter</artifactId>
<version>${revision}${changelist}</version>
<version>${changelist}</version>
<packaging>hpi</packaging>

<properties>
<revision>1.12</revision>
<changelist>-SNAPSHOT</changelist>
<changelist>999999-SNAPSHOT</changelist>
<gitHubRepo>jenkinsci/log-file-filter-plugin</gitHubRepo>
<jenkins.version>2.289.1</jenkins.version>
<java.level>8</java.level>
Expand Down

0 comments on commit 638f6d7

Please sign in to comment.