Skip to content

Commit

Permalink
Merge pull request #6 from jtnord/plugin-refresh-and-cd
Browse files Browse the repository at this point in the history
Plugin refresh and cd
  • Loading branch information
jtnord authored Aug 19, 2022
2 parents a51c4dc + 03e0f31 commit 58a8b35
Show file tree
Hide file tree
Showing 10 changed files with 81 additions and 36 deletions.
13 changes: 13 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
2 changes: 0 additions & 2 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
_extends: .github
tag-template: node-iterator-api-$NEXT_MINOR_VERSION
name-template: Node Iterator API Plugin $NEXT_MINOR_VERSION
15 changes: 15 additions & 0 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
17 changes: 0 additions & 17 deletions .github/workflows/release-drafter.yml

This file was deleted.

7 changes: 7 additions & 0 deletions .mvn/extensions.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<extensions xmlns="http://maven.apache.org/EXTENSIONS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/EXTENSIONS/1.0.0 http://maven.apache.org/xsd/core-extensions-1.0.0.xsd">
<extension>
<groupId>io.jenkins.tools.incrementals</groupId>
<artifactId>git-changelist-maven-extension</artifactId>
<version>1.4</version>
</extension>
</extensions>
3 changes: 3 additions & 0 deletions .mvn/maven.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-Pconsume-incrementals
-Pmight-produce-incrementals
-Dchangelist.format=%d.v%s
26 changes: 15 additions & 11 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,12 @@
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>3.50</version>
<version>4.46</version>
<relativePath/>
</parent>

<properties>
<jenkins.version>2.60.3</jenkins.version>
<java.level>8</java.level>
</properties>

<artifactId>node-iterator-api</artifactId>
<version>1.5.2-SNAPSHOT</version>
<version>${changelist}</version>
<packaging>hpi</packaging>

<name>Node Iterator API Plugin</name>
Expand All @@ -48,6 +44,14 @@
plugin can be used by cloud provider plugins to identify unused provisioned resource.
</description>
<url>https://github.com/jenkinsci/node-iterator-api-plugin</url>


<properties>
<changelist>999999-SNAPSHOT</changelist>
<gitHubRepo>jenkinsci/node-iterator-api-plugin</gitHubRepo>
<jenkins.version>2.346.1</jenkins.version>
</properties>

<licenses>
<license>
<name>The MIT license</name>
Expand All @@ -64,10 +68,10 @@
</developers>

<scm>
<connection>scm:git:git://github.com/jenkinsci/node-iterator-api-plugin.git</connection>
<developerConnection>scm:git:git@github.com:jenkinsci/node-iterator-api-plugin.git</developerConnection>
<url>http://github.com/jenkinsci/node-iterator-api-plugin</url>
<tag>HEAD</tag>
<connection>scm:git:git://github.com/${gitHubRepo}.git</connection>
<developerConnection>scm:git:git@github.com:${gitHubRepo}.git</developerConnection>
<url>http://github.com/${gitHubRepo}</url>
<tag>${scmTag}</tag>
</scm>

<repositories>
Expand Down
5 changes: 0 additions & 5 deletions src/findbugs/excludesFilter.xml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ private static class MetaNodeIterator<N extends Node> extends NodeIterator<N> {
delegate = Collections.emptyIterator();
} else {
List<Node> nodes = instance.getNodes();
delegate = nodes == null ? Collections.<Node>emptyIterator() : nodes.iterator();
delegate = nodes.iterator();
}
this.metaIterator = metaIterator;
this.nodeClass = nodeClass;
Expand Down
27 changes: 27 additions & 0 deletions src/main/resources/index.jelly
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
The MIT License
Copyright 2022 CloudBees, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-->

<?jelly escape-by-default='true'?>
<div>
This plugin provides support for iterating through all the <a href="https://javadoc.jenkins.io/jenkins/model/Nodes.html">Node</a>
instances that are in use by <code>Jenkins</code>, even those <code>Node</code> 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.
</div>

0 comments on commit 58a8b35

Please sign in to comment.