Skip to content

Commit

Permalink
modernize plugin (#4)
Browse files Browse the repository at this point in the history
* enable cd, update to 2.387.3

* fix htmlunit
  • Loading branch information
mawinter69 authored Sep 19, 2023
1 parent aca2d57 commit 02e7579
Show file tree
Hide file tree
Showing 9 changed files with 92 additions and 10 deletions.
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: maven
directory: "/"
schedule:
interval: monthly
- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly
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 }}
20 changes: 20 additions & 0 deletions .github/workflows/jenkins-security-scan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Jenkins Security Scan
on:
push:
branches:
- "master"
pull_request:
types: [ opened, synchronize, reopened ]
workflow_dispatch:

permissions:
security-events: write
contents: read
actions: read

jobs:
security-scan:
uses: jenkins-infra/jenkins-security-scan/.github/workflows/jenkins-security-scan.yaml@v2
with:
java-cache: '' # Optionally enable use of a build dependency cache. Specify 'maven' or 'gradle' as appropriate.
java-version: 11 # What version of Java to set up for the build.
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.7</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
5 changes: 5 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
buildPlugin(
useContainerAgent: true,
configurations: [
[platform: 'linux', jdk: 11]
])
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Customize Build Now Plugin
==========

This plugin allows users to provide an alternate label to "Build Now". While its well understood by Jenkins experts
what "Build Now" means, sometimes its more intuitive for new Jenkins users to associate a more appropriate label to
suite the purpose of the job like "Deploy Now" or "Execute Now" or "Promote Now" etc...
34 changes: 25 additions & 9 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,30 @@
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>1.625</version> <!-- TODO 1.625.1 when released -->
<version>4.73</version>
<relativePath />
</parent>

<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>customize-build-now</artifactId>
<version>1.2-SNAPSHOT</version>
<version>${changelist}</version>
<packaging>hpi</packaging>

<name>Customize Build Now Label</name>
<description>Provide an alternate label to 'Build Now' to run a job</description>
<url>https://wiki.jenkins-ci.org/display/JENKINS/Customize+Build+Now+Plugin</url>
<url>https://github.com/jenkinsci/customize-build-now-plugin</url>
<licenses>
<license>
<name>MIT License</name>
<url>http://opensource.org/licenses/MIT</url>
<url>https://opensource.org/licenses/MIT</url>
</license>
</licenses>

<properties>
<changelist>999999-SNAPSHOT</changelist>
<jenkins.version>2.387.3</jenkins.version>
</properties>

<developers>
<developer>
<id>uday</id>
Expand All @@ -35,28 +40,39 @@
<scm>
<connection>scm:git:git://github.com/jenkinsci/${project.artifactId}-plugin.git</connection>
<developerConnection>scm:git:[email protected]:jenkinsci/${project.artifactId}-plugin.git</developerConnection>
<url>http://github.com/jenkinsci/${project.artifactId}-plugin</url>
<url>https://github.com/jenkinsci/${project.artifactId}-plugin</url>
<tag>HEAD</tag>
</scm>

<repositories>
<repository>
<id>repo.jenkins-ci.org</id>
<url>http://repo.jenkins-ci.org/public/</url>
<url>https://repo.jenkins-ci.org/public/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>repo.jenkins-ci.org</id>
<url>http://repo.jenkins-ci.org/public/</url>
<url>https://repo.jenkins-ci.org/public/</url>
</pluginRepository>
</pluginRepositories>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.jenkins.tools.bom</groupId>
<artifactId>bom-2.387.x</artifactId>
<version>2446.v2e9fd3b_d8c81</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-aggregator</artifactId>
<version>1.10</version>
<artifactId>workflow-job</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.jenkinsci.plugins.customizebuildnow;

import com.gargoylesoftware.htmlunit.html.HtmlPage;
import org.htmlunit.html.HtmlPage;
import hudson.model.FreeStyleProject;
import jenkins.model.Messages;
import org.jenkinsci.plugins.workflow.job.WorkflowJob;
Expand Down

0 comments on commit 02e7579

Please sign in to comment.