From 9acfdb3a3810e3cc87b390165f361e46664e49dc Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Wed, 21 Sep 2022 14:11:24 -0400 Subject: [PATCH 1/3] Enable CD --- .github/dependabot.yml | 10 ++++++++++ .github/release-drafter.yml | 2 -- .github/workflows/cd.yaml | 15 +++++++++++++++ .github/workflows/release-drafter.yml | 17 ----------------- .mvn/extensions.xml | 7 +++++++ .mvn/maven.config | 3 +++ pom.xml | 12 +++++++----- 7 files changed, 42 insertions(+), 24 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 create mode 100644 .mvn/extensions.xml create mode 100644 .mvn/maven.config diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..de00fb1 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,10 @@ +version: 2 +updates: +- package-ecosystem: maven + directory: / + schedule: + interval: monthly +- package-ecosystem: github-actions + directory: / + schedule: + interval: monthly diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml deleted file mode 100644 index f656208..0000000 --- a/.github/release-drafter.yml +++ /dev/null @@ -1,2 +0,0 @@ -_extends: .github -tag-template: docker-fixtures-$NEXT_MINOR_VERSION diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml new file mode 100644 index 0000000..0279984 --- /dev/null +++ b/.github/workflows/cd.yaml @@ -0,0 +1,15 @@ +# Note: additional setup is required, see https://www.jenkins.io/redirect/continuous-delivery-of-plugins + +name: cd +on: + workflow_dispatch: + check_run: + types: + - completed + +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 }} diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml deleted file mode 100644 index f87134b..0000000 --- a/.github/workflows/release-drafter.yml +++ /dev/null @@ -1,17 +0,0 @@ -# Note: additional setup is required, see https://github.com/jenkinsci/.github/blob/master/.github/release-drafter.adoc - -name: Release Drafter - -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 }} diff --git a/.mvn/extensions.xml b/.mvn/extensions.xml new file mode 100644 index 0000000..9ac2968 --- /dev/null +++ b/.mvn/extensions.xml @@ -0,0 +1,7 @@ + + + io.jenkins.tools.incrementals + git-changelist-maven-extension + 1.4 + + diff --git a/.mvn/maven.config b/.mvn/maven.config new file mode 100644 index 0000000..f7daf60 --- /dev/null +++ b/.mvn/maven.config @@ -0,0 +1,3 @@ +-Pconsume-incrementals +-Pmight-produce-incrementals +-Dchangelist.format=%d.v%s diff --git a/pom.xml b/pom.xml index 97afe81..effaa8e 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ org.jenkins-ci.test docker-fixtures - 1.13-SNAPSHOT + ${changelist} Docker Fixtures Docker rule for JUnit. @@ -31,10 +31,10 @@ - scm:git:ssh://github.com/jenkinsci/docker-fixtures.git - scm:git:ssh://git@github.com/jenkinsci/docker-fixtures.git - https://github.com/jenkinsci/docker-fixtures - HEAD + scm:git:ssh://github.com/${gitHubRepo}.git + scm:git:ssh://git@github.com/${gitHubRepo}.git + https://github.com/${gitHubRepo} + ${scmTag} @@ -50,6 +50,8 @@ + 999999-SNAPSHOT + jenkinsci/docker-fixtures UTF-8 false From 20f4474869df0e5c13651eed0c28c198f26d4350 Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Wed, 21 Sep 2022 14:16:46 -0400 Subject: [PATCH 2/3] Also use `-ntp` --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 5873293..4d84d6f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -14,7 +14,7 @@ pipeline { stages { stage('main') { steps { - sh 'mvn -B clean verify -Dmaven.test.failure.ignore' + sh 'mvn -B -ntp clean verify -Dmaven.test.failure.ignore' } post { success { From 82e12b3dcb302439b0848efbc557fa27aad2fdfd Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Wed, 21 Sep 2022 14:18:55 -0400 Subject: [PATCH 3/3] `abortPrevious: true` --- Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkinsfile b/Jenkinsfile index 4d84d6f..b1934d7 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,5 +1,6 @@ pipeline { options { + disableConcurrentBuilds abortPrevious: true buildDiscarder(logRotator(numToKeepStr: '20')) timeout(time: 1, unit: 'HOURS') }