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
@Override public void addError(String fieldName, String message) { errors.add(fieldName, message); }
A config fragment that can be conceptually thought of as an external snippet of cruise-config.xml that can be merged into the main cruise-config.xml configuration. <p> More accurately, this is essentially a subtree of configuration domain objects, and not actual XML. A {@link PartialConfig} is typically the parsed and ...
addError
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/remote/PartialConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/remote/PartialConfig.java
Apache-2.0
@Override public ConfigOrigin getOrigin() { return origin; }
A config fragment that can be conceptually thought of as an external snippet of cruise-config.xml that can be merged into the main cruise-config.xml configuration. <p> More accurately, this is essentially a subtree of configuration domain objects, and not actual XML. A {@link PartialConfig} is typically the parsed and ...
getOrigin
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/remote/PartialConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/remote/PartialConfig.java
Apache-2.0
public void setOrigin(ConfigOrigin origin) { this.origin = origin; }
A config fragment that can be conceptually thought of as an external snippet of cruise-config.xml that can be merged into the main cruise-config.xml configuration. <p> More accurately, this is essentially a subtree of configuration domain objects, and not actual XML. A {@link PartialConfig} is typically the parsed and ...
setOrigin
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/remote/PartialConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/remote/PartialConfig.java
Apache-2.0
@Override public void setOrigins(ConfigOrigin origins) { this.origin = origins; for (EnvironmentConfig env : this.environments) { env.setOrigins(origins); } for (PipelineConfigs pipes : this.pipelines) { pipes.setOrigins(origins); } for (SCM sc...
A config fragment that can be conceptually thought of as an external snippet of cruise-config.xml that can be merged into the main cruise-config.xml configuration. <p> More accurately, this is essentially a subtree of configuration domain objects, and not actual XML. A {@link PartialConfig} is typically the parsed and ...
setOrigins
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/remote/PartialConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/remote/PartialConfig.java
Apache-2.0
public EnvironmentsConfig getEnvironments() { return environments; }
A config fragment that can be conceptually thought of as an external snippet of cruise-config.xml that can be merged into the main cruise-config.xml configuration. <p> More accurately, this is essentially a subtree of configuration domain objects, and not actual XML. A {@link PartialConfig} is typically the parsed and ...
getEnvironments
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/remote/PartialConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/remote/PartialConfig.java
Apache-2.0
public void setEnvironments(EnvironmentsConfig environments) { this.environments = environments; }
A config fragment that can be conceptually thought of as an external snippet of cruise-config.xml that can be merged into the main cruise-config.xml configuration. <p> More accurately, this is essentially a subtree of configuration domain objects, and not actual XML. A {@link PartialConfig} is typically the parsed and ...
setEnvironments
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/remote/PartialConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/remote/PartialConfig.java
Apache-2.0
public PipelineGroups getGroups() { return pipelines; }
A config fragment that can be conceptually thought of as an external snippet of cruise-config.xml that can be merged into the main cruise-config.xml configuration. <p> More accurately, this is essentially a subtree of configuration domain objects, and not actual XML. A {@link PartialConfig} is typically the parsed and ...
getGroups
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/remote/PartialConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/remote/PartialConfig.java
Apache-2.0
public void setPipelines(PipelineGroups pipelines) { this.pipelines = pipelines; }
A config fragment that can be conceptually thought of as an external snippet of cruise-config.xml that can be merged into the main cruise-config.xml configuration. <p> More accurately, this is essentially a subtree of configuration domain objects, and not actual XML. A {@link PartialConfig} is typically the parsed and ...
setPipelines
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/remote/PartialConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/remote/PartialConfig.java
Apache-2.0
public SCMs getScms() { return scms; }
A config fragment that can be conceptually thought of as an external snippet of cruise-config.xml that can be merged into the main cruise-config.xml configuration. <p> More accurately, this is essentially a subtree of configuration domain objects, and not actual XML. A {@link PartialConfig} is typically the parsed and ...
getScms
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/remote/PartialConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/remote/PartialConfig.java
Apache-2.0
public void setScms(SCMs scms) { this.scms = scms; }
A config fragment that can be conceptually thought of as an external snippet of cruise-config.xml that can be merged into the main cruise-config.xml configuration. <p> More accurately, this is essentially a subtree of configuration domain objects, and not actual XML. A {@link PartialConfig} is typically the parsed and ...
setScms
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/remote/PartialConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/remote/PartialConfig.java
Apache-2.0
private boolean upstreamPipelineNotDefinedInPartial(DependencyMaterialConfig dependency) { return getGroups().stream().allMatch(group -> group.findBy(dependency.getPipelineName()) == null); }
A config fragment that can be conceptually thought of as an external snippet of cruise-config.xml that can be merged into the main cruise-config.xml configuration. <p> More accurately, this is essentially a subtree of configuration domain objects, and not actual XML. A {@link PartialConfig} is typically the parsed and ...
upstreamPipelineNotDefinedInPartial
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/remote/PartialConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/remote/PartialConfig.java
Apache-2.0
private void addViolationOnForbiddenPipelineGroup(PipelineConfigs forbidden) { forbidden.addError(PIPELINE_GROUP.getType(), PipelineGroup.notAllowedToRefer(forbidden.getGroup())); }
A config fragment that can be conceptually thought of as an external snippet of cruise-config.xml that can be merged into the main cruise-config.xml configuration. <p> More accurately, this is essentially a subtree of configuration domain objects, and not actual XML. A {@link PartialConfig} is typically the parsed and ...
addViolationOnForbiddenPipelineGroup
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/remote/PartialConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/remote/PartialConfig.java
Apache-2.0
private void addViolationOnForbiddenPipeline(DependencyMaterialConfig forbidden) { forbidden.addError(PIPELINE.getType(), Pipeline.notAllowedToRefer(forbidden.getPipelineName())); }
A config fragment that can be conceptually thought of as an external snippet of cruise-config.xml that can be merged into the main cruise-config.xml configuration. <p> More accurately, this is essentially a subtree of configuration domain objects, and not actual XML. A {@link PartialConfig} is typically the parsed and ...
addViolationOnForbiddenPipeline
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/remote/PartialConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/remote/PartialConfig.java
Apache-2.0
private void addViolationOnForbiddenEnvironment(EnvironmentConfig forbidden) { forbidden.addError(ENVIRONMENT.getType(), Environment.notAllowedToRefer(forbidden.name())); }
A config fragment that can be conceptually thought of as an external snippet of cruise-config.xml that can be merged into the main cruise-config.xml configuration. <p> More accurately, this is essentially a subtree of configuration domain objects, and not actual XML. A {@link PartialConfig} is typically the parsed and ...
addViolationOnForbiddenEnvironment
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/remote/PartialConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/remote/PartialConfig.java
Apache-2.0
private ConfigRepoConfig configRepoConfig() { final ConfigOrigin origin = getOrigin(); if (origin instanceof RepoConfigOrigin) { return ((RepoConfigOrigin) origin).getConfigRepo(); } else { return null; } }
A config fragment that can be conceptually thought of as an external snippet of cruise-config.xml that can be merged into the main cruise-config.xml configuration. <p> More accurately, this is essentially a subtree of configuration domain objects, and not actual XML. A {@link PartialConfig} is typically the parsed and ...
configRepoConfig
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/remote/PartialConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/remote/PartialConfig.java
Apache-2.0
@Override public String toString() { return displayName(); }
Understands that configuration is defined in versioned source code repository at particular revision.
toString
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/remote/RepoConfigOrigin.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/remote/RepoConfigOrigin.java
Apache-2.0
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; RepoConfigOrigin that = (RepoConfigOrigin) o; return Objects.equals(configRepo, that.configRepo) && Objects.equals(revision, that.revision); ...
Understands that configuration is defined in versioned source code repository at particular revision.
equals
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/remote/RepoConfigOrigin.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/remote/RepoConfigOrigin.java
Apache-2.0
@Override public int hashCode() { return Objects.hash(configRepo, revision); }
Understands that configuration is defined in versioned source code repository at particular revision.
hashCode
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/remote/RepoConfigOrigin.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/remote/RepoConfigOrigin.java
Apache-2.0
@Override public boolean canEdit() { // if there will be implementation to edit repository then this // class should participate in providing info on how to do that return false; }
Understands that configuration is defined in versioned source code repository at particular revision.
canEdit
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/remote/RepoConfigOrigin.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/remote/RepoConfigOrigin.java
Apache-2.0
@Override public boolean isLocal() { return false; }
Understands that configuration is defined in versioned source code repository at particular revision.
isLocal
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/remote/RepoConfigOrigin.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/remote/RepoConfigOrigin.java
Apache-2.0
@Override public String displayName() { MaterialConfig materialConfig = configRepo != null ? configRepo.getRepo() : null; String materialName = materialConfig != null ? materialConfig.getDisplayName() : "NULL material"; return String.format("%s at revision %s", materi...
Understands that configuration is defined in versioned source code repository at particular revision.
displayName
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/remote/RepoConfigOrigin.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/remote/RepoConfigOrigin.java
Apache-2.0
public MaterialConfig getMaterial() { return configRepo == null ? null : configRepo.getRepo(); }
Understands that configuration is defined in versioned source code repository at particular revision.
getMaterial
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/remote/RepoConfigOrigin.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/remote/RepoConfigOrigin.java
Apache-2.0
public boolean isFromRevision(String revision) { return this.revision.equals(revision); }
Understands that configuration is defined in versioned source code repository at particular revision.
isFromRevision
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/remote/RepoConfigOrigin.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/remote/RepoConfigOrigin.java
Apache-2.0
public void setConfigRepo(ConfigRepoConfig configRepo) { this.configRepo = configRepo; }
Understands that configuration is defined in versioned source code repository at particular revision.
setConfigRepo
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/remote/RepoConfigOrigin.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/remote/RepoConfigOrigin.java
Apache-2.0
public ConfigRepoConfig getConfigRepo() { return configRepo; }
Understands that configuration is defined in versioned source code repository at particular revision.
getConfigRepo
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/remote/RepoConfigOrigin.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/remote/RepoConfigOrigin.java
Apache-2.0
public String getRevision() { return revision; }
Understands that configuration is defined in versioned source code repository at particular revision.
getRevision
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/remote/RepoConfigOrigin.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/remote/RepoConfigOrigin.java
Apache-2.0
@Override public void validate(CruiseConfig cruiseConfig) { String newServerId = cruiseConfig.server().getServerId(); if (initialIdHolder.compareAndSet(null, newServerId)) { return; } String initialId = initialIdHolder.get(); if (!Objects.equals(initialId, newSer...
Understands: ensures serverId is never changed
validate
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/validation/ServerIdImmutabilityValidator.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/validation/ServerIdImmutabilityValidator.java
Apache-2.0
public String getInitialServerId() { return initialIdHolder.get(); }
Understands: ensures serverId is never changed
getInitialServerId
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/validation/ServerIdImmutabilityValidator.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/validation/ServerIdImmutabilityValidator.java
Apache-2.0
@Override public void validate(CruiseConfig cruiseConfig) { String newTokenGenerationKey = cruiseConfig.server().getTokenGenerationKey(); if (initialKeyHolder.compareAndSet(null, newTokenGenerationKey)) { return; } String initialKey = initialKeyHolder.get(); if (...
Understands: ensures tokenGenerationKey is never changed
validate
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/validation/TokenGenerationKeyImmutabilityValidator.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/validation/TokenGenerationKeyImmutabilityValidator.java
Apache-2.0
protected String getInitialTokenGenerationKey() { return initialKeyHolder.get(); }
Understands: ensures tokenGenerationKey is never changed
getInitialTokenGenerationKey
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/validation/TokenGenerationKeyImmutabilityValidator.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/validation/TokenGenerationKeyImmutabilityValidator.java
Apache-2.0
public String on(String fieldName) { return getFirstOn(fieldName); }
This is for Rails form helpers
on
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/domain/ConfigErrors.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/domain/ConfigErrors.java
Apache-2.0
private String getFirstOn(String fieldName) { List<String> errors = get(fieldName); if (errors != null && !errors.isEmpty()) { return errors.get(0); } return null; }
This is for Rails form helpers
getFirstOn
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/domain/ConfigErrors.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/domain/ConfigErrors.java
Apache-2.0
public String firstError() { for (Map.Entry<String, List<String>> fieldToErrors : entrySet()) { return getFirstOn(fieldToErrors.getKey()); } return null; }
This is for Rails form helpers
firstError
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/domain/ConfigErrors.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/domain/ConfigErrors.java
Apache-2.0
public void addAll(ConfigErrors configErrors) { for (String fieldName : configErrors.keySet()) { for (String value : configErrors.get(fieldName)) { this.add(fieldName, value); } } }
This is for Rails form helpers
addAll
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/domain/ConfigErrors.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/domain/ConfigErrors.java
Apache-2.0
public String asString() { return StringUtils.join(this.getAll(), ", "); }
This is for Rails form helpers
asString
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/domain/ConfigErrors.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/domain/ConfigErrors.java
Apache-2.0
@Override public boolean equals(Object that) { if (this == that) { return true; } if (that == null) { return false; } if (getClass() != that.getClass()) { return false; } return equals((EnvironmentPipelineMatcher) that); }
Understands how to reference an logical grouping of machines
equals
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/domain/EnvironmentPipelineMatcher.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/domain/EnvironmentPipelineMatcher.java
Apache-2.0
private boolean equals(EnvironmentPipelineMatcher that) { if (!name.equals(that.name)) { return false; } return true; }
Understands how to reference an logical grouping of machines
equals
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/domain/EnvironmentPipelineMatcher.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/domain/EnvironmentPipelineMatcher.java
Apache-2.0
@Override public int hashCode() { return name.hashCode(); }
Understands how to reference an logical grouping of machines
hashCode
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/domain/EnvironmentPipelineMatcher.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/domain/EnvironmentPipelineMatcher.java
Apache-2.0
public boolean match(String pipelineName, String uuid) { return hasPipeline(pipelineName) && hasAgent(uuid); }
Understands how to reference an logical grouping of machines
match
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/domain/EnvironmentPipelineMatcher.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/domain/EnvironmentPipelineMatcher.java
Apache-2.0
boolean hasAgent(String uuid) { return agentUuids.contains(uuid); }
Understands how to reference an logical grouping of machines
hasAgent
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/domain/EnvironmentPipelineMatcher.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/domain/EnvironmentPipelineMatcher.java
Apache-2.0
public boolean hasPipeline(String pipelineName) { return pipelineConfigs.containsPipelineNamed(new CaseInsensitiveString(pipelineName)); }
Understands how to reference an logical grouping of machines
hasPipeline
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/domain/EnvironmentPipelineMatcher.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/domain/EnvironmentPipelineMatcher.java
Apache-2.0
public CaseInsensitiveString name() { return name; }
Understands how to reference an logical grouping of machines
name
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/domain/EnvironmentPipelineMatcher.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/domain/EnvironmentPipelineMatcher.java
Apache-2.0
public boolean match(String pipelineName, String uuid) { for(EnvironmentPipelineMatcher matcher : this) { if (matcher.match(pipelineName, uuid)) { return true; } } return !pipelineReferenced(pipelineName) && !agentReferenced(uuid); }
Understands matching job with agents in situations where either, both or none are in environment
match
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/domain/EnvironmentPipelineMatchers.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/domain/EnvironmentPipelineMatchers.java
Apache-2.0
private boolean agentReferenced(String uuid) { for(EnvironmentPipelineMatcher matcher : this) { if (matcher.hasAgent(uuid)) { return true; } } return false; }
Understands matching job with agents in situations where either, both or none are in environment
agentReferenced
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/domain/EnvironmentPipelineMatchers.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/domain/EnvironmentPipelineMatchers.java
Apache-2.0
private boolean pipelineReferenced(String pipelineName) { for(EnvironmentPipelineMatcher matcher : this) { if (matcher.hasPipeline(pipelineName)) { return true; } } return false; }
Understands matching job with agents in situations where either, both or none are in environment
pipelineReferenced
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/domain/EnvironmentPipelineMatchers.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/domain/EnvironmentPipelineMatchers.java
Apache-2.0
public static IpAddress create(String address) { try { if (StringUtils.isEmpty(address)) { return new NullIpAddress(); } return new IpAddress(InetAddress.getByName(address)); } catch (UnknownHostException e) { throw new RuntimeException("Ip...
Understands the network address for a machine
create
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/domain/IpAddress.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/domain/IpAddress.java
Apache-2.0
@Override public String toString() { return address.getHostAddress(); }
Understands the network address for a machine
toString
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/domain/IpAddress.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/domain/IpAddress.java
Apache-2.0
@Override public int compareTo(IpAddress other) { byte[] myAddressInBytes = address.getAddress(); byte[] otherAddressInBytes = other.address.getAddress(); // general ordering: ipv4 before ipv6 if (myAddressInBytes.length < otherAddressInBytes.length) return -1; if (myAddress...
Understands the network address for a machine
compareTo
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/domain/IpAddress.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/domain/IpAddress.java
Apache-2.0
private int unsignedByteToInt(byte b) { return (int) b & 0xFF; }
Understands the network address for a machine
unsignedByteToInt
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/domain/IpAddress.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/domain/IpAddress.java
Apache-2.0
@Override public String toString() { return ""; }
Understands the network address for a machine
toString
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/domain/IpAddress.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/domain/IpAddress.java
Apache-2.0
@SuppressWarnings("ComparatorMethodParameterNotUsed") @Override public int compareTo(IpAddress other) { return other instanceof NullIpAddress ? 0 : -1; }
Understands the network address for a machine
compareTo
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/domain/IpAddress.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/domain/IpAddress.java
Apache-2.0
@Override public RunIfConfigs getConditions() { return new RunIfConfigs(); }
Understands how to get the builder to kill all child processes of the current process
getConditions
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/domain/KillAllChildProcessTask.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/domain/KillAllChildProcessTask.java
Apache-2.0
@Override public Task cancelTask() { return new NullTask(); }
Understands how to get the builder to kill all child processes of the current process
cancelTask
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/domain/KillAllChildProcessTask.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/domain/KillAllChildProcessTask.java
Apache-2.0
@Override public boolean hasCancelTask() { return false; }
Understands how to get the builder to kill all child processes of the current process
hasCancelTask
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/domain/KillAllChildProcessTask.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/domain/KillAllChildProcessTask.java
Apache-2.0
@Override public String getTaskType() { return "killallchildprocess"; }
Understands how to get the builder to kill all child processes of the current process
getTaskType
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/domain/KillAllChildProcessTask.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/domain/KillAllChildProcessTask.java
Apache-2.0
@Override public String getTypeForDisplay() { return "kill all child process"; }
Understands how to get the builder to kill all child processes of the current process
getTypeForDisplay
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/domain/KillAllChildProcessTask.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/domain/KillAllChildProcessTask.java
Apache-2.0
@Override public List<TaskProperty> getPropertiesForDisplay() { return new ArrayList<>(); }
Understands how to get the builder to kill all child processes of the current process
getPropertiesForDisplay
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/domain/KillAllChildProcessTask.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/domain/KillAllChildProcessTask.java
Apache-2.0
@Override public void setConfigAttributes(Object attributes, TaskFactory taskFactory) { throw new UnsupportedOperationException("Not a configurable task"); }
Understands how to get the builder to kill all child processes of the current process
setConfigAttributes
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/domain/KillAllChildProcessTask.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/domain/KillAllChildProcessTask.java
Apache-2.0
@Override public boolean hasSameTypeAs(Task task) { return this.getTaskType().equals(task.getTaskType()); }
Understands how to get the builder to kill all child processes of the current process
hasSameTypeAs
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/domain/KillAllChildProcessTask.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/domain/KillAllChildProcessTask.java
Apache-2.0
@Override public boolean validateTree(ValidationContext validationContext) { return true; }
Understands how to get the builder to kill all child processes of the current process
validateTree
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/domain/KillAllChildProcessTask.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/domain/KillAllChildProcessTask.java
Apache-2.0
@Override public void setConfigAttributes(Object attributes) { throw new UnsupportedOperationException("Not a configurable task"); }
Understands how to get the builder to kill all child processes of the current process
setConfigAttributes
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/domain/KillAllChildProcessTask.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/domain/KillAllChildProcessTask.java
Apache-2.0
@Override public void validate(ValidationContext validationContext) { }
Understands how to get the builder to kill all child processes of the current process
validate
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/domain/KillAllChildProcessTask.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/domain/KillAllChildProcessTask.java
Apache-2.0
@Override public ConfigErrors errors() { return configErrors; }
Understands how to get the builder to kill all child processes of the current process
errors
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/domain/KillAllChildProcessTask.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/domain/KillAllChildProcessTask.java
Apache-2.0
@Override public void addError(String fieldName, String message) { configErrors.add(fieldName, message); }
Understands how to get the builder to kill all child processes of the current process
addError
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/domain/KillAllChildProcessTask.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/domain/KillAllChildProcessTask.java
Apache-2.0
public Map<String, String> getConfigurationAsMap(boolean addSecureFields, boolean useResolvedValue) { Map<String, String> configurationMap = new LinkedHashMap<>(); for (ConfigurationProperty currentConfiguration : this) { if (addSecureFields || !currentConfiguration.isSecure()) { ...
Returns the configuration values a map of key-value pair @param addSecureFields should add secure fields @param useResolvedValue should try to resolve any secret params found. @throws UnresolvedSecretParamException if useResolvedValue is set to true and the secrets are not resolved @return map of configs
getConfigurationAsMap
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/domain/config/Configuration.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/domain/config/Configuration.java
Apache-2.0
public Map<String, Map<String, Object>> getPropertyMetadataAndValuesAsMap() { Map<String, Map<String, Object>> configMap = new HashMap<>(); for (ConfigurationProperty property : this) { Map<String, Object> mapValue = new HashMap<>(); mapValue.put("isSecure", property.isSecure());...
Returns the configuration values a map of key-value pair @param addSecureFields should add secure fields @param useResolvedValue should try to resolve any secret params found. @throws UnresolvedSecretParamException if useResolvedValue is set to true and the secrets are not resolved @return map of configs
getPropertyMetadataAndValuesAsMap
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/domain/config/Configuration.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/domain/config/Configuration.java
Apache-2.0
public Map<String, Map<String, String>> getConfigWithErrorsAsMap() { Map<String, Map<String, String>> configMap = new HashMap<>(); for (ConfigurationProperty property : this) { Map<String, String> mapValue = new HashMap<>(); if (property.isSecure()) { mapValue.put...
Returns the configuration values a map of key-value pair @param addSecureFields should add secure fields @param useResolvedValue should try to resolve any secret params found. @throws UnresolvedSecretParamException if useResolvedValue is set to true and the secrets are not resolved @return map of configs
getConfigWithErrorsAsMap
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/domain/config/Configuration.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/domain/config/Configuration.java
Apache-2.0
@Override public boolean hasSecretParams() { return this.stream() .anyMatch(ConfigurationProperty::hasSecretParams); }
Returns the configuration values a map of key-value pair @param addSecureFields should add secure fields @param useResolvedValue should try to resolve any secret params found. @throws UnresolvedSecretParamException if useResolvedValue is set to true and the secrets are not resolved @return map of configs
hasSecretParams
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/domain/config/Configuration.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/domain/config/Configuration.java
Apache-2.0
@Override public SecretParams getSecretParams() { return this.stream() .map(ConfigurationProperty::getSecretParams) .filter((params) -> !params.isEmpty()) .collect(SecretParams.toFlatSecretParams()); }
Returns the configuration values a map of key-value pair @param addSecureFields should add secure fields @param useResolvedValue should try to resolve any secret params found. @throws UnresolvedSecretParamException if useResolvedValue is set to true and the secrets are not resolved @return map of configs
getSecretParams
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/domain/config/Configuration.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/domain/config/Configuration.java
Apache-2.0
public List<SecretString> secrets() { List<SecretString> passwordArguments = new ArrayList<>(); for (EnvironmentVariable secureEnvironmentVariable : getSecureEnvironmentVariables()) { passwordArguments.add(new PasswordArgument(secureEnvironmentVariable.value())); } return pa...
Understands a set of variables to be passed to the Agent for a job
secrets
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/util/command/EnvironmentVariableContext.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/util/command/EnvironmentVariableContext.java
Apache-2.0
@Override public boolean hasSecretParams() { return this.properties.stream().anyMatch(EnvironmentVariable::hasSecretParams); }
Understands a set of variables to be passed to the Agent for a job
hasSecretParams
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/util/command/EnvironmentVariableContext.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/util/command/EnvironmentVariableContext.java
Apache-2.0
@Override public SecretParams getSecretParams() { return this.properties.stream() .map(EnvironmentVariable::getSecretParams) .collect(SecretParams.toFlatSecretParams()); }
Understands a set of variables to be passed to the Agent for a job
getSecretParams
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/util/command/EnvironmentVariableContext.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/util/command/EnvironmentVariableContext.java
Apache-2.0
public String name() { return name; }
Understands a set of variables to be passed to the Agent for a job
name
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/util/command/EnvironmentVariableContext.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/util/command/EnvironmentVariableContext.java
Apache-2.0
public String value() { if (!hasSecretParams()) { return value; } return secretParams.substitute(this.value); }
Understands a set of variables to be passed to the Agent for a job
value
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/util/command/EnvironmentVariableContext.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/util/command/EnvironmentVariableContext.java
Apache-2.0
public String valueForDisplay() { return isSecure() ? EnvironmentVariable.MASK_VALUE : value(); }
Understands a set of variables to be passed to the Agent for a job
valueForDisplay
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/util/command/EnvironmentVariableContext.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/util/command/EnvironmentVariableContext.java
Apache-2.0
@Override public String toString() { return format("%s => %s", name, value); }
Understands a set of variables to be passed to the Agent for a job
toString
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/util/command/EnvironmentVariableContext.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/util/command/EnvironmentVariableContext.java
Apache-2.0
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } EnvironmentVariable that = (EnvironmentVariable) o; if (!name.equal...
Understands a set of variables to be passed to the Agent for a job
equals
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/util/command/EnvironmentVariableContext.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/util/command/EnvironmentVariableContext.java
Apache-2.0
@Override public int hashCode() { int result = name.hashCode(); result = 31 * result + value.hashCode(); return result; }
Understands a set of variables to be passed to the Agent for a job
hashCode
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/util/command/EnvironmentVariableContext.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/util/command/EnvironmentVariableContext.java
Apache-2.0
public boolean isSecure() { return secure; }
Understands a set of variables to be passed to the Agent for a job
isSecure
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/util/command/EnvironmentVariableContext.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/util/command/EnvironmentVariableContext.java
Apache-2.0
@Override public boolean hasSecretParams() { return secretParams.hasSecretParams(); }
Understands a set of variables to be passed to the Agent for a job
hasSecretParams
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/util/command/EnvironmentVariableContext.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/util/command/EnvironmentVariableContext.java
Apache-2.0
@Override public SecretParams getSecretParams() { return secretParams; }
Understands a set of variables to be passed to the Agent for a job
getSecretParams
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/util/command/EnvironmentVariableContext.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/util/command/EnvironmentVariableContext.java
Apache-2.0
public void setProperty(String key, String value, boolean isSecure) { properties.add(new EnvironmentVariable(key, value, isSecure)); }
Understands a set of variables to be passed to the Agent for a job
setProperty
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/util/command/EnvironmentVariableContext.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/util/command/EnvironmentVariableContext.java
Apache-2.0
public void setPropertyWithEscape(String key, String value) { properties.add(new EnvironmentVariable(escapeEnvironmentVariable(key), value)); }
Understands a set of variables to be passed to the Agent for a job
setPropertyWithEscape
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/util/command/EnvironmentVariableContext.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/util/command/EnvironmentVariableContext.java
Apache-2.0
public String getProperty(String key) { EnvironmentVariable environmentVariable = getEnvironmentVariable(key); if (environmentVariable != null) { return environmentVariable.value(); } return null; }
Understands a set of variables to be passed to the Agent for a job
getProperty
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/util/command/EnvironmentVariableContext.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/util/command/EnvironmentVariableContext.java
Apache-2.0
public List<String> getPropertyKeys() { List<String> keys = new ArrayList<>(properties.size()); for (EnvironmentVariable property : properties) { keys.add(property.name()); } return keys; }
Understands a set of variables to be passed to the Agent for a job
getPropertyKeys
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/util/command/EnvironmentVariableContext.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/util/command/EnvironmentVariableContext.java
Apache-2.0
public List<EnvironmentVariable> getSecureEnvironmentVariables() { List<EnvironmentVariable> environmentVariables = new ArrayList<>(); for (EnvironmentVariable property : properties) { if (property.isSecure()) { environmentVariables.add(property); } } ...
Understands a set of variables to be passed to the Agent for a job
getSecureEnvironmentVariables
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/util/command/EnvironmentVariableContext.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/util/command/EnvironmentVariableContext.java
Apache-2.0
public String getPropertyForDisplay(String key) { EnvironmentVariable environmentVariable = getEnvironmentVariable(key); if (environmentVariable != null) { return environmentVariable.valueForDisplay(); } return null; }
Understands a set of variables to be passed to the Agent for a job
getPropertyForDisplay
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/util/command/EnvironmentVariableContext.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/util/command/EnvironmentVariableContext.java
Apache-2.0
private EnvironmentVariable getEnvironmentVariable(String key) { for (int i = properties.size() - 1; i >= 0; i--) { EnvironmentVariable property = properties.get(i); if (property.name().equals(key)) { return property; } } return null; }
Understands a set of variables to be passed to the Agent for a job
getEnvironmentVariable
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/util/command/EnvironmentVariableContext.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/util/command/EnvironmentVariableContext.java
Apache-2.0
public Boolean isPropertySecure(String key) { EnvironmentVariable environmentVariable = getEnvironmentVariable(key); if (environmentVariable != null) { return environmentVariable.isSecure(); } return false; }
Understands a set of variables to be passed to the Agent for a job
isPropertySecure
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/util/command/EnvironmentVariableContext.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/util/command/EnvironmentVariableContext.java
Apache-2.0
public boolean hasProperty(String name) { for (EnvironmentVariable property : properties) { if (property.name().equals(name)) { return true; } } return false; }
Understands a set of variables to be passed to the Agent for a job
hasProperty
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/util/command/EnvironmentVariableContext.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/util/command/EnvironmentVariableContext.java
Apache-2.0
public Map<String, String> getProperties() { Map<String, String> map = new HashMap<>(); for (EnvironmentVariable property : properties) { map.put(property.name(), property.value()); } return map; }
Understands a set of variables to be passed to the Agent for a job
getProperties
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/util/command/EnvironmentVariableContext.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/util/command/EnvironmentVariableContext.java
Apache-2.0
public static String escapeEnvironmentVariable(String value) { if (value == null) { return ""; } return value.replaceAll("[^A-Za-z0-9_]", "_").toUpperCase(); }
Understands a set of variables to be passed to the Agent for a job
escapeEnvironmentVariable
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/util/command/EnvironmentVariableContext.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/util/command/EnvironmentVariableContext.java
Apache-2.0
@Override public String toString() { return "EnvironmentVariableContext{" + "properties=" + properties + '}'; }
Understands a set of variables to be passed to the Agent for a job
toString
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/util/command/EnvironmentVariableContext.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/util/command/EnvironmentVariableContext.java
Apache-2.0
@Override public boolean equals(Object that) { if (this == that) { return true; } if (that == null) { return false; } if (this.getClass() != that.getClass()) { return false; } return equals((EnvironmentVariableContext) that...
Understands a set of variables to be passed to the Agent for a job
equals
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/util/command/EnvironmentVariableContext.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/util/command/EnvironmentVariableContext.java
Apache-2.0
private boolean equals(EnvironmentVariableContext that) { if (!this.properties.equals(that.properties)) { return false; } return true; }
Understands a set of variables to be passed to the Agent for a job
equals
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/util/command/EnvironmentVariableContext.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/util/command/EnvironmentVariableContext.java
Apache-2.0
@Override public int hashCode() { return properties != null ? properties.hashCode() : 0; }
Understands a set of variables to be passed to the Agent for a job
hashCode
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/util/command/EnvironmentVariableContext.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/util/command/EnvironmentVariableContext.java
Apache-2.0
public List<String> report(Collection<String> predefinedEnvs) { List<String> lines = new ArrayList<>(properties.size()); Set<String> existing = new HashSet<>(predefinedEnvs); for (EnvironmentVariable property : properties) { String name = property.name; String value = pro...
Understands a set of variables to be passed to the Agent for a job
report
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/util/command/EnvironmentVariableContext.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/util/command/EnvironmentVariableContext.java
Apache-2.0
@Test public void shouldIncludeIfTheTextIsNotADocumentInTheSpecifiedFolder() { IgnoredFiles ignore = new IgnoredFiles("ROOTFOLDER/*.doc"); assertThat(ignore.shouldIgnore(hgMaterialConfig, "shouldNotBeIgnored.doc")).isFalse(); assertThat(ignore.shouldIgnore(hgMaterialConfig, "ANYFOLDER" + sep...
/*.doc"); assertThat(ignore.shouldIgnore(hgMaterialConfig, "foo-hi/bar/a.doc")).isTrue(); assertThat(ignore.shouldIgnore(hgMaterialConfig, "bar/baz/b.doc")).isFalse(); } @Test public void shouldIgnoreWhenTextIsADocumentInAnyFolderWhenDirectoryWildcardNotInTheBeginingAndTerminatesInWildcard...
shouldIncludeIfTheTextIsNotADocumentInTheSpecifiedFolder
java
gocd/gocd
config/config-api/src/test/java/com/thoughtworks/go/config/materials/IgnoredFilesTest.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/test/java/com/thoughtworks/go/config/materials/IgnoredFilesTest.java
Apache-2.0
@Test public void shouldIncludIgnoreIfTextIsADocumentInTheSpecifiedFolder() { IgnoredFiles ignore = new IgnoredFiles("ROOTFOLDER/*.doc"); assertThat(ignore.shouldIgnore(hgMaterialConfig, "ROOTFOLDER" + separator + "a.doc")).isTrue(); }
/*.doc"); assertThat(ignore.shouldIgnore(hgMaterialConfig, "foo-hi/bar/a.doc")).isTrue(); assertThat(ignore.shouldIgnore(hgMaterialConfig, "bar/baz/b.doc")).isFalse(); } @Test public void shouldIgnoreWhenTextIsADocumentInAnyFolderWhenDirectoryWildcardNotInTheBeginingAndTerminatesInWildcard...
shouldIncludIgnoreIfTextIsADocumentInTheSpecifiedFolder
java
gocd/gocd
config/config-api/src/test/java/com/thoughtworks/go/config/materials/IgnoredFilesTest.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/test/java/com/thoughtworks/go/config/materials/IgnoredFilesTest.java
Apache-2.0
@Test public void shouldIncludeIfTextIsNotUnderAGivenFolder() { IgnoredFiles ignore = new IgnoredFiles("**/DocumentFolder/*"); assertThat(ignore.shouldIgnore(hgMaterialConfig, "A" + separator + "shouldNotBeIgnored.doc")).isFalse(); assertThat(ignore.shouldIgnore(hgMaterialConfig, ...
/*.doc"); assertThat(ignore.shouldIgnore(hgMaterialConfig, "foo-hi/bar/a.doc")).isTrue(); assertThat(ignore.shouldIgnore(hgMaterialConfig, "bar/baz/b.doc")).isFalse(); } @Test public void shouldIgnoreWhenTextIsADocumentInAnyFolderWhenDirectoryWildcardNotInTheBeginingAndTerminatesInWildcard...
shouldIncludeIfTextIsNotUnderAGivenFolder
java
gocd/gocd
config/config-api/src/test/java/com/thoughtworks/go/config/materials/IgnoredFilesTest.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/test/java/com/thoughtworks/go/config/materials/IgnoredFilesTest.java
Apache-2.0