public class PipelineConfigHistoryProjectAction extends Object implements hudson.model.Action
| Constructor and Description |
|---|
PipelineConfigHistoryProjectAction(org.jenkinsci.plugins.workflow.job.WorkflowJob project) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
buildExists(int build) |
void |
doDiffFiles(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
Show a diff file overview or all diffs combined in one page,
depending on the showDiffsInOneSite-parameter.
|
File[] |
getAllFilesExceptHistoryXmlFromDirectory(File directory)
Get all files the given directory contains, except the history xml in the root dir.
|
int |
getBuildNumber(String timestamp)
Get the given revision's associated build's buildNumber.
|
String |
getDisplayName() |
File |
getFileByHashCode(String timestamp,
String hashCode)
Return a file from a given config by its hashcode.
|
String |
getFileContentByHashCode(String timestamp,
String hashCode)
Return a file's content from a given config by its hashcode.
|
String |
getFileContentByHashCode(String timestamp,
String hashCode,
boolean syntaxHighlighted)
Return a file's content from a given config by its hashcode.
|
String |
getFileNameDisplayable(String timestamp,
File file) |
String |
getIconFileName() |
String |
getJenkinsfilePath() |
int |
getLeadingWhitespace(String str) |
List<SideBySideView.Line> |
getLines(File file1,
File file2)
Calculate the line-wise diff of the given files.
|
List<SideBySideView.Line> |
getLines(Match match)
Calculate the line-wise diff of the files contained in the given match.
|
List<SideBySideView.Line> |
getLines(String file1Str,
String file2Str)
Calculate the line-wise diff of the given files (as \n-containing strings).
|
String |
getLinkSymbol() |
List<Match> |
getMatchingFiles(String timestamp1,
String timestamp2)
Calculate the revision file equality and return a list encapsulating that .
|
int |
getOriginalNumberFromReplayBuild(String timestamp)
Get the original build number this revision's associated build is a replay from.
|
PipelineHistoryDescription |
getPipelineHistoryDescription(String timestamp)
Get the PipelineHistoryDescription describing the config this timestamp represents.
|
List<PipelineHistoryDescription> |
getPipelineHistoryDescriptions()
Get a list of all PipelineHistoryDescriptions.
|
hudson.model.AbstractItem |
getProject()
Get the current pipeline project.
|
File |
getRevision(String timestamp)
Get the wanted pipeline revision of the current project.
|
String |
getScriptFromXmlFile(File file,
boolean syntaxHighlighted)
Return the content of the script-Tag in the given xml file.
|
String |
getScriptFromXmlFile(String timestamp,
String hashCode,
boolean syntaxHighlighted)
Return the content of the script-Tag in the given xml file.
|
List<SingleLineView.Line> |
getSingleLineViewLines(File file1,
File file2) |
List<SingleLineView.Line> |
getSingleLineViewLines(List<SideBySideView.Line> unsortedLines) |
List<SingleLineView.Line> |
getSingleLineViewLines(Match match) |
List<SingleLineView.Line> |
getSingleLineViewLines(String file1Str,
String file2Str) |
String |
getTimestampWellFormatted(String timestamp)
Get your timestamp well formatted.
|
String |
getUrlName() |
boolean |
isAnyMatchUnequal(String timestamp1,
String timestamp2)
Determine whether the given revisions are unequal.
|
boolean |
isBuiltfromReplay(String timestamp)
Determine whether the given revision's associated build is a replay from anoter build.
|
public PipelineConfigHistoryProjectAction(org.jenkinsci.plugins.workflow.job.WorkflowJob project)
public List<PipelineHistoryDescription> getPipelineHistoryDescriptions()
public PipelineHistoryDescription getPipelineHistoryDescription(String timestamp) throws IOException
timestamp - the timestamp to identify the configIOException - if the wanted pipeline history is not found.public String getJenkinsfilePath()
public File getFileByHashCode(String timestamp, String hashCode)
timestamp - the config identifierhashCode - the file identifierpublic File[] getAllFilesExceptHistoryXmlFromDirectory(File directory)
directory - the directory.public String getFileContentByHashCode(String timestamp, String hashCode, boolean syntaxHighlighted)
timestamp - the config identifierhashCode - the file identifiersyntaxHighlighted - whether syntax highlighting html tags should be included or notpublic String getFileContentByHashCode(String timestamp, String hashCode)
timestamp - the config identifierhashCode - the file identifierpublic String getScriptFromXmlFile(File file, boolean syntaxHighlighted)
file - the xml file.syntaxHighlighted - whether syntax highlighting html tags should be included or notpublic String getScriptFromXmlFile(String timestamp, String hashCode, boolean syntaxHighlighted)
timestamp - the config identifierhashCode - the file identifiersyntaxHighlighted - whether syntax highlighting html tags should be included or notpublic String getTimestampWellFormatted(String timestamp)
timestamp - the config identifierpublic File getRevision(String timestamp)
timestamp - the config identifierpublic boolean isBuiltfromReplay(String timestamp)
timestamp - the config revision identifier.public int getOriginalNumberFromReplayBuild(String timestamp)
timestamp - the config revision identifier.public int getBuildNumber(String timestamp)
timestamp - the config revision identifierpublic boolean buildExists(int build)
public final hudson.model.AbstractItem getProject()
public boolean isAnyMatchUnequal(String timestamp1, String timestamp2)
timestamp1 - the first config revision identifiertimestamp2 - the second config revision identifierpublic List<Match> getMatchingFiles(String timestamp1, String timestamp2)
timestamp1 - the first config revision identifiertimestamp2 - the second config revision identifierpublic final List<SideBySideView.Line> getLines(File file1, File file2)
file1 - the first filefile2 - the second filepublic final List<SideBySideView.Line> getLines(Match match)
match - the match.public final List<SideBySideView.Line> getLines(String file1Str, String file2Str)
file1Str - the first filefile2Str - the second filepublic final List<SingleLineView.Line> getSingleLineViewLines(File file1, File file2)
public final List<SingleLineView.Line> getSingleLineViewLines(Match match)
public final List<SingleLineView.Line> getSingleLineViewLines(List<SideBySideView.Line> unsortedLines)
public String getLinkSymbol()
public final List<SingleLineView.Line> getSingleLineViewLines(String file1Str, String file2Str)
public void doDiffFiles(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws IOException
req - the request containing the parametersrsp - the response.IOException - some exception that might occur.public int getLeadingWhitespace(String str)
@CheckForNull public String getIconFileName()
getIconFileName in interface hudson.model.Action@CheckForNull public String getDisplayName()
getDisplayName in interface hudson.model.ActiongetDisplayName in interface hudson.model.ModelObject@CheckForNull public String getUrlName()
getUrlName in interface hudson.model.ActionCopyright © 2016–2020. All rights reserved.