本文整理了Java中hudson.model.AbstractBuild.getFullDisplayName()
方法的一些代码示例,展示了AbstractBuild.getFullDisplayName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AbstractBuild.getFullDisplayName()
方法的具体详情如下:
包路径:hudson.model.AbstractBuild
类名称:AbstractBuild
方法名:getFullDisplayName
暂无
代码示例来源:origin: org.jvnet.hudson.main/maven3-plugin
public String getPageTitle() {
return String.format("%s Maven 3 Build Information",
getBuild().getFullDisplayName());
}
代码示例来源:origin: jenkinsci/docker-build-step-plugin
public String getFullDisplayName() {
return build.getFullDisplayName() + ' ' + getDisplayName();
}
代码示例来源:origin: hudson/hudson-2.x
/**
* Returns the subject of the mail.
*
* @param build build.
* @param caption the caption.
* @return prepared subject.
*/
protected String getSubject(AbstractBuild<?, ?> build, String caption) {
return new StringBuilder().append(getSubjectPrefix())
.append(" ")
.append(caption)
.append(" ")
.append(build.getFullDisplayName())
.toString();
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
/**
* Returns the subject of the mail.
*
* @param build build.
* @param caption the caption.
* @return prepared subject.
*/
protected String getSubject(AbstractBuild<?, ?> build, String caption) {
return new StringBuilder().append(getSubjectPrefix())
.append(" ")
.append(caption)
.append(" ")
.append(build.getFullDisplayName())
.toString();
}
代码示例来源:origin: org.eclipse.hudson/hudson-core
/**
* Returns the subject of the mail.
*
* @param build build.
* @param caption the caption.
* @return prepared subject.
*/
protected String getSubject(AbstractBuild<?, ?> build, String caption) {
return new StringBuilder().append(getSubjectPrefix())
.append(" ")
.append(caption)
.append(" ")
.append(build.getFullDisplayName())
.toString();
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
/**
* Returns the subject of the mail.
*
* @param build build.
* @param caption the caption.
* @return prepared subject.
*/
protected String getSubject(AbstractBuild<?, ?> build, String caption) {
return new StringBuilder().append(getSubjectPrefix())
.append(" ")
.append(caption)
.append(" ")
.append(build.getFullDisplayName())
.toString();
}
代码示例来源:origin: com.cisco.step.jenkins.plugins/jenkow-plugin
@Override
public Environment setUp(AbstractBuild build, Launcher launcher, BuildListener listener) throws InterruptedException {
System.out.println("JenkowBuildWrapper.setUp "+build.getFullDisplayName()+" execId="+getTaskExecId(build));
LOG.info("JenkowBuildWrapper.setUp "+build.getFullDisplayName()+" execId="+getTaskExecId(build));
Map<String,String> map = new HashMap<String,String>();
// TODO 7: feed-in workflow context variables as job environment variables
map.put("JENKOW_VAR","set by JenkowBuildWrapper.setUp()");
return new EnvironmentImpl(map);
// return new Environment() {
// @Override
// public boolean tearDown(AbstractBuild build, BuildListener listener) throws IOException, InterruptedException {
// System.out.println("build.getResult() -> "+build.getResult());
// new Exception().printStackTrace();
// return true;
// }
// };
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-service
public void triggerDependents(final AbstractBuild<?, ?> build, final TaskListener listener) {
checkNotNull(build, "build");
checkNotNull(listener, "listener");
if (log.isDebugEnabled()) {
log.debug("Maybe triggering dependents of build: {}", build.getFullDisplayName());
}
// FIXME: In a more perfect world, the BuildTrigger would use this
// service, instead of us calling it directly here
BuildTrigger.execute(build, (BuildListener) listener);
}
}
代码示例来源:origin: org.eclipse.hudson/hudson-service
public void triggerDependents(final AbstractBuild<?, ?> build, final TaskListener listener) {
checkNotNull(build, "build");
checkNotNull(listener, "listener");
if (log.isDebugEnabled()) {
log.debug("Maybe triggering dependents of build: {}", build.getFullDisplayName());
}
// FIXME: In a more perfect world, the BuildTrigger would use this
// service, instead of us calling it directly here
BuildTrigger.execute(build, (BuildListener) listener);
}
}
代码示例来源:origin: jenkinsci/parameterized-trigger-plugin
private static String getCurrentBuildName() {
Executor e = Executor.currentExecutor();
if(e == null) {
return null;
}
Queue.Executable task = e.getCurrentExecutable();
if(task == null || !(task instanceof AbstractBuild)) {
return null;
}
return ((AbstractBuild<?,?>)task).getFullDisplayName();
}
代码示例来源:origin: jenkinsci/jira-plugin
/**
* Returns the jira session.
*
* @param build
* @return JiraSession
* @throws IOException
*/
private JiraSession getJiraSession(AbstractBuild<?, ?> build) throws IOException {
JiraSite site = getSiteForProject(build.getProject());
if (site == null) {
throw new IllegalStateException("JIRA site needs to be configured in the project " + build.getFullDisplayName());
}
JiraSession session = site.getSession();
if (session == null) {
throw new IllegalStateException("Remote access for JIRA isn't configured in Jenkins");
}
return session;
}
代码示例来源:origin: jenkinsci/parameterized-trigger-plugin
/**
* Checks if the build can trigger a project.
* @param build Build, which is about to trigger the project
* @param job Job to be triggered
* @param taskListener Task listener
* @return {@code true} if the project can be scheduled.
* {@code false} if there is a lack of permissions, details will be printed to the logs then.
*/
/*package*/ static boolean canTriggerProject(@Nonnull AbstractBuild<?, ?> build,
@Nonnull final Job job, @Nonnull TaskListener taskListener) {
if (!job.hasPermission(Item.BUILD)) {
String message = String.format("Cannot schedule the build of %s from %s. "
+ "The authenticated build user %s has no Job.BUILD permission",
job.getFullDisplayName(), build.getFullDisplayName(), Jenkins.getAuthentication().getName());
LOGGER.log(Level.WARNING, message);
taskListener.error(message);
return false;
}
return true;
}
代码示例来源:origin: jenkinsci/ghprb-plugin
@Override
public Environment setUpEnvironment(@SuppressWarnings("rawtypes") AbstractBuild build, Launcher launcher, BuildListener listener) {
Map<String, String> envVars = returnEnvironmentVars(build, listener);
if (envVars != null) {
LOGGER.log(Level.FINE, "Job: " + build.getFullDisplayName() + " Attempting to send GitHub commit status");
try {
returnGhprbSimpleStatus(envVars).onEnvironmentSetup(build, listener, repo);
} catch (GhprbCommitStatusException e) {
e.printStackTrace();
}
}
return new Environment() {
};
}
代码示例来源:origin: jenkinsci/shiningpanda-plugin
/**
* Serve report files.
*
* @param req
* The request
* @param rsp
* The response
* @throws IOException
* @throws ServletException
*/
public void doDynamic(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException {
// Delegate
serve(req, rsp, build.getFullDisplayName(), CoveragePublisher.getHtmlDir(build), getPath(req));
}
}
代码示例来源:origin: ameizi/NotifyQQ
@Override
public boolean perform(AbstractBuild build, Launcher launcher, BuildListener listener) throws UnsupportedEncodingException {
logger = listener.getLogger();
Jenkins.getInstance();
String jobURL = "";
try {
jobURL = build.getEnvironment(listener).expand("${JOB_URL}");
logger.println("jobURL = " + jobURL);
} catch (Exception e) {
logger.println("tokenmacro expand error.");
}
String msg = "各位小伙伴,项目";
msg += build.getFullDisplayName();
if (build.getResult() == Result.SUCCESS) {
msg += "编译成功!" + qqmessage;
} else {
msg += "编译失败了...";
msg += "jenkins地址:" + jobURL;
}
msg = URLEncoder.encode(msg, "UTF-8");
msg = msg.replaceAll("\\+", "_");
for (int i = 0; i < qQNumbers.size(); i++) {
QQNumber number = qQNumbers.get(i);
send(GenerateMessageURL(number.GetUrlString(), msg));
}
return true;
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
protected int run() throws Exception {
job.checkPermission(Item.BUILD);
ParametersAction a = null;
if (!parameters.isEmpty()) {
ParametersDefinitionProperty pdp = job.getProperty(ParametersDefinitionProperty.class);
if (pdp==null)
throw new AbortException(job.getFullDisplayName()+" is not parameterized but the -p option was specified");
List<ParameterValue> values = new ArrayList<ParameterValue>();
for (Entry<String, String> e : parameters.entrySet()) {
String name = e.getKey();
ParameterDefinition pd = pdp.getParameterDefinition(name);
if (pd==null)
throw new AbortException(String.format("\'%s\' is not a valid parameter. Did you mean %s?",
name, EditDistance.findNearest(name, pdp.getParameterDefinitionNames())));
values.add(pd.createValue(this,e.getValue()));
}
for (ParameterDefinition pd : pdp.getParameterDefinitions()) {
if (parameters.get(pd.getName()) == null) {
values.add(pd.getDefaultParameterValue());
}
}
a = new ParametersAction(values);
}
Future<? extends AbstractBuild> f = job.scheduleBuild2(0, new CLICause(), a);
if (!sync) return 0;
AbstractBuild b = f.get(); // wait for the completion
stdout.println("Completed "+b.getFullDisplayName()+" : "+b.getResult());
return b.getResult().ordinal;
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
protected int run() throws Exception {
job.checkPermission(Item.BUILD);
ParametersAction a = null;
if (!parameters.isEmpty()) {
ParametersDefinitionProperty pdp = job.getProperty(ParametersDefinitionProperty.class);
if (pdp==null)
throw new AbortException(job.getFullDisplayName()+" is not parameterized but the -p option was specified");
List<ParameterValue> values = new ArrayList<ParameterValue>();
for (Entry<String, String> e : parameters.entrySet()) {
String name = e.getKey();
ParameterDefinition pd = pdp.getParameterDefinition(name);
if (pd==null)
throw new AbortException(String.format("\'%s\' is not a valid parameter. Did you mean %s?",
name, EditDistance.findNearest(name, pdp.getParameterDefinitionNames())));
values.add(pd.createValue(this,e.getValue()));
}
for (ParameterDefinition pd : pdp.getParameterDefinitions()) {
if (parameters.get(pd.getName()) == null) {
values.add(pd.getDefaultParameterValue());
}
}
a = new ParametersAction(values);
}
Future<? extends AbstractBuild> f = job.scheduleBuild2(0, new CLICause(), a);
if (!sync) return 0;
AbstractBuild b = f.get(); // wait for the completion
stdout.println("Completed "+b.getFullDisplayName()+" : "+b.getResult());
return b.getResult().ordinal;
}
代码示例来源:origin: hudson/hudson-2.x
protected int run() throws Exception {
job.checkPermission(Item.BUILD);
ParametersAction a = null;
if (!parameters.isEmpty()) {
ParametersDefinitionProperty pdp = job.getProperty(ParametersDefinitionProperty.class);
if (pdp==null)
throw new AbortException(job.getFullDisplayName()+" is not parameterized but the -p option was specified");
List<ParameterValue> values = new ArrayList<ParameterValue>();
for (Entry<String, String> e : parameters.entrySet()) {
String name = e.getKey();
ParameterDefinition pd = pdp.getParameterDefinition(name);
if (pd==null)
throw new AbortException(String.format("\'%s\' is not a valid parameter. Did you mean %s?",
name, EditDistance.findNearest(name, pdp.getParameterDefinitionNames())));
values.add(pd.createValue(this,e.getValue()));
}
for (ParameterDefinition pd : pdp.getParameterDefinitions()) {
if (parameters.get(pd.getName()) == null) {
values.add(pd.getDefaultParameterValue());
}
}
a = new ParametersAction(values);
}
Future<? extends AbstractBuild> f = job.scheduleBuild2(0, new CLICause(), a);
if (!sync) return 0;
AbstractBuild b = f.get(); // wait for the completion
stdout.println("Completed "+b.getFullDisplayName()+" : "+b.getResult());
return b.getResult().ordinal;
}
代码示例来源:origin: org.eclipse.hudson/hudson-core
stdout.println("Completed " + b.getFullDisplayName() + " : " + b.getResult());
return b.getResult().ordinal;
代码示例来源:origin: com.cisco.step.jenkins.plugins/jenkow-plugin
rtSvc.deleteProcessInstance(procId,build.getFullDisplayName()+" finished");
内容来源于网络,如有侵权,请联系作者删除!