@Override public synchronized Locations getLocations(String application, String profile, String label) { if (label == null) { label = this.defaultLabel; } String version = refresh(label); return new Locations(application, profile, label, version, getSearchLocations(getWorkingDirectory(), application, profile, label)); }
public PatternMatchingJGitEnvironmentRepository( ConfigurableEnvironment environment, MultipleJGitEnvironmentProperties.PatternMatchingJGitEnvironmentProperties properties) { super(environment, properties); this.setPattern(properties.getPattern()); this.name = properties.getName(); }
private Git openGitRepository() throws IOException { Git git = this.gitFactory.getGitByOpen(getWorkingDirectory()); return git; }
@Override public synchronized Environment findOne(String application, String profile, String label) { NativeEnvironmentRepository delegate = new NativeEnvironmentRepository(getEnvironment(), new NativeEnvironmentProperties()); Locations locations = getLocations(application, profile, label); delegate.setSearchLocations(locations.getLocations()); Environment result = delegate.findOne(application, profile, ""); result.setVersion(locations.getVersion()); result.setLabel(label); return this.cleaner.clean(result, getWorkingDirectory().toURI().toString(), getUri()); }
public JGitEnvironmentRepository(ConfigurableEnvironment environment, JGitEnvironmentProperties properties) { super(environment, properties); this.cloneOnStart = properties.isCloneOnStart(); this.defaultLabel = properties.getDefaultLabel(); this.forcePull = properties.isForcePull(); this.timeout = properties.getTimeout(); this.deleteUntrackedBranches = properties.isDeleteUntrackedBranches(); this.refreshRate = properties.getRefreshRate(); this.skipSslValidation = properties.isSkipSslValidation(); }
public NativeEnvironmentRepository(ConfigurableEnvironment environment, NativeEnvironmentProperties properties) { this.environment = environment; this.addLabelLocations = properties.getAddLabelLocations(); this.defaultLabel = properties.getDefaultLabel(); this.failOnError = properties.getFailOnError(); this.order = properties.getOrder(); this.searchLocations = properties.getSearchLocations(); this.version = properties.getVersion(); }
private boolean shouldTrack(Git git, String label) throws GitAPIException { return isBranch(git, label) && !isLocalBranch(git, label); }
@Override public void addConfiguration(MultipleJGitEnvironmentProperties environmentProperties) throws GeneralSecurityException { addHttpClient(environmentProperties); for (JGitEnvironmentProperties repo : environmentProperties.getRepos().values()) { addHttpClient(repo); } }
public MultipleJGitEnvironmentRepository(ConfigurableEnvironment environment, MultipleJGitEnvironmentProperties properties) { super(environment, properties); properties.getRepos().forEach((name, props) -> repos.put(name, new PatternMatchingJGitEnvironmentRepository(environment, props)) ); }
@Override public JdbcEnvironmentRepository build(JdbcEnvironmentProperties environmentProperties) { return new JdbcEnvironmentRepository(jdbc, environmentProperties); } }
@Override public void setOrder(int order) { super.setOrder(order); } }
public SvnKitEnvironmentProperties() { super(); setDefaultLabel(DEFAULT_LABEL); } }
@Override protected File getWorkingDirectory() { return this.getBasedir(); }
public SvnKitEnvironmentRepository(ConfigurableEnvironment environment, SvnKitEnvironmentProperties properties) { super(environment, properties); this.defaultLabel = properties.getDefaultLabel(); }
@Override public CredhubEnvironmentRepository build(CredhubEnvironmentProperties environmentProperties) { return new CredhubEnvironmentRepository(credhubOperations); }
public JGitEnvironmentProperties() { super(); setDefaultLabel(DEFAULT_LABEL); }
@Override public void setOrder(int order) { super.setOrder(order); }
@Override public HttpConnection create(URL url) throws IOException { return create(url, null); }
private boolean isBranch(Git git, String label) throws GitAPIException { return containsBranch(git, label, ListMode.ALL); }