From ca2a1f68a5a10abe23af76ae67c69b8a5faee060 Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Wed, 8 Mar 2023 09:40:25 -0500 Subject: [PATCH 1/3] Plugin metadata refresh to 2.361.x --- .github/CODEOWNERS | 1 + .mvn/extensions.xml | 2 +- Jenkinsfile | 7 ++++++- pom.xml | 42 ++++++++++-------------------------------- 4 files changed, 18 insertions(+), 34 deletions(-) create mode 100644 .github/CODEOWNERS diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 00000000..3977ee8e --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @jenkinsci/docker-commons-plugin-developers diff --git a/.mvn/extensions.xml b/.mvn/extensions.xml index 9ac2968b..90787cbb 100644 --- a/.mvn/extensions.xml +++ b/.mvn/extensions.xml @@ -2,6 +2,6 @@ io.jenkins.tools.incrementals git-changelist-maven-extension - 1.4 + 1.6 diff --git a/Jenkinsfile b/Jenkinsfile index a229fa51..22a78e9b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1 +1,6 @@ -buildPlugin() +buildPlugin( + useContainerAgent: true, + configurations: [ + [platform: 'linux', jdk: 17], + [platform: 'windows', jdk: 11], +]) diff --git a/pom.xml b/pom.xml index a429f662..08b2dbaa 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.jenkins-ci.plugins plugin - 4.46 + 4.55 @@ -15,8 +15,7 @@ hpi Docker Commons Plugin - APIs useful to Docker-based plugins. - https://github.com/jenkinsci/docker-commons-plugin + https://github.com/jenkinsci/${project.artifactId}-plugin MIT License @@ -24,20 +23,18 @@ - - scm:git:git://github.com/jenkinsci/${project.artifactId}-plugin.git - scm:git:git@github.com:jenkinsci/${project.artifactId}-plugin.git - http://github.com/jenkinsci/${project.artifactId}-plugin + + scm:git:https://github.com/${gitHubRepo} + scm:git:https://github.com/${gitHubRepo} ${scmTag} + https://github.com/${gitHubRepo} 1.22 -SNAPSHOT - 2.263 - 2.263.1 - 1.9.3 - 1.51 + jenkinsci/${project.artifactId}-plugin + 2.361.4 @@ -71,7 +68,6 @@ org.jenkinsci.plugins pipeline-model-extensions - ${pipeline-model-definition.version} true @@ -142,20 +138,17 @@ org.jenkinsci.plugins pipeline-model-definition - ${pipeline-model-definition.version} test io.jenkins configuration-as-code - ${jcasc.version} test io.jenkins.configuration-as-code test-harness - ${jcasc.version} test @@ -163,26 +156,11 @@ io.jenkins.tools.bom - bom-${bom}.x - 984.vb5eaac999a7e + bom-2.361.x + 1886.va_11c9f461054 import pom - - org.jenkins-ci.plugins - credentials - 2.6.1 - - - org.jenkinsci.plugins - pipeline-model-api - ${pipeline-model-definition.version} - - - org.jenkinsci.plugins - pipeline-stage-tags-metadata - ${pipeline-model-definition.version} - From f46b767f4274fb17369d2ccc0d6680788354159e Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Wed, 8 Mar 2023 09:49:20 -0500 Subject: [PATCH 2/3] Enable CD --- .github/dependabot.yml | 14 ++- .github/release-drafter.yml | 3 - .github/workflows/cd.yaml | 19 ++++ .github/workflows/release-drafter.yml | 17 --- .gitignore | 2 +- .mvn/maven.config | 1 + CHANGELOG.md | 158 -------------------------- README.md | 5 +- pom.xml | 7 +- 9 files changed, 35 insertions(+), 191 deletions(-) delete mode 100644 .github/release-drafter.yml create mode 100644 .github/workflows/cd.yaml delete mode 100644 .github/workflows/release-drafter.yml delete mode 100644 CHANGELOG.md diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 56e323a8..03b4d66f 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,6 +1,12 @@ +# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuring-dependabot-version-updates + version: 2 updates: - - package-ecosystem: "maven" - directory: "/" - schedule: - interval: "weekly" \ No newline at end of file +- 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 d4d9b691..00000000 --- a/.github/release-drafter.yml +++ /dev/null @@ -1,3 +0,0 @@ -# https://github.com/jenkinsci/.github/blob/master/.github/release-drafter.adoc -_extends: .github -tag-template: docker-commons-$NEXT_MINOR_VERSION 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 }} diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml deleted file mode 100644 index f87134b2..00000000 --- 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/.gitignore b/.gitignore index 433afac7..941476a0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ target/ -work*/ +work/ # IntelliJ project files *.iml diff --git a/.mvn/maven.config b/.mvn/maven.config index 2a0299c4..f7daf60d 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/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index fb69a1a7..00000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,158 +0,0 @@ -# Version history (archive) - -[![GitHub release](https://img.shields.io/github/release/jenkinsci/docker-commons-plugin.svg?label=changelog)](https://github.com/jenkinsci/docker-commons-plugin/releases/latest) - -### Newer versions - -See [GitHub Releases](https://github.com/jenkinsci/docker-commons-plugin/releases/latest). - -### 1.15 - -Release date: (May 13, 2019) - -- [JENKINS-57439](https://issues.jenkins-ci.org/browse/JENKINS-57439) - - Add support of Docker credentials specification in Declarative Pipeline - - Documentation:  -- [JENKINS-52724](https://issues.jenkins-ci.org/browse/JENKINS-52724),  - [JENKINS-52737](https://issues.jenkins-ci.org/browse/JENKINS-52737) -  - Inherit properties from the - local Docker config.json if it exists -- [JENKINS-57420](https://issues.jenkins-ci.org/browse/JENKINS-57420) -  - Use a new way to specify multi-line secrets in the plugin - -### 1.14 - -Release date: (April 2, 2019) - -- Improve help text formatting ([PR 73](https://github.com/jenkinsci/docker-commons-plugin/pull/73)) -- Developer: Add new API for getting Docker-related credentials for [JENKINS-48437](https://issues.jenkins-ci.org/browse/JENKINS-48437) - - -### 1.13 - -Release date: (May 18, 2018) - -- API for [JENKINS-51397](https://issues.jenkins-ci.org/browse/JENKINS-51397) - - `docker login` was being called without server-related environment variables in the Docker Pipeline Plugin - - -### 1.12 - -Release date: (May 11, 2018) - -- [JENKINS-38018](https://issues.jenkins-ci.org/browse/JENKINS-38018) - `withDockerRegistry` was failing to authenticate with DockerHub -- [JENKINS-41880](https://issues.jenkins-ci.org/browse/JENKINS-41880) - Fix the `ConcurrentModificationException` while creating docker image fingerprints -- [JENKINS-49075](https://issues.jenkins-ci.org/browse/JENKINS-49075) - - Docker Commons Plugin was not working with PCT - (implies a newer Jenkins core dependency) - -### 1.11 - -Release date: (Jan 04, 2018) - -- [JENKINS-48674](https://issues.jenkins-ci.org/browse/JENKINS-48674) - - Failure to download newer Docker releases from the automatic tool installer. - -### 1.10 - -Release date: (Dec 11, 2017) - -- [JENKINS-48453](https://issues.jenkins-ci.org/browse/JENKINS-48453) -  Regression in Jenkins 2.93+ when using server credentials. - -### 1.9 - -Release date: (Oct 10, 2017) - -- Removing `icon-shim` plugin dependency. - -### 1.8 - -Release date: (Jul 10, 2017) - -- [Fix security issue](https://jenkins.io/security/advisory/2017-07-10/) - -### 1.7 - -Release date: (Jun 16, 2017) - -- Always include port in image name. -- Add credentials binding implementation for Docker server credentials. - -### 1.6 - -Release date: (Jan 11, 2017) - -- ![(error)](docs/images/error.svg) - [JENKINS-39181](https://issues.jenkins-ci.org/browse/JENKINS-39181) - Fix Invalid fully qualified image name when registry URL is specified - -### 1.5 - -Release date: (Oct 05, 2016) - -- ![(plus)](docs/images/add.svg) - [JENKINS-38018](https://issues.jenkins-ci.org/browse/JENKINS-38018) - API for more informative logging about use of registry credentials. - -### 1.4.1 - -Release date: (Sep 08, 2016) - -- ![(error)](docs/images/error.svg) - [JENKINS-36082](https://issues.jenkins-ci.org/browse/JENKINS-36082) - [JENKINS-32790](https://issues.jenkins-ci.org/browse/JENKINS-32790) - The Docker tool installer (used for example by `withTool` in the - [Docker Pipeline Plugin](https://wiki.jenkins.io/display/JENKINS/Docker+Pipeline+Plugin)) - was broken. - -### 1.4.0 - -Release date: (Jun 17, 2016) - -- ![(info)](docs/images/information.svg) Migration to the new parent POM - ([JENKINS-35018](https://issues.jenkins-ci.org/browse/JENKINS-35018)) -- ![(info)](docs/images/information.svg) Jenkins core dependency has been updated to 1.580.x - -### 1.3.1 - -Release date: (Feb 19, 2016) - -- ![(error)](docs/images/error.svg) Polishing the fix of - [JENKINS-28776](https://issues.jenkins-ci.org/browse/JENKINS-28776) - -### 1.3 - -Release date: (Feb 08, 2016) - -- ![(plus)](docs/images/add.svg) Support the "sha256:" prefix in image ID, required - for Docker 1.10 - ([JENKINS-32792](https://issues.jenkins-ci.org/browse/JENKINS-32792)) -- ![(plus)](docs/images/add.svg) Replace build action icon stubs by Docker icons - ([JENKINS-28776](https://issues.jenkins-ci.org/browse/JENKINS-28776)) - -### 1.2 - -Release date: (Jul 29 2015) - -- ![(error)](docs/images/error.svg) NPE when using credentials together with docker 1.7 - ([JENKINS-29627](https://issues.jenkins-ci.org/browse/JENKINS-29627)) -- ![(plus)](docs/images/add.svg) Support creation of named fingerprints in the API - ([JENKINS-29098](https://issues.jenkins-ci.org/browse/JENKINS-29098)) - -### 1.1 - -Release date: (Jul 07 2015) - -- ![(error)](docs/images/error.svg) Cleanup of FindBugs issues, update of the CI system -- ![(error)](docs/images/error.svg) Fix the issue with the Docker Tool selector ([PR - \#40](https://github.com/jenkinsci/docker-commons-plugin/pull/40)) -- ![(plus)](docs/images/add.svg) Support Docker 1.7+ .docker/config.json ([PR - \#38](https://github.com/jenkinsci/docker-commons-plugin/pull/38)) - -### 1.0 - -Release date: (May 22 2015) - -- First stable release -- There were alpha releases before this release, see the commit history in GitHub diff --git a/README.md b/README.md index ec6eb5e9..decba91c 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,6 @@ # Docker Commons API Plugin for Jenkins [![Join the chat at https://gitter.im/jenkinsci/docker](https://badges.gitter.im/jenkinsci/docker.svg)](https://gitter.im/jenkinsci/docker?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) -[![Jenkins Plugin](https://img.shields.io/jenkins/plugin/v/docker-commons.svg)](https://plugins.jenkins.io/docker-commons) -[![GitHub release](https://img.shields.io/github/release/jenkinsci/docker-commons-plugin.svg?label=changelog)](https://github.com/jenkinsci/docker-commons-plugin/releases/latest) -[![Jenkins Plugin Installs](https://img.shields.io/jenkins/plugin/i/role-strategy.svg?color=blue)](https://plugins.jenkins.io/docker-commons) API plugin, which provides the common shared functionality for various Docker-related plugins. @@ -60,4 +57,4 @@ pipeline { ## Changelog * See [GitHub Releases](https://github.com/jenkinsci/docker-commons-plugin/releases/latest) for the recent versions -* See [the release notes archive](./CHANGELOG.md) for version `1.15` and older +* See [the release notes archive](https://github.com/jenkinsci/docker-commons-plugin/blob/2e09f1fe61389ef9a967a2bd362bc9d141807c86/CHANGELOG.md) for version `1.15` and older diff --git a/pom.xml b/pom.xml index 08b2dbaa..fef75454 100644 --- a/pom.xml +++ b/pom.xml @@ -6,12 +6,12 @@ org.jenkins-ci.plugins plugin 4.55 - + org.jenkins-ci.plugins docker-commons - ${revision}${changelist} + ${changelist} hpi Docker Commons Plugin @@ -31,8 +31,7 @@ - 1.22 - -SNAPSHOT + 999999-SNAPSHOT jenkinsci/${project.artifactId}-plugin 2.361.4 From 543458fc556867da5abbceb2d7817f7d50c2a2da Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Wed, 8 Mar 2023 14:58:49 -0500 Subject: [PATCH 3/3] `DockerToolInstallerTest` needs to run in a VM https://github.com/jenkinsci/docker-commons-plugin/pull/126/checks?check_run_id=11854134407 --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 22a78e9b..e291061f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,5 +1,5 @@ buildPlugin( - useContainerAgent: true, + useContainerAgent: false, configurations: [ [platform: 'linux', jdk: 17], [platform: 'windows', jdk: 11],