Skip to content

Commit

Permalink
Modernize plugin (#5)
Browse files Browse the repository at this point in the history
* Modernize plugin

* Add jenkinsfile
  • Loading branch information
NotMyFault authored Dec 22, 2022
1 parent 8af4c5a commit 2644436
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 15 deletions.
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 }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ target
.settings
.project
work
.idea
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
4 changes: 4 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
buildPlugin(useContainerAgent: true, configurations: [
[platform: 'linux', jdk: '11'],
[platform: 'linux', jdk: '17']
])
27 changes: 14 additions & 13 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,41 +3,42 @@
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>1.403</version>
<version>4.53</version>
<relativePath />
</parent>

<artifactId>envfile</artifactId>
<version>1.3-SNAPSHOT</version>
<version>${changelist}</version>
<packaging>hpi</packaging>
<name>Jenkins Environment File Plugin</name>
<url>https://wiki.jenkins-ci.org/display/JENKINS/Envfile+Plugin</url>

<developers>
<developer>
<id>ajoajoajo</id>
<name>Anders Johansson</name>
<email>ajoajoajo@gmail.com</email>
</developer>
</developers>

<!-- get every artifact through maven.glassfish.org, which proxies all the artifacts that we need -->
<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>

<scm>
<connection>scm:git:git://github.com/jenkinsci/envfile-plugin.git</connection>
<connection>scm:git:https://github.com/jenkinsci/envfile-plugin.git</connection>
<developerConnection>scm:git:git@github.com:jenkinsci/envfile-plugin.git</developerConnection>
<url>https://github.com/jenkinsci/envfile-plugin</url>
<tag>${scmTag}</tag>
</scm>

<properties>
<changelist>999999-SNAPSHOT</changelist>
<jenkins.version>2.361.4</jenkins.version>
<!-- TODO fix violations -->
<spotbugs.threshold>High</spotbugs.threshold>
</properties>
</project>
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form">
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:f="/lib/form">

<f:entry title="${%Title}" help="/plugin/envfile/help-projectConfig.html" description="${%Description}">
<f:textbox name="filePath" field="filePath"/>
Expand Down
3 changes: 2 additions & 1 deletion src/main/resources/index.jelly
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?jelly escape-by-default='true'?>
<div>
This plugin can be used to set environment variables from a file.
</div>
</div>

0 comments on commit 2644436

Please sign in to comment.