-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from donhui/donhui-0511
add a side panel for the build
- Loading branch information
Showing
3 changed files
with
103 additions
and
13 deletions.
There are no files selected for viewing
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
55 changes: 55 additions & 0 deletions
55
src/main/java/jenkins/plugins/mvn_snapshot_check/MavenSnapshotCheckAction.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,55 @@ | ||
package jenkins.plugins.mvn_snapshot_check; | ||
|
||
import hudson.model.Run; | ||
import jenkins.model.RunAction2; | ||
|
||
/** | ||
* @author donghui 2019/5/11. | ||
*/ | ||
public class MavenSnapshotCheckAction implements RunAction2{ | ||
|
||
private transient Run run; | ||
|
||
private String message; | ||
|
||
public String getMessage() { | ||
return message; | ||
} | ||
|
||
public void setMessage(String message) { | ||
this.message = message; | ||
} | ||
|
||
public MavenSnapshotCheckAction(String message){ | ||
this.message = message; | ||
} | ||
|
||
@Override | ||
public String getIconFileName() { | ||
return "document.png"; | ||
} | ||
|
||
@Override | ||
public String getDisplayName() { | ||
return "Maven SNAPSHOT Check"; | ||
} | ||
|
||
@Override | ||
public String getUrlName() { | ||
return "maven-snapshot-check"; | ||
} | ||
|
||
@Override | ||
public void onAttached(Run<?, ?> run) { | ||
this.run = run; | ||
} | ||
|
||
@Override | ||
public void onLoad(Run<?, ?> run) { | ||
this.run = run; | ||
} | ||
|
||
public Run getRun() { | ||
return run; | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
src/main/resources/jenkins/plugins/mvn_snapshot_check/MavenSnapshotCheckAction/index.jelly
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 @@ | ||
<?jelly escape-by-default='true'?> | ||
<j:jelly xmlns:j="jelly:core" xmlns:l="/lib/layout" xmlns:st="jelly:stapler"> | ||
<l:layout title="Maven SNAPSHOT Check"> | ||
<l:side-panel> | ||
<st:include page="sidepanel.jelly" it="${it.run}" optional="true" /> | ||
</l:side-panel> | ||
<l:main-panel> | ||
<h3> | ||
Is it checked? | ||
</h3> | ||
<h3> | ||
${it.message} | ||
</h3> | ||
</l:main-panel> | ||
</l:layout> | ||
</j:jelly> |