com.netflix.spinnaker.orca.pipeline.model.Execution.setOrigin()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(2.2k)|赞(0)|评价(0)|浏览(103)

本文整理了Java中com.netflix.spinnaker.orca.pipeline.model.Execution.setOrigin()方法的一些代码示例,展示了Execution.setOrigin()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Execution.setOrigin()方法的具体详情如下:
包路径:com.netflix.spinnaker.orca.pipeline.model.Execution
类名称:Execution
方法名:setOrigin

Execution.setOrigin介绍

暂无

代码示例

代码示例来源:origin: com.netflix.spinnaker.orca/orca-core

public PipelineBuilder withOrigin(String origin) {
 pipeline.setOrigin(origin);
 return this;
}

代码示例来源:origin: com.netflix.spinnaker.orca/orca-core

private Execution parseOrchestration(String configJson) throws IOException {
 @SuppressWarnings("unchecked")
 Map<String, Serializable> config = objectMapper.readValue(configJson, Map.class);
 Execution orchestration = Execution.newOrchestration(getString(config, "application"));
 if (config.containsKey("name")) {
  orchestration.setDescription(getString(config, "name"));
 }
 if (config.containsKey("description")) {
  orchestration.setDescription(getString(config, "description"));
 }
 for (Map<String, Object> context : getList(config, "stages")) {
  String type = context.remove("type").toString();
  String providerType = getString(context, "providerType");
  if (providerType != null && !providerType.equals("aws") && !providerType.equals("titus")) {
   type += format("_%s", providerType);
  }
  // TODO: need to check it's valid?
  Stage stage = new Stage(orchestration, type, context);
  orchestration.getStages().add(stage);
 }
 if (config.get("trigger") != null) {
  orchestration.setTrigger(objectMapper.convertValue(config.get("trigger"), Trigger.class));
 }
 orchestration.setBuildTime(clock.millis());
 orchestration.setAuthentication(AuthenticationDetails.build().orElse(new AuthenticationDetails()));
 orchestration.setOrigin((String) config.getOrDefault("origin", "unknown"));
 orchestration.setStartTimeExpiry((Long) config.get("startTimeExpiry"));
 return orchestration;
}

代码示例来源:origin: com.netflix.spinnaker.orca/orca-redis

execution.setOrigin(map.get("origin"));
if (map.get("source") != null) {
 execution.setSource(mapper.readValue(map.get("source"), Execution.PipelineSource.class));

相关文章