diff --git a/orca-clouddriver/src/main/groovy/com/netflix/spinnaker/orca/clouddriver/pipeline/manifest/RollingRestartManifestStage.java b/orca-clouddriver/src/main/groovy/com/netflix/spinnaker/orca/clouddriver/pipeline/manifest/RollingRestartManifestStage.java new file mode 100644 index 0000000000..e3104984e1 --- /dev/null +++ b/orca-clouddriver/src/main/groovy/com/netflix/spinnaker/orca/clouddriver/pipeline/manifest/RollingRestartManifestStage.java @@ -0,0 +1,39 @@ +/* + * Copyright 2019 Google, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.netflix.spinnaker.orca.clouddriver.pipeline.manifest; + +import com.netflix.spinnaker.orca.clouddriver.tasks.MonitorKatoTask; +import com.netflix.spinnaker.orca.clouddriver.tasks.manifest.ManifestForceCacheRefreshTask; +import com.netflix.spinnaker.orca.clouddriver.tasks.manifest.RollingRestartManifestTask; +import com.netflix.spinnaker.orca.pipeline.StageDefinitionBuilder; +import com.netflix.spinnaker.orca.pipeline.TaskNode; +import com.netflix.spinnaker.orca.pipeline.model.Stage; +import javax.annotation.Nonnull; +import org.springframework.stereotype.Component; + +@Component +public class RollingRestartManifestStage implements StageDefinitionBuilder { + public static final String PIPELINE_CONFIG_TYPE = "rollingRestartManifest"; + + @Override + public void taskGraph(@Nonnull Stage stage, TaskNode.Builder builder) { + builder + .withTask(RollingRestartManifestTask.TASK_NAME, RollingRestartManifestTask.class) + .withTask("monitorRollingRestart", MonitorKatoTask.class) + .withTask(ManifestForceCacheRefreshTask.TASK_NAME, ManifestForceCacheRefreshTask.class); + } +} diff --git a/orca-clouddriver/src/main/groovy/com/netflix/spinnaker/orca/clouddriver/tasks/manifest/RollingRestartManifestTask.java b/orca-clouddriver/src/main/groovy/com/netflix/spinnaker/orca/clouddriver/tasks/manifest/RollingRestartManifestTask.java new file mode 100644 index 0000000000..4919fb1bfd --- /dev/null +++ b/orca-clouddriver/src/main/groovy/com/netflix/spinnaker/orca/clouddriver/tasks/manifest/RollingRestartManifestTask.java @@ -0,0 +1,29 @@ +/* + * Copyright 2019 Google, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.netflix.spinnaker.orca.clouddriver.tasks.manifest; + +import org.springframework.stereotype.Component; + +@Component +public class RollingRestartManifestTask extends GenericUpdateManifestTask { + public static final String TASK_NAME = "rollingRestartManifest"; + + @Override + protected String taskName() { + return TASK_NAME; + } +}