diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml new file mode 100644 index 0000000..30f001f --- /dev/null +++ b/.github/dependabot.yaml @@ -0,0 +1,13 @@ +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 }} \ No newline at end of file diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index fa7787e..0d0b1c9 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -1,3 +1 @@ _extends: .github -tag-template: node-iterator-api-$NEXT_MINOR_VERSION -name-template: Node Iterator API Plugin $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 7461cd0..0000000 --- a/.github/workflows/release-drafter.yml +++ /dev/null @@ -1,17 +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@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 c9a5f72..1313603 100644 --- a/pom.xml +++ b/pom.xml @@ -29,16 +29,12 @@ org.jenkins-ci.plugins plugin - 3.50 + 4.46 + - - 2.60.3 - 8 - - node-iterator-api - 1.5.2-SNAPSHOT + ${changelist} hpi Node Iterator API Plugin @@ -48,6 +44,14 @@ plugin can be used by cloud provider plugins to identify unused provisioned resource. https://github.com/jenkinsci/node-iterator-api-plugin + + + + 999999-SNAPSHOT + jenkinsci/node-iterator-api-plugin + 2.346.1 + + The MIT license @@ -64,10 +68,10 @@ - scm:git:git://github.com/jenkinsci/node-iterator-api-plugin.git - scm:git:git@github.com:jenkinsci/node-iterator-api-plugin.git - http://github.com/jenkinsci/node-iterator-api-plugin - HEAD + scm:git:git://github.com/${gitHubRepo}.git + scm:git:git@github.com:${gitHubRepo}.git + http://github.com/${gitHubRepo} + ${scmTag} diff --git a/src/findbugs/excludesFilter.xml b/src/findbugs/excludesFilter.xml deleted file mode 100644 index bd52d68..0000000 --- a/src/findbugs/excludesFilter.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/src/main/java/jenkins/slaves/iterators/api/NodeIterator.java b/src/main/java/jenkins/slaves/iterators/api/NodeIterator.java index ef32197..8fab8b1 100644 --- a/src/main/java/jenkins/slaves/iterators/api/NodeIterator.java +++ b/src/main/java/jenkins/slaves/iterators/api/NodeIterator.java @@ -206,7 +206,7 @@ private static class MetaNodeIterator extends NodeIterator { delegate = Collections.emptyIterator(); } else { List nodes = instance.getNodes(); - delegate = nodes == null ? Collections.emptyIterator() : nodes.iterator(); + delegate = nodes.iterator(); } this.metaIterator = metaIterator; this.nodeClass = nodeClass; diff --git a/src/main/resources/index.jelly b/src/main/resources/index.jelly new file mode 100644 index 0000000..d87c990 --- /dev/null +++ b/src/main/resources/index.jelly @@ -0,0 +1,27 @@ + + + + +
+ This plugin provides support for iterating through all the Node + instances that are in use by Jenkins, even those Node instances that are not traditionally attached to Jenkins. The API exposed by this + plugin can be used by cloud provider plugins to identify unused provisioned resource. +