本文整理了Java中hudson.model.Project.getBuilders()
方法的一些代码示例,展示了Project.getBuilders()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Project.getBuilders()
方法的具体详情如下:
包路径:hudson.model.Project
类名称:Project
方法名:getBuilders
暂无
代码示例来源:origin: SonarSource/sonar-scanner-jenkins
private static List<SonarRunnerBuilder> getSonarRunnerBuilders(final Project<?, ?> project) {
List<SonarRunnerBuilder> result = new ArrayList<>();
for (final Builder builder : project.getBuilders()) {
if (builder instanceof SonarRunnerBuilder) {
result.add((SonarRunnerBuilder) builder);
}
}
return result;
}
代码示例来源:origin: com.cisco.step.jenkins.plugins/jenkow-plugin
@Override
public Collection<? extends Action> createFor(AbstractProject target) {
List<JenkowBuilder> builders = null;
if (target instanceof Project) {
for (Builder b : ((Project<?,?>) target).getBuilders()) {
if (b instanceof JenkowBuilder) {
if (builders==null) builders = new ArrayList<JenkowBuilder>();
builders.add((JenkowBuilder) b);
}
}
}
return builders==null ? Collections.<Action>emptyList() :
Collections.singletonList(new JenkowWorkflowPicture(builders));
}
}
代码示例来源:origin: jenkinsci/dockerhub-notification-plugin
@Nonnull
@Override
public Collection<String> getDockerImagesUsedByJob(@Nonnull Job<?,?> job) {
if (job instanceof Project) {
Project<? extends Project, ? extends Build> project = (Project<?,? extends Build>)job;
Set<String> images = new HashSet<String>();
// check DockerHub build step for matching image ID
for (Builder b : project.getBuilders()) {
if (b instanceof DockerPullImageBuilder) {
images.add(((DockerPullImageBuilder)b).getImage());
}
}
return images;
} else {
return Collections.emptySet();
}
}
}
代码示例来源:origin: jenkinsci/analysis-core-plugin
/**
* Returns whether the current build uses maven.
*
* @param build
* the current build
* @return <code>true</code> if the current build uses maven,
* <code>false</code> otherwise
* @deprecated use {@link #isMavenBuild(Run)} instead
*/
@Deprecated
protected boolean isMavenBuild(final AbstractBuild<?, ?> build) {
if (build.getProject() instanceof Project) {
Project<?, ?> project = (Project<?, ?>)build.getProject();
for (Builder builder : project.getBuilders()) {
if (builder instanceof Maven) {
return true;
}
}
}
return false;
}
代码示例来源:origin: org.hudsonci.plugins/analysis-core
/**
* Returns whether the current build uses ant.
*
* @param build
* the current build
* @return <code>true</code> if the current build uses ant,
* <code>false</code> otherwise
*/
protected boolean isAntBuild(final AbstractBuild<?, ?> build) {
if (build.getProject() instanceof Project) {
Project<?, ?> project = (Project<?, ?>)build.getProject();
for (Builder builder : project.getBuilders()) {
if (builder instanceof Ant) {
return true;
}
}
}
return false;
}
代码示例来源:origin: org.hudsonci.plugins/analysis-core
/**
* Returns whether the current build uses maven.
*
* @param build
* the current build
* @return <code>true</code> if the current build uses maven,
* <code>false</code> otherwise
*/
protected boolean isMavenBuild(final AbstractBuild<?, ?> build) {
if (build.getProject() instanceof Project) {
Project<?, ?> project = (Project<?, ?>)build.getProject();
for (Builder builder : project.getBuilders()) {
if (builder instanceof Maven) {
return true;
}
}
}
return false;
}
代码示例来源:origin: jenkinsci/analysis-core-plugin
/**
* Returns whether the current build uses ant.
*
* @param build
* the current build
* @return <code>true</code> if the current build uses ant,
* <code>false</code> otherwise
*/
public static boolean isAntBuild(final AbstractBuild<?, ?> build) {
if (build.getProject() instanceof Project) {
Project<?, ?> project = (Project<?, ?>)build.getProject();
for (Builder builder : project.getBuilders()) {
if (builder instanceof Ant) {
return true;
}
}
}
return false;
}
代码示例来源:origin: com.cisco.step.jenkins.plugins/jenkow-plugin
static void setDeferredAction(String callerJobName, JenkowAction ja){
LOG.finer("JenkowAction.setDeferredAction: caller="+callerJobName+" ja="+ja);
for (TopLevelItem it : Jenkins.getInstance().getItems()){
if (it instanceof Project){
Project proj = (Project)it;
LOG.finer(" proj="+proj.getDisplayName());
if (proj.getDisplayName().equals(callerJobName)){
for (Builder b : (List<Builder>)proj.getBuilders()){
LOG.finer(" builder="+b.getDescriptor().getDisplayName());
if (b instanceof JenkowBuilder){
JenkowBuilder jb = (JenkowBuilder)b;
jb.addDeferredAction(ja);
}
}
}
}
}
}
代码示例来源:origin: com.cisco.step.jenkins.plugins/jenkow-plugin
static JenkowAction findDeferredAction(Run r){
for (TopLevelItem it : Jenkins.getInstance().getItems()){
if (it instanceof Project){
Project proj = (Project)it;
LOG.finer("proj="+proj.getDisplayName());
for (Builder b : (List<Builder>)proj.getBuilders()){
LOG.finer(" builder="+b.getDescriptor().getDisplayName());
if (b instanceof JenkowBuilder){
return ((JenkowBuilder)b).getDeferredAction(r);
}
}
}
}
return null;
}
}
代码示例来源:origin: org.jenkins-ci.plugins/scriptler
final List<Builder> builders = project.getBuilders();
for (Builder b : builders) {
if (b instanceof ScriptlerBuilder) {
代码示例来源:origin: jenkinsci/coverity-plugin
List<Builder> builders = ((Project)project).getBuilders();
for (Builder buildStep : builders) {
if (buildStep.getDescriptor() instanceof CoverityBuildStep.CoverityBuildStepDescriptor) {
内容来源于网络,如有侵权,请联系作者删除!