code
stringlengths
23
201k
docstring
stringlengths
17
96.2k
func_name
stringlengths
0
235
language
stringclasses
1 value
repo
stringlengths
8
72
path
stringlengths
11
317
url
stringlengths
57
377
license
stringclasses
7 values
private String argsAsString(final String delimiter) { StringBuilder args = new StringBuilder(); for (int i = 0; i < argList.size(); ) { args.append(argList.get(i).getValue()); if (++i < argList.size()) { args.append(delimiter); } } retu...
This was copied from the ExecBuilder class in ccmain. Look for references there.
argsAsString
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/ExecTask.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/ExecTask.java
Apache-2.0
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ExecTask execTask = (ExecTask) o; if (!Objects.equals(timeout, execTask.timeout)) { return ...
This was copied from the ExecBuilder class in ccmain. Look for references there.
equals
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/ExecTask.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/ExecTask.java
Apache-2.0
@Override public int hashCode() { int result; result = command.hashCode(); result = 31 * result + (args != null ? args.hashCode() : 0); result = 31 * result + (workingDirectory != null ? workingDirectory.hashCode() : 0); result = 31 * result + (int) (timeout ^ (timeout >>> 32...
This was copied from the ExecBuilder class in ccmain. Look for references there.
hashCode
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/ExecTask.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/ExecTask.java
Apache-2.0
public void setTimeout(long timeout) { this.timeout = timeout; }
This was copied from the ExecBuilder class in ccmain. Look for references there.
setTimeout
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/ExecTask.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/ExecTask.java
Apache-2.0
public long getTimeout() { return timeout; }
This was copied from the ExecBuilder class in ccmain. Look for references there.
getTimeout
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/ExecTask.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/ExecTask.java
Apache-2.0
public Arguments getArgList() { return argList; }
This was copied from the ExecBuilder class in ccmain. Look for references there.
getArgList
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/ExecTask.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/ExecTask.java
Apache-2.0
public String getArgListString() { return argsAsString("\n"); }
This was copied from the ExecBuilder class in ccmain. Look for references there.
getArgListString
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/ExecTask.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/ExecTask.java
Apache-2.0
private boolean usingBothArgsAndArgList() { return args.isEmpty() || argList.isEmpty(); }
This was copied from the ExecBuilder class in ccmain. Look for references there.
usingBothArgsAndArgList
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/ExecTask.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/ExecTask.java
Apache-2.0
@Override public String command() { return command; }
This was copied from the ExecBuilder class in ccmain. Look for references there.
command
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/ExecTask.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/ExecTask.java
Apache-2.0
public String getCommand() { return command(); }
This was copied from the ExecBuilder class in ccmain. Look for references there.
getCommand
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/ExecTask.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/ExecTask.java
Apache-2.0
public void setCommand(String command) { this.command = command; }
This was copied from the ExecBuilder class in ccmain. Look for references there.
setCommand
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/ExecTask.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/ExecTask.java
Apache-2.0
public String getArgs() { return args; }
This was copied from the ExecBuilder class in ccmain. Look for references there.
getArgs
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/ExecTask.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/ExecTask.java
Apache-2.0
@Override public String workingDirectory() { return workingDirectory; }
This was copied from the ExecBuilder class in ccmain. Look for references there.
workingDirectory
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/ExecTask.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/ExecTask.java
Apache-2.0
@Override public String toString() { return "ExecTask{" + "command='" + command + '\'' + ", args='" + args + '\'' + ", workingDir='" + workingDirectory + '\'' + ", timeout=" + timeout + ", argList=" + argList + '...
This was copied from the ExecBuilder class in ccmain. Look for references there.
toString
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/ExecTask.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/ExecTask.java
Apache-2.0
@Override public String arguments() { if (!args.isEmpty()) { return args; } return argsAsString(" "); }
This was copied from the ExecBuilder class in ccmain. Look for references there.
arguments
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/ExecTask.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/ExecTask.java
Apache-2.0
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } WalkedObject that = (WalkedObject) o; return !(obj != null ? obj !=...
Understands visits all the nodes in the cruise config once using Java reflection
equals
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/GoConfigGraphWalker.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/GoConfigGraphWalker.java
Apache-2.0
@Override public int hashCode() { return obj != null ? obj.hashCode() : 0; }
Understands visits all the nodes in the cruise config once using Java reflection
hashCode
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/GoConfigGraphWalker.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/GoConfigGraphWalker.java
Apache-2.0
public boolean shouldWalk() { return obj != null && obj.getClass().getName().startsWith("com.thoughtworks"); }
Understands visits all the nodes in the cruise config once using Java reflection
shouldWalk
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/GoConfigGraphWalker.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/GoConfigGraphWalker.java
Apache-2.0
public void walk(Handler handler) { walkSubtree(this.rootValidatable, new ConfigSaveValidationContext(null), handler); }
Understands visits all the nodes in the cruise config once using Java reflection
walk
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/GoConfigGraphWalker.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/GoConfigGraphWalker.java
Apache-2.0
private void walkSubtree(Object current, ConfigSaveValidationContext context, Handler handler) { WalkedObject walkedObject = new WalkedObject(current); if (!walkedObject.shouldWalk()) { return; } if (canAssignToValidatableCache.valuesFor(new AbstractMap.SimpleEntry<>(Validata...
Understands visits all the nodes in the cruise config once using Java reflection
walkSubtree
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/GoConfigGraphWalker.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/GoConfigGraphWalker.java
Apache-2.0
private void walkFields(Object current, ConfigSaveValidationContext ctx, Handler handler) { for (Field field : getAllFields(current.getClass())) { field.setAccessible(true); try { Object o = field.get(current); if (o == null || isAConstantField(field) || f...
Understands visits all the nodes in the cruise config once using Java reflection
walkFields
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/GoConfigGraphWalker.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/GoConfigGraphWalker.java
Apache-2.0
private List<Field> getAllFields(Class<?> klass) {//TODO: if not com.thoughtworks.go don't bother return new ArrayList<>(fieldCache.valuesFor(klass)); }
Understands visits all the nodes in the cruise config once using Java reflection
getAllFields
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/GoConfigGraphWalker.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/GoConfigGraphWalker.java
Apache-2.0
private boolean isAConstantField(Field field) { int modifiers = field.getModifiers(); //MCCXL cannot assign value to final fields as it always uses the default constructor. Hence this assumption is OK return Modifier.isStatic(modifiers) || Modifier.isFinal(modifiers); }
Understands visits all the nodes in the cruise config once using Java reflection
isAConstantField
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/GoConfigGraphWalker.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/GoConfigGraphWalker.java
Apache-2.0
private void walkCollection(Object current, ConfigSaveValidationContext ctx, Handler handler) { // We can only expect java to honor the contract of data structure interfaces(read: List), // and not depend on how they choose to implement it, so we short-circuit at a level that we know will continue to wo...
Understands visits all the nodes in the cruise config once using Java reflection
walkCollection
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/GoConfigGraphWalker.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/GoConfigGraphWalker.java
Apache-2.0
@Override public String toString() { return format("PipelineConfig: %s", name); }
Understands how a cruise pipeline is configured by the user
toString
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public boolean validateTree(PipelineConfigSaveValidationContext validationContext) { return new PipelineConfigTreeValidator(this).validate(validationContext); }
Understands how a cruise pipeline is configured by the user
validateTree
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public void encryptSecureProperties(CruiseConfig preprocessedConfig, PipelineConfig preprocessedPipelineConfig) { if (hasTemplate() || doesNotHavePublishAndFetchExternalConfig()) { return; } for (StageConfig stageConfig : getStages()) { stageConfig.encryptSecureProperties...
Understands how a cruise pipeline is configured by the user
encryptSecureProperties
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
private boolean doesNotHavePublishAndFetchExternalConfig() { if (externalArtifactConfigs == null || fetchExternalArtifactTasks == null) { cachePublishAndFetchExternalConfig(); } return externalArtifactConfigs.isEmpty() && fetchExternalArtifactTasks.isEmpty(); }
Understands how a cruise pipeline is configured by the user
doesNotHavePublishAndFetchExternalConfig
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
private void cachePublishAndFetchExternalConfig() { externalArtifactConfigs = new CachedPluggableArtifactConfigs(); fetchExternalArtifactTasks = new CachedFetchPluggableArtifactTasks(); for (StageConfig stageConfig : getStages()) { for (JobConfig jobConfig : stageConfig.getJobs()) { ...
Understands how a cruise pipeline is configured by the user
cachePublishAndFetchExternalConfig
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public List<PluggableArtifactConfig> getExternalArtifactConfigs() { if (externalArtifactConfigs == null) { cachePublishAndFetchExternalConfig(); } return externalArtifactConfigs; }
Understands how a cruise pipeline is configured by the user
getExternalArtifactConfigs
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public List<FetchPluggableArtifactTask> getFetchExternalArtifactTasks() { if (fetchExternalArtifactTasks == null) { cachePublishAndFetchExternalConfig(); } return fetchExternalArtifactTasks; }
Understands how a cruise pipeline is configured by the user
getFetchExternalArtifactTasks
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
@Override public void validate(ValidationContext validationContext) { validateLabelTemplate(); validatePipelineName(); validateStageNameUniqueness(); validateLockBehaviorValues(); if (!hasTemplate() && isEmpty()) { addError("pipeline", format("Pipeline '%s' does n...
Understands how a cruise pipeline is configured by the user
validate
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public void validateTemplate(PipelineTemplateConfig templateConfig) { if (hasTemplate()) { if (new NameTypeValidator().isNameInvalid(templateName.toString())) { errors().add(TEMPLATE_NAME, NameTypeValidator.errorMessage("template", templateName)); } if (hasSta...
Understands how a cruise pipeline is configured by the user
validateTemplate
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
private void validatePipelineName() { if (!new NameTypeValidator().isNameValid(name)) { errors().add(NAME, NameTypeValidator.errorMessage("pipeline", name)); } }
Understands how a cruise pipeline is configured by the user
validatePipelineName
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
private void validateStageNameUniqueness() { Map<String, StageConfig> stageNameMap = new HashMap<>(); for (StageConfig stageConfig : this) { stageConfig.validateNameUniqueness(stageNameMap); } }
Understands how a cruise pipeline is configured by the user
validateStageNameUniqueness
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
private void validateLabelTemplate() { if (StringUtils.isBlank(labelTemplate)) { addError("labelTemplate", BLANK_LABEL_TEMPLATE_ERROR_MESSAGE); return; } String[] allTokens = substringsBetween(labelTemplate, "${", "}"); if (allTokens == null) { addEr...
Understands how a cruise pipeline is configured by the user
validateLabelTemplate
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
private boolean isValidToken(String token) { if (StringUtils.isBlank(token)) { addError("labelTemplate", "Label template variable cannot be blank."); return false; } if (token.equalsIgnoreCase(COUNT)) { return true; } if (token.equalsIgnoreCa...
Understands how a cruise pipeline is configured by the user
isValidToken
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
private void validateLockBehaviorValues() { if (lockBehavior != null && !VALID_LOCK_VALUES.contains(lockBehavior)) { addError(LOCK_BEHAVIOR, MessageFormat.format("Lock behavior has an invalid value ({0}). Valid values are: {1}", lockBehavior, VALID_LOCK_VALUES)); } }
Understands how a cruise pipeline is configured by the user
validateLockBehaviorValues
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
private boolean hasStages() { return !isEmpty(); }
Understands how a cruise pipeline is configured by the user
hasStages
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
@Override public void addError(String fieldName, String msg) { errors.add(fieldName, msg); }
Understands how a cruise pipeline is configured by the user
addError
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
@Override public ConfigErrors errors() { return errors; }
Understands how a cruise pipeline is configured by the user
errors
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public List<ConfigErrors> getAllErrors() { return ErrorCollector.getAllErrors(this); }
Understands how a cruise pipeline is configured by the user
getAllErrors
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public PipelineConfig getStages() { return this; }
Understands how a cruise pipeline is configured by the user
getStages
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public StageConfig getStage(final CaseInsensitiveString stageName) { return findBy(stageName); }
Understands how a cruise pipeline is configured by the user
getStage
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public StageConfig getStage(String stageName) { return getStage(new CaseInsensitiveString(stageName)); }
Understands how a cruise pipeline is configured by the user
getStage
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public StageConfig findBy(final CaseInsensitiveString stageName) { for (StageConfig stageConfig : this) { if (stageConfig.name().equals(stageName)) { return stageConfig; } } return null; }
Understands how a cruise pipeline is configured by the user
findBy
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public StageConfig nextStage(final CaseInsensitiveString lastStageName) { for (int i = 0; i < this.size(); i++) { StageConfig stageConfig = this.get(i); boolean hasNextStage = i + 1 < this.size(); if (hasNextStage && stageConfig.name().equals(lastStageName)) { ...
Understands how a cruise pipeline is configured by the user
nextStage
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public StageConfig getFirstStageConfig() { return this.first(); }
Understands how a cruise pipeline is configured by the user
getFirstStageConfig
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
@Override public StageConfig set(int index, StageConfig stageConfig) { verifyUniqueName(stageConfig, index); return super.set(index, stageConfig); }
Understands how a cruise pipeline is configured by the user
set
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
@Override public boolean add(StageConfig stageConfig) { ensureNoTemplateDefined(stageConfig.name()); verifyUniqueName(stageConfig); return addStageWithoutValidityAssertion(stageConfig); }
Understands how a cruise pipeline is configured by the user
add
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public boolean addStageWithoutValidityAssertion(StageConfig stageConfig) { return super.add(stageConfig); }
Understands how a cruise pipeline is configured by the user
addStageWithoutValidityAssertion
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
private void verifyUniqueName(StageConfig stageConfig) { if (alreadyContains(stageConfig)) { throw bomb("You have defined multiple stages called '" + stageConfig.name() + "'. Stage names are case-insensitive and must be unique."); } }
Understands how a cruise pipeline is configured by the user
verifyUniqueName
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
private void verifyUniqueName(StageConfig stageConfig, int index) { if (stageConfig.name().equals(super.get(index).name())) { return; } verifyUniqueName(stageConfig); }
Understands how a cruise pipeline is configured by the user
verifyUniqueName
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
private boolean alreadyContains(StageConfig stageConfig) { return findBy(stageConfig.name()) != null; }
Understands how a cruise pipeline is configured by the user
alreadyContains
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
@Override public CaseInsensitiveString name() { return name; }
Understands how a cruise pipeline is configured by the user
name
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public CaseInsensitiveString getName() { return name; }
Understands how a cruise pipeline is configured by the user
getName
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public StageConfig previousStage(final CaseInsensitiveString stageName) { StageConfig lastStageConfig = null; for (StageConfig currentStageConfig : this) { if (currentStageConfig.name().equals(stageName)) { return lastStageConfig; } lastStageConfig = c...
Understands how a cruise pipeline is configured by the user
previousStage
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public boolean isConfigOriginSameAsOneOfMaterials() { if (!(isConfigDefinedRemotely())) return false; RepoConfigOrigin repoConfigOrigin = (RepoConfigOrigin) this.origin; MaterialConfig configMaterial = repoConfigOrigin.getMaterial(); for (MaterialConfig material : this.mate...
Understands how a cruise pipeline is configured by the user
isConfigOriginSameAsOneOfMaterials
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public boolean isConfigDefinedRemotely() { return this.origin instanceof RepoConfigOrigin; }
Understands how a cruise pipeline is configured by the user
isConfigDefinedRemotely
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public boolean hasSameConfigOrigin(PipelineConfig other) { if (!(isConfigDefinedRemotely())) return false; return this.origin.equals(other.getOrigin()); }
Understands how a cruise pipeline is configured by the user
hasSameConfigOrigin
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public boolean isConfigOriginFromRevision(String revision) { if (!(isConfigDefinedRemotely())) return false; RepoConfigOrigin repoConfigOrigin = (RepoConfigOrigin) this.origin; return repoConfigOrigin.isFromRevision(revision); }
Understands how a cruise pipeline is configured by the user
isConfigOriginFromRevision
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public MaterialConfigs materialConfigs() { return materialConfigs; }
Understands how a cruise pipeline is configured by the user
materialConfigs
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public void setMaterialConfigs(MaterialConfigs newMaterialConfigs) { this.materialConfigs = newMaterialConfigs; if (newMaterialConfigs == null || newMaterialConfigs.isEmpty()) { this.materialConfigs = new MaterialConfigs(); } }
Understands how a cruise pipeline is configured by the user
setMaterialConfigs
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public Node getDependenciesAsNode() { List<Node.DependencyNode> pipelineDeps = new ArrayList<>(); for (MaterialConfig material : materialConfigs) { if (material instanceof DependencyMaterialConfig dependencyMaterialConfig) { pipelineDeps.add(new Node.DependencyNode(dependency...
Understands how a cruise pipeline is configured by the user
getDependenciesAsNode
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public String getLabelTemplate() { return labelTemplate; }
Understands how a cruise pipeline is configured by the user
getLabelTemplate
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public void setLabelTemplate(String labelFormat) { this.labelTemplate = labelFormat; }
Understands how a cruise pipeline is configured by the user
setLabelTemplate
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public boolean hasNextStage(final CaseInsensitiveString lastStageName) { if (this.isEmpty()) { return false; } return nextStage(lastStageName) != null; }
Understands how a cruise pipeline is configured by the user
hasNextStage
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public TrackingTool getTrackingTool() { return trackingTool; }
Understands how a cruise pipeline is configured by the user
getTrackingTool
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public TrackingTool trackingTool() { return trackingTool == null ? new TrackingTool() : trackingTool; }
Understands how a cruise pipeline is configured by the user
trackingTool
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public void setTrackingTool(TrackingTool trackingTool) { this.trackingTool = trackingTool; }
Understands how a cruise pipeline is configured by the user
setTrackingTool
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public PipelineConfig duplicate() { PipelineConfig clone = CLONER.deepClone(this); clone.name = new CaseInsensitiveString(""); clearSelfPipelineNameInFetchTask(clone); return clone; }
Understands how a cruise pipeline is configured by the user
duplicate
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
private void clearSelfPipelineNameInFetchTask(PipelineConfig clone) { for (StageConfig stage : clone) { for (JobConfig job : stage.getJobs()) { for (Task task : job.getTasks()) { if (task instanceof FetchTask fetchTask) { if (this.name().eq...
Understands how a cruise pipeline is configured by the user
clearSelfPipelineNameInFetchTask
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public boolean isFirstStageManualApproval() { if (isEmpty()) { throw new IllegalStateException(format("Pipeline [%s] doesn't have any stage", name)); } return getFirstStageConfig().getApproval().isManual(); }
Understands how a cruise pipeline is configured by the user
isFirstStageManualApproval
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; if (!super.equals(o)) return false; PipelineConfig that = (PipelineConfig) o; return Objects.equals(name, that.name) && Objects.e...
Understands how a cruise pipeline is configured by the user
equals
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
@Override public int hashCode() { int result = super.hashCode(); result = 31 * result + name.hashCode(); result = 31 * result + (labelTemplate != null ? labelTemplate.hashCode() : 0); result = 31 * result + (trackingTool != null ? trackingTool.hashCode() : 0); result = 31 * r...
Understands how a cruise pipeline is configured by the user
hashCode
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public TimerConfig getTimer() { return timer; }
Understands how a cruise pipeline is configured by the user
getTimer
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public void setTimer(TimerConfig timer) { this.timer = timer; }
Understands how a cruise pipeline is configured by the user
setTimer
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public boolean requiresApproval() { if (isEmpty()) { return false; } return first().requiresApproval(); }
Understands how a cruise pipeline is configured by the user
requiresApproval
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public void lockExplicitly() { this.lockBehavior = LOCK_VALUE_LOCK_ON_FAILURE; }
Understands how a cruise pipeline is configured by the user
lockExplicitly
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public void unlockExplicitly() { lockBehavior = LOCK_VALUE_NONE; }
Understands how a cruise pipeline is configured by the user
unlockExplicitly
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public boolean hasExplicitLock() { return lockBehavior != null; }
Understands how a cruise pipeline is configured by the user
hasExplicitLock
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public Boolean explicitLock() { if (!hasExplicitLock()) { throw new RuntimeException(format("There is no explicit lock on the pipeline '%s'.", name)); } return isLockable(); }
Understands how a cruise pipeline is configured by the user
explicitLock
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public boolean isLockable() { return isLockableOnFailure() || isPipelineUnlockableWhenFinished(); }
Understands how a cruise pipeline is configured by the user
isLockable
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public boolean isLockableOnFailure() { return LOCK_VALUE_LOCK_ON_FAILURE.equals(lockBehavior); }
Understands how a cruise pipeline is configured by the user
isLockableOnFailure
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public boolean isPipelineUnlockableWhenFinished() { return LOCK_VALUE_UNLOCK_WHEN_FINISHED.equals(lockBehavior); }
Understands how a cruise pipeline is configured by the user
isPipelineUnlockableWhenFinished
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public String getLockBehavior() { return lockBehavior == null ? LOCK_VALUE_NONE : lockBehavior; }
Understands how a cruise pipeline is configured by the user
getLockBehavior
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public void setLockBehaviorIfNecessary(String newLockBehavior) { boolean oldBehaviorWasEmpty = !hasExplicitLock(); boolean newBehaviorIsNone = LOCK_VALUE_NONE.equals(newLockBehavior); boolean doNotSet = oldBehaviorWasEmpty && newBehaviorIsNone; if (!doNotSet) { lockBehavior =...
Understands how a cruise pipeline is configured by the user
setLockBehaviorIfNecessary
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public void setVariables(EnvironmentVariablesConfig variables) { this.variables = variables; }
Understands how a cruise pipeline is configured by the user
setVariables
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public EnvironmentVariablesConfig getVariables() { return variables; }
Understands how a cruise pipeline is configured by the user
getVariables
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public EnvironmentVariablesConfig getPlainTextVariables() { return variables.getPlainTextVariables(); }
Understands how a cruise pipeline is configured by the user
getPlainTextVariables
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public EnvironmentVariablesConfig getSecureVariables() { return variables.getSecureVariables(); }
Understands how a cruise pipeline is configured by the user
getSecureVariables
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public void addEnvironmentVariable(String name, String value) { variables.add(new EnvironmentVariableConfig(name.trim(), value)); }
Understands how a cruise pipeline is configured by the user
addEnvironmentVariable
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public boolean hasTemplate() { return templateName != null && !StringUtils.isBlank(templateName.toString()); }
Understands how a cruise pipeline is configured by the user
hasTemplate
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public CaseInsensitiveString getTemplateName() { return templateName; }
Understands how a cruise pipeline is configured by the user
getTemplateName
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public void usingTemplate(PipelineTemplateConfig pipelineTemplate) { this.addAll(CLONER.deepClone(pipelineTemplate)); this.templateApplied = true; }
Understands how a cruise pipeline is configured by the user
usingTemplate
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
private void ensureNoTemplateDefined(CaseInsensitiveString stageName) { if (hasTemplate()) { throw new IllegalStateException(format("Cannot add stage '%s' to pipeline '%s', which already references template '%s'.", stageName, name, templateName)); } }
Understands how a cruise pipeline is configured by the user
ensureNoTemplateDefined
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public boolean hasTemplateApplied() { return templateApplied; }
Understands how a cruise pipeline is configured by the user
hasTemplateApplied
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public void setTemplateName(CaseInsensitiveString templateName) { ensureNoStagesDefined(templateName); this.templateName = templateName; }
Understands how a cruise pipeline is configured by the user
setTemplateName
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public void setTemplateName(String templateName) { setTemplateName(new CaseInsensitiveString(templateName)); }
Understands how a cruise pipeline is configured by the user
setTemplateName
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
private void ensureNoStagesDefined(CaseInsensitiveString newTemplateName) { bombIf(!isEmpty(), () -> format("Cannot set template '%s' on pipeline '%s' because it already has stages defined", newTemplateName, name)); }
Understands how a cruise pipeline is configured by the user
ensureNoStagesDefined
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0