From c5b512e2b27cbe0907745e9e25394cafe91b89d6 Mon Sep 17 00:00:00 2001 From: Andreas Nygard Date: Mon, 24 Jul 2023 11:43:03 +1000 Subject: [PATCH 1/3] gh-actions: Add cd workflow --- .github/workflows/cd.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/cd.yaml diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml new file mode 100644 index 00000000..f3717736 --- /dev/null +++ b/.github/workflows/cd.yaml @@ -0,0 +1,19 @@ +# Note: additional setup is required, see https://www.jenkins.io/redirect/continuous-delivery-of-plugins + +name: cd +on: + workflow_dispatch: + check_run: + types: + - completed + +permissions: + checks: read + contents: write + +jobs: + maven-cd: + uses: jenkins-infra/github-reusable-workflows/.github/workflows/maven-cd.yml@v1 + secrets: + MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} + MAVEN_TOKEN: ${{ secrets.MAVEN_TOKEN }} From 36a9ba1cffdb0299b41c6a0013ef5015153912e9 Mon Sep 17 00:00:00 2001 From: Andreas Nygard Date: Mon, 24 Jul 2023 11:43:36 +1000 Subject: [PATCH 2/3] cd: Remove release drafter --- .github/release-drafter.yml | 4 ---- .github/workflows/release-drafter.yml | 16 ---------------- 2 files changed, 20 deletions(-) delete mode 100644 .github/release-drafter.yml delete mode 100644 .github/workflows/release-drafter.yml diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml deleted file mode 100644 index e55385dd..00000000 --- a/.github/release-drafter.yml +++ /dev/null @@ -1,4 +0,0 @@ -# https://github.com/jenkinsci/.github/blob/master/.github/release-drafter.adoc - -_extends: .github -tag-template: github-oauth-$NEXT_MINOR_VERSION diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml deleted file mode 100644 index 14c2affe..00000000 --- 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 the default branch - - uses: release-drafter/release-drafter@v5 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 04c1f16a1a0d07e9113a3f09ea815759011a09e8 Mon Sep 17 00:00:00 2001 From: Andreas Nygard Date: Mon, 24 Jul 2023 11:47:02 +1000 Subject: [PATCH 3/3] maven: Fully automated versioning See: https://www.jenkins.io/doc/developer/publishing/releasing-cd/ --- .mvn/maven.config | 1 + pom.xml | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.mvn/maven.config b/.mvn/maven.config index 2a0299c4..95456809 100644 --- a/.mvn/maven.config +++ b/.mvn/maven.config @@ -1,2 +1,3 @@ -Pconsume-incrementals -Pmight-produce-incrementals +-Pchangelist.format=%d.v%s diff --git a/pom.xml b/pom.xml index 8e2f080b..23f0ebf2 100644 --- a/pom.xml +++ b/pom.xml @@ -9,15 +9,14 @@ - 0.40 - -SNAPSHOT + 999999-SNAPSHOT 2.361.4 jenkinsci/${project.artifactId}-plugin org.jenkins-ci.plugins github-oauth - ${revision}${changelist} + ${changelist} GitHub Authentication plugin A Jenkins authentication plugin that delegates to GitHub. We also implement an Authorization Strategy that uses the acquired OAuth token to interact with the GitHub API to determine a user's level of access to Jenkins. hpi