-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 2e0664f
Showing
16 changed files
with
236 additions
and
0 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* @jenkinsci/plain-text-console-link-plugin-developers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +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: monthly | ||
- package-ecosystem: github-actions | ||
directory: / | ||
schedule: | ||
interval: monthly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
_extends: .github | ||
tag-template: plain-text-console-link-$NEXT_MINOR_VERSION |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# More information about the Jenkins security scan can be found at the developer docs: https://www.jenkins.io/redirect/jenkins-security-scan/ | ||
|
||
name: Jenkins Security Scan | ||
on: | ||
push: | ||
branches: | ||
- "master" | ||
- "main" | ||
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: 'maven' # Optionally enable use of a build dependency cache. Specify 'maven' or 'gradle' as appropriate. | ||
java-version: 17 # What version of Java to set up for the build. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
target | ||
|
||
# mvn hpi:run | ||
work | ||
|
||
# IntelliJ IDEA project files | ||
*.iml | ||
*.iws | ||
*.ipr | ||
.idea | ||
|
||
# Eclipse project files | ||
.settings | ||
.classpath | ||
.project |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 https://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.8</version> | ||
</extension> | ||
</extensions> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
-Pconsume-incrementals | ||
-Pmight-produce-incrementals | ||
-Dchangelist.format=%d.v%s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/* | ||
See the documentation for more options: | ||
https://github.com/jenkins-infra/pipeline-library/ | ||
*/ | ||
buildPlugin( | ||
forkCount: '1C', // run this number of tests in parallel for faster feedback. If the number terminates with a 'C', the value will be multiplied by the number of available CPU cores | ||
useContainerAgent: true, // Set to `false` if you need to use Docker for containerized tests | ||
configurations: [ | ||
[platform: 'linux', jdk: 21], | ||
[platform: 'windows', jdk: 17], | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
The MIT License | ||
|
||
Copyright 2024 | ||
|
||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Plain Text Console Link Plugin | ||
|
||
## Introduction | ||
|
||
This plugin restores the "View as plain text" link in the side panel of Jenkins builds. | ||
|
||
|
||
## Contributing | ||
|
||
|
||
Refer to our [contribution guidelines](https://github.com/jenkinsci/.github/blob/master/CONTRIBUTING.md) | ||
|
||
## LICENSE | ||
|
||
Licensed under MIT, see [LICENSE](LICENSE.md) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>org.jenkins-ci.plugins</groupId> | ||
<artifactId>plugin</artifactId> | ||
<version>4.87</version> | ||
<relativePath /> | ||
</parent> | ||
|
||
<groupId>io.jenkins.plugins</groupId> | ||
<artifactId>plain-text-console-link</artifactId> | ||
<version>${changelist}</version> | ||
<packaging>hpi</packaging> | ||
|
||
<name>TODO Plugin</name> | ||
<url>https://github.com/jenkinsci/${project.artifactId}-plugin</url> | ||
<licenses> | ||
<license> | ||
<name>MIT License</name> | ||
<url>https://opensource.org/license/mit/</url> | ||
</license> | ||
</licenses> | ||
<scm child.scm.connection.inherit.append.path="false" child.scm.developerConnection.inherit.append.path="false" child.scm.url.inherit.append.path="false"> | ||
<connection>scm:git:https://github.com/${gitHubRepo}</connection> | ||
<developerConnection>scm:git:https://github.com/${gitHubRepo}</developerConnection> | ||
<tag>${scmTag}</tag> | ||
<url>https://github.com/${gitHubRepo}</url> | ||
</scm> | ||
|
||
<properties> | ||
<changelist>999999-SNAPSHOT</changelist> | ||
<!-- https://www.jenkins.io/doc/developer/plugin-development/choosing-jenkins-baseline/ --> | ||
<jenkins.version>2.462.1</jenkins.version> | ||
<gitHubRepo>jenkinsci/${project.artifactId}-plugin</gitHubRepo> | ||
|
||
<spotless.check.skip>false</spotless.check.skip> | ||
</properties> | ||
|
||
<dependencyManagement> | ||
<dependencies> | ||
<dependency> | ||
<groupId>io.jenkins.tools.bom</groupId> | ||
<artifactId>bom-2.462.x</artifactId> | ||
<version>3307.v2769886db_63b_</version> | ||
<type>pom</type> | ||
<scope>import</scope> | ||
</dependency> | ||
</dependencies> | ||
</dependencyManagement> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>io.jenkins.plugins</groupId> | ||
<artifactId>ionicons-api</artifactId> | ||
</dependency> | ||
</dependencies> | ||
|
||
<repositories> | ||
<repository> | ||
<id>repo.jenkins-ci.org</id> | ||
<url>https://repo.jenkins-ci.org/public/</url> | ||
</repository> | ||
</repositories> | ||
<pluginRepositories> | ||
<pluginRepository> | ||
<id>repo.jenkins-ci.org</id> | ||
<url>https://repo.jenkins-ci.org/public/</url> | ||
</pluginRepository> | ||
</pluginRepositories> | ||
</project> |
21 changes: 21 additions & 0 deletions
21
src/main/java/io/jenkins/plugins/plain_text_console_link/PlainTextConsoleLinkAction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package io.jenkins.plugins.plain_text_console_link; | ||
|
||
import hudson.model.Action; | ||
|
||
public class PlainTextConsoleLinkAction implements Action { | ||
|
||
@Override | ||
public String getIconFileName() { | ||
return "symbol-document-text-outline plugin-ionicons-api"; | ||
} | ||
|
||
@Override | ||
public String getDisplayName() { | ||
return Messages.viewPlain(); | ||
} | ||
|
||
@Override | ||
public String getUrlName() { | ||
return "consoleText"; | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
src/main/java/io/jenkins/plugins/plain_text_console_link/PlainTextConsoleLinkFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package io.jenkins.plugins.plain_text_console_link; | ||
|
||
import edu.umd.cs.findbugs.annotations.NonNull; | ||
import hudson.Extension; | ||
import hudson.model.Action; | ||
import hudson.model.Run; | ||
import java.util.Collection; | ||
import java.util.Set; | ||
import jenkins.model.TransientActionFactory; | ||
|
||
@Extension | ||
public class PlainTextConsoleLinkFactory extends TransientActionFactory<Run> { | ||
|
||
@Override | ||
public Class<Run> type() { | ||
return Run.class; | ||
} | ||
|
||
@NonNull | ||
@Override | ||
public Collection<? extends Action> createFor(@NonNull Run target) { | ||
return Set.of(new PlainTextConsoleLinkAction()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?jelly escape-by-default='true'?> | ||
<div> | ||
Adds the "View as plain text" link back to the sidepanel of builds (removed in Jenkins 2.460+) | ||
</div> |
1 change: 1 addition & 0 deletions
1
src/main/resources/io/jenkins/plugins/plain_text_console_link/Messages.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
viewPlain=View as plain text |