From 1c5da0d5764873a6adfbc1ba289469729eaef240 Mon Sep 17 00:00:00 2001 From: Tim Jacomb Date: Fri, 26 Mar 2021 08:27:18 +0000 Subject: [PATCH 1/3] Add continuous delivery action template --- workflow-templates/cd.properties.json | 12 ++ workflow-templates/cd.yaml | 58 ++++++ workflow-templates/jenkins.svg | 283 ++++++++++++++++++++++++++ 3 files changed, 353 insertions(+) create mode 100644 workflow-templates/cd.properties.json create mode 100644 workflow-templates/cd.yaml create mode 100644 workflow-templates/jenkins.svg diff --git a/workflow-templates/cd.properties.json b/workflow-templates/cd.properties.json new file mode 100644 index 0000000..76f037f --- /dev/null +++ b/workflow-templates/cd.properties.json @@ -0,0 +1,12 @@ +{ + "name": "Publish a Jenkins plugin with Maven", + "description": "Continuous delivery for Jenkins plugins and components. For additional setup see jenkinsci/incremental-tools", + "iconName": "jenkins", + "categories": [ + "Deployment", + "Maven" + ], + "filePatterns": [ + "pom.xml$" + ] +} \ No newline at end of file diff --git a/workflow-templates/cd.yaml b/workflow-templates/cd.yaml new file mode 100644 index 0000000..2731e8c --- /dev/null +++ b/workflow-templates/cd.yaml @@ -0,0 +1,58 @@ +# Note: additional setup is required, see https://github.com/jenkinsci/incrementals-tools#automatic-deployment + +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@v1 + with: + java-version: 1.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 }} \ No newline at end of file diff --git a/workflow-templates/jenkins.svg b/workflow-templates/jenkins.svg new file mode 100644 index 0000000..0529fff --- /dev/null +++ b/workflow-templates/jenkins.svg @@ -0,0 +1,283 @@ + + + +image/svg+xml \ No newline at end of file From 2b421eaef32a8da310e512c5e7917d96d8a8b3c7 Mon Sep 17 00:00:00 2001 From: Tim Jacomb Date: Fri, 26 Mar 2021 13:49:33 +0000 Subject: [PATCH 2/3] Add redirect --- workflow-templates/cd.properties.json | 2 +- workflow-templates/cd.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/workflow-templates/cd.properties.json b/workflow-templates/cd.properties.json index 76f037f..1fa0a7a 100644 --- a/workflow-templates/cd.properties.json +++ b/workflow-templates/cd.properties.json @@ -1,6 +1,6 @@ { "name": "Publish a Jenkins plugin with Maven", - "description": "Continuous delivery for Jenkins plugins and components. For additional setup see jenkinsci/incremental-tools", + "description": "Continuous delivery for Jenkins plugins and components. For additional setup see jenkins.io/redirect/continuous-delivery-of-plugins", "iconName": "jenkins", "categories": [ "Deployment", diff --git a/workflow-templates/cd.yaml b/workflow-templates/cd.yaml index 2731e8c..2ac9b4e 100644 --- a/workflow-templates/cd.yaml +++ b/workflow-templates/cd.yaml @@ -1,4 +1,4 @@ -# Note: additional setup is required, see https://github.com/jenkinsci/incrementals-tools#automatic-deployment +# Note: additional setup is required, see https://www.jenkins.io/redirect/continuous-delivery-of-plugins name: cd on: From d0a76f94429b9984f9818e0d5b5c9574cede1a30 Mon Sep 17 00:00:00 2001 From: Tim Jacomb Date: Fri, 26 Mar 2021 13:50:03 +0000 Subject: [PATCH 3/3] New line --- workflow-templates/cd.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workflow-templates/cd.yaml b/workflow-templates/cd.yaml index 2ac9b4e..af51728 100644 --- a/workflow-templates/cd.yaml +++ b/workflow-templates/cd.yaml @@ -55,4 +55,4 @@ jobs: with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} - MAVEN_TOKEN: ${{ secrets.MAVEN_TOKEN }} \ No newline at end of file + MAVEN_TOKEN: ${{ secrets.MAVEN_TOKEN }}