本文整理了Java中com.netflix.spinnaker.orca.pipeline.model.Stage.setType()
方法的一些代码示例,展示了Stage.setType()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Stage.setType()
方法的具体详情如下:
包路径:com.netflix.spinnaker.orca.pipeline.model.Stage
类名称:Stage
方法名:setType
暂无
代码示例来源:origin: spinnaker/kayenta
/**
* Always run the GenerateCanaryAnalysisResultStage.
*/
private void addAlwaysRunResultStage(@Nonnull Stage parent, @Nonnull StageGraphBuilder graph) {
graph.append(stage -> {
stage.setType(GenerateCanaryAnalysisResultStage.STAGE_TYPE);
stage.setName(GenerateCanaryAnalysisResultStage.STAGE_DESCRIPTION);
stage.setContext(parent.getContext());
});
}
代码示例来源:origin: spinnaker/kayenta
stage.setType(WaitStage.STAGE_TYPE);
stage.setName("Warmup Wait");
stage.getContext().put("waitTime", canaryAnalysisExecutionRequest.getBeginCanaryAnalysisAfterAsDuration().getSeconds());
stage.setType(WaitStage.STAGE_TYPE);
stage.setName("Interval Wait #" + index);
stage.getContext().put("waitTime", analysisInterval.getSeconds());
stage.setType(RunCanaryStage.STAGE_TYPE);
stage.setName(RunCanaryStage.STAGE_NAME_PREFIX + index);
stage.getContext().putAll(kayentaObjectMapper.convertValue(runCanaryContext,
代码示例来源:origin: com.netflix.kayenta/kayenta-standalone-canary-analysis
/**
* Always run the GenerateCanaryAnalysisResultStage.
*/
private void addAlwaysRunResultStage(@Nonnull Stage parent, @Nonnull StageGraphBuilder graph) {
graph.append(stage -> {
stage.setType(GenerateCanaryAnalysisResultStage.STAGE_TYPE);
stage.setName(GenerateCanaryAnalysisResultStage.STAGE_DESCRIPTION);
stage.setContext(parent.getContext());
});
}
代码示例来源:origin: com.netflix.spinnaker.orca/orca-clouddriver
@Override
public void addAdditionalBeforeStages(
@Nonnull Stage parent,
@Nonnull StageGraphBuilder graph
) {
if (Objects.equals(parent.getContext().get("allowDeleteActive"), true)) {
Map<String, Object> context = new HashMap<>(parent.getContext());
context.put("remainingEnabledServerGroups", parent.getContext().get("shrinkToSize"));
context.put("preferLargerOverNewer", parent.getContext().get("retainLargerOverNewer"));
context.put("continueIfClusterNotFound", Objects.equals(parent.getContext().get("shrinkToSize"), 0));
// We don't want the key propagated if interestingHealthProviderNames isn't defined, since this prevents
// health providers from the stage's 'determineHealthProviders' task to be added to the context.
if (parent.getContext().get("interestingHealthProviderNames") != null) {
context.put("interestingHealthProviderNames", parent.getContext().get("interestingHealthProviderNames"));
}
graph.add((it) -> {
it.setType(disableClusterStage.getType());
it.setName("disableCluster");
it.setContext(context);
});
}
}
}
代码示例来源:origin: com.netflix.spinnaker.orca/orca-clouddriver
if (addLocking) {
graph.append(stage -> {
stage.setType(AcquireLockStage.PIPELINE_TYPE);
stage.getContext().put("lock", Collections.singletonMap("lockName", lockName));
});
it.setType(RollbackServerGroupStage.PIPELINE_CONFIG_TYPE);
it.setName("Rollback " + region);
it.setContext(context);
stage.setType(ReleaseLockStage.PIPELINE_TYPE);
stage.getContext().put("lock", Collections.singletonMap("lockName", lockName));
});
it.setType(WaitStage.STAGE_TYPE);
it.setName("Wait after " + region);
it.setContext(Collections.singletonMap("waitTime", stageData.waitTimeBetweenRegions));
代码示例来源:origin: com.netflix.spinnaker.orca/orca-redis
stage.setId(stageId);
stage.setRefId(map.get(prefix + "refId"));
stage.setType(map.get(prefix + "type"));
stage.setName(map.get(prefix + "name"));
stage.setStartTime(NumberUtils.createLong(map.get(prefix + "startTime")));
代码示例来源:origin: com.netflix.spinnaker.orca/orca-clouddriver
@Override
public final void beforeStages(@Nonnull Stage parent, @Nonnull StageGraphBuilder graph) {
if (lockingConfigurationProperties.isEnabled()) {
List<Location> locations = locationsFromStage(parent.getContext());
ClusterSelection clusterSelection = parent.mapTo(ClusterSelection.class);
for (Location location : locations) {
String lockName = ClusterLockHelper.clusterLockName(
clusterSelection.getMoniker(),
clusterSelection.getCredentials(),
location);
if (trafficGuard.hasDisableLock(clusterSelection.getMoniker(), clusterSelection.getCredentials(), location)) {
graph.add(stage -> {
stage.setType(AcquireLockStage.PIPELINE_TYPE);
stage.getContext().put("lock", Collections.singletonMap("lockName", lockName));
});
}
}
}
addAdditionalBeforeStages(parent, graph);
}
代码示例来源:origin: com.netflix.spinnaker.orca/orca-clouddriver
@Override
public final void afterStages(@Nonnull Stage parent, @Nonnull StageGraphBuilder graph) {
addAdditionalAfterStages(parent, graph);
if (lockingConfigurationProperties.isEnabled()) {
List<Location> locations = locationsFromStage(parent.getContext());
ClusterSelection clusterSelection = parent.mapTo(ClusterSelection.class);
for (Location location : locations) {
String lockName = ClusterLockHelper.clusterLockName(
clusterSelection.getMoniker(),
clusterSelection.getCredentials(),
location);
if (trafficGuard.hasDisableLock(clusterSelection.getMoniker(), clusterSelection.getCredentials(), location)) {
graph.append(stage -> {
stage.setType(ReleaseLockStage.PIPELINE_TYPE);
stage.getContext().put("lock", Collections.singletonMap("lockName", lockName));
});
}
}
}
}
代码示例来源:origin: com.netflix.kayenta/kayenta-standalone-canary-analysis
stage.setType(WaitStage.STAGE_TYPE);
stage.setName("Warmup Wait");
stage.getContext().put("waitTime", canaryAnalysisExecutionRequest.getBeginCanaryAnalysisAfterAsDuration().getSeconds());
stage.setType(WaitStage.STAGE_TYPE);
stage.setName("Interval Wait #" + index);
stage.getContext().put("waitTime", analysisInterval.getSeconds());
stage.setType(RunCanaryStage.STAGE_TYPE);
stage.setName(RunCanaryStage.STAGE_NAME_PREFIX + index);
stage.getContext().putAll(kayentaObjectMapper.convertValue(runCanaryContext,
内容来源于网络,如有侵权,请联系作者删除!