From f5997d7218cb61570dfd4836f346277fccf2c1bb Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Fri, 15 Nov 2024 10:58:52 -0500 Subject: [PATCH 1/2] Enable CD --- .github/dependabot.yml | 7 ++++ .github/release-drafter.yml | 6 --- .github/workflows/cd.yaml | 53 +++++++++++++++++++++++++++ .github/workflows/release-drafter.yml | 16 -------- .mvn/maven.config | 1 + pom.xml | 5 +-- 6 files changed, 63 insertions(+), 25 deletions(-) create mode 100644 .github/dependabot.yml delete mode 100644 .github/release-drafter.yml create mode 100644 .github/workflows/cd.yaml delete mode 100644 .github/workflows/release-drafter.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..7c6790e --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,7 @@ +version: 2 +updates: +- package-ecosystem: github-actions + directory: / + schedule: + interval: monthly +# the rest handled by Renovate diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml deleted file mode 100644 index da8cb13..0000000 --- a/.github/release-drafter.yml +++ /dev/null @@ -1,6 +0,0 @@ -# https://github.com/jenkinsci/.github/blob/master/.github/release-drafter.adoc ---- -_extends: .github -tag-template: reverse-proxy-auth-plugin-$NEXT_PATCH_VERSION -name-template: $NEXT_PATCH_VERSION -version-template: $MAJOR.$MINOR.$PATCH diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml new file mode 100644 index 0000000..eaf3ef5 --- /dev/null +++ b/.github/workflows/cd.yaml @@ -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 }} diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml deleted file mode 100644 index 4fc3d2c..0000000 --- a/.github/workflows/release-drafter.yml +++ /dev/null @@ -1,16 +0,0 @@ -# Automates creation of Release Drafts using Release Drafter -# More Info: https://github.com/jenkinsci/.github/blob/master/.github/release-drafter.adoc ---- -on: - push: - branches: - - master - -jobs: - update_release_draft: - runs-on: ubuntu-latest - steps: - # Drafts your next Release notes as Pull Requests are merged into "master" - - uses: release-drafter/release-drafter@v6 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.mvn/maven.config b/.mvn/maven.config index 2a0299c..f7daf60 100644 --- a/.mvn/maven.config +++ b/.mvn/maven.config @@ -1,2 +1,3 @@ -Pconsume-incrementals -Pmight-produce-incrementals +-Dchangelist.format=%d.v%s diff --git a/pom.xml b/pom.xml index 1cae83e..4b263c5 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ reverse-proxy-auth-plugin - ${revision}${changelist} + ${changelist} hpi Jenkins Reverse Proxy Auth Plugin @@ -43,8 +43,7 @@ https://github.com/${gitHubRepo} - 1.8.1 - -SNAPSHOT + 999999-SNAPSHOT jenkinsci/${project.artifactId} 2.479 ${jenkins.baseline}.1 From 44e38a7b2ba061e5126af491fd674a929527b104 Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Fri, 15 Nov 2024 11:40:49 -0500 Subject: [PATCH 2/2] @timja says Dependabot is not needed even for GHA https://github.com/jenkinsci/reverse-proxy-auth-plugin/pull/154#discussion_r1844107921 --- .github/dependabot.yml | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 7c6790e..0000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,7 +0,0 @@ -version: 2 -updates: -- package-ecosystem: github-actions - directory: / - schedule: - interval: monthly -# the rest handled by Renovate