本文整理了Java中net.nemerosa.ontrack.model.structure.Branch.getProject()
方法的一些代码示例,展示了Branch.getProject()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Branch.getProject()
方法的具体详情如下:
包路径:net.nemerosa.ontrack.model.structure.Branch
类名称:Branch
方法名:getProject
暂无
代码示例来源:origin: net.nemerosa.ontrack/ontrack-model
@Override
public Project getProject() {
return getBranch().getProject();
}
代码示例来源:origin: net.nemerosa.ontrack/ontrack-model
@Override
public Project getProject() {
return getBranch().getProject();
}
代码示例来源:origin: net.nemerosa.ontrack/ontrack-model
@NotNull
@Override
@JsonIgnore
public Map<String, String> getRunMetricTags() {
return ImmutableMap.of(
"project", branch.getProject().getName(),
"branch", branch.getName()
);
}
代码示例来源:origin: net.nemerosa.ontrack/ontrack-service
@Override
public String getDescription() {
return format(
"Template sync. from %s/%s",
branch.getProject().getName(),
branch.getName()
);
}
代码示例来源:origin: net.nemerosa.ontrack/ontrack-extension-svn
@Override
public String getDescription() {
return String.format(
"Synchronisation of builds with SVN for branch %s/%s",
branch.getProject().getName(),
branch.getName()
);
}
代码示例来源:origin: net.nemerosa.ontrack/ontrack-model
@Override
public String getEntityDisplayName() {
return String.format("Promotion level %s/%s/%s", branch.getProject().getName(), branch.getName(), name);
}
代码示例来源:origin: net.nemerosa.ontrack/ontrack-model
@Override
public String getEntityDisplayName() {
return String.format("Validation stamp %s/%s/%s", branch.getProject().getName(), branch.getName(), name);
}
代码示例来源:origin: net.nemerosa.ontrack/ontrack-model
@Override
public String getEntityDisplayName() {
return String.format("Build %s/%s/%s", branch.getProject().getName(), branch.getName(), name);
}
代码示例来源:origin: net.nemerosa.ontrack/ontrack-extension-svn
protected boolean canApplyTo(Branch branch) {
return propertyService.hasProperty(branch.getProject(), SVNProjectConfigurationPropertyType.class)
&& propertyService.hasProperty(branch, SVNBranchConfigurationPropertyType.class);
}
代码示例来源:origin: net.nemerosa.ontrack/ontrack-model
@Override
public boolean isDisabled() {
return branch.isDisabled() || branch.getProject().isDisabled();
}
代码示例来源:origin: net.nemerosa.ontrack/ontrack-model
@Override
public boolean isValid() {
return structureService.findBranchByName(branch.getProject().getName(), branch.getName()).isPresent();
}
代码示例来源:origin: net.nemerosa.ontrack/ontrack-extension-svn
@Override
public SVNRepository getRequiredSVNRepository(Branch branch) {
return getSVNRepository(branch)
.orElseThrow(() ->
new MissingSVNProjectConfigurationException(branch.getProject().getName())
);
}
代码示例来源:origin: net.nemerosa.ontrack/ontrack-model
@NotNull
@Override
@JsonIgnore
public Map<String, String> getRunMetricTags() {
return ImmutableMap.of(
"project", validationStamp.getBranch().getProject().getName(),
"branch", validationStamp.getBranch().getName(),
"validationStamp", validationStamp.getName(),
"status", getLastStatusId()
);
}
代码示例来源:origin: net.nemerosa.ontrack/ontrack-extension-svn
protected Optional<Build> getEarliestBuild(T data, Branch branch, SVNLocation location, SVNBranchConfigurationProperty branchConfigurationProperty) {
return extractBuildName(data, location.getPath(), branch, branchConfigurationProperty)
.flatMap(buildName ->
structureService.findBuildByName(
branch.getProject().getName(),
branch.getName(),
buildName
)
);
}
代码示例来源:origin: net.nemerosa.ontrack/ontrack-service
protected Branch createBranchForTemplateInstance(Branch templateBranch, String branchName) {
return structureService.newBranch(
Branch.of(
templateBranch.getProject(),
NameDescription.nd(
NameDescription.escapeName(branchName),
""
)
)
);
}
代码示例来源:origin: net.nemerosa.ontrack/ontrack-model
@Override
public String getEntityDisplayName() {
return String.format("Promotion run %s/%s/%s/%s",
build.getBranch().getProject().getName(),
build.getBranch().getName(),
build.getName(),
promotionLevel.getName()
);
}
代码示例来源:origin: net.nemerosa.ontrack/ontrack-model
@Override
public String getEntityDisplayName() {
return String.format("Validation run %s#%d for %s/%s/%s",
validationStamp.getName(),
runOrder,
build.getBranch().getProject().getName(),
build.getBranch().getName(),
build.getName()
);
}
代码示例来源:origin: net.nemerosa.ontrack/ontrack-model
public static PromotionLevel of(Branch branch, NameDescription nameDescription) {
Entity.isEntityDefined(branch, "Branch must be defined");
Entity.isEntityDefined(branch.getProject(), "Project must be defined");
return new PromotionLevel(ID.NONE, nameDescription.getName(), nameDescription.getDescription(), branch, false,
Signature.none()
);
}
代码示例来源:origin: net.nemerosa.ontrack/ontrack-it-utils
public ValidationStamp doCreateValidationStamp(Branch branch, NameDescription nameDescription, ValidationDataTypeConfig<?> config) throws Exception {
return asUser().with(branch.getProject().id(), ValidationStampCreate.class).call(() ->
structureService.newValidationStamp(
ValidationStamp.of(
branch,
nameDescription
).withDataType(config)
)
);
}
代码示例来源:origin: net.nemerosa.ontrack/ontrack-service
@Override
public Event deleteBranch(Branch branch) {
return Event.of(DELETE_BRANCH)
.withProject(branch.getProject())
.with("branch", branch.getName())
.with("branch_id", branch.getId().toString())
.get();
}
内容来源于网络,如有侵权,请联系作者删除!