Skip to content

Instantly share code, notes, and snippets.

@ciberkleid
Last active March 19, 2019 01:58
Show Gist options
  • Save ciberkleid/afe82e720589752e84dc9600f99bce32 to your computer and use it in GitHub Desktop.
Save ciberkleid/afe82e720589752e84dc9600f99bce32 to your computer and use it in GitHub Desktop.
{
"cyicloudpipelines": [
{
"name": "test",
"keepWaitingPipelines" : false,
"limitConcurrent" : true,
"description":"",
"expectedArtifacts": [],
"notifications": [],
"parameterConfig": [],
"stages" : [ {
"name" : "Prepare test environment",
"refId" : "jenkins1",
"requisiteStageRefIds" : [ ],
"type" : "jenkins",
"waitForCompletion" : true,
"parameters" : {
"PIPELINE_VERSION" : "$\\{trigger.properties['PIPELINE_VERSION']}"
},
"master" : "Spinnaker-Jenkins",
"job" : "spinnaker-github-webhook-pipeline-test-prepare"
}, {
"clusters" : [ {
"account" : "calabasasaccount",
"application" : "githubwebhook",
"artifact" : {
"account" : "jenkins",
"pattern" : "^github-webhook.*VERSION.jar${'$'}",
"type" : "trigger"
},
"capacity" : {
"desired" : "1",
"max" : "1",
"min" : "1"
},
"cloudProvider" : "cloudfoundry",
"detail" : "",
"manifest" : {
"diskQuota" : "1024M",
"env" : [ ],
"instances" : 1,
"memory" : "1024M",
"services" : [ "github-rabbitmq", "github-eureka" ],
"type" : "direct",
"routes" : [ "sc-pipelines-test-github-webhook.test.foo.com" ]
},
"provider" : "cloudfoundry",
"region" : "scpipelines > sc-pipelines-test-github-webhook",
"stack" : "",
"strategy" : "highlander"
} ],
"name" : "Deploy to test",
"refId" : "deploy2",
"requisiteStageRefIds" : [ "jenkins1" ],
"type" : "deploy"
}, {
"name" : "Run tests on test",
"refId" : "jenkins3",
"requisiteStageRefIds" : [ "deploy2" ],
"type" : "jenkins",
"waitForCompletion" : true,
"parameters" : {
"PIPELINE_VERSION" : "$\\{trigger.properties['PIPELINE_VERSION']}"
},
"master" : "Spinnaker-Jenkins",
"job" : "spinnaker-github-webhook-pipeline-test-env-test"
}, {
"clusters" : [ {
"account" : "calabasasaccount",
"application" : "githubwebhook",
"artifact" : {
"account" : "jenkins",
"pattern" : "^github-webhook.*VERSION-latestprodversion.jar${'$'}",
"type" : "trigger"
},
"capacity" : {
"desired" : "1",
"max" : "1",
"min" : "1"
},
"cloudProvider" : "cloudfoundry",
"detail" : "",
"manifest" : {
"diskQuota" : "1024M",
"env" : [ ],
"instances" : 1,
"memory" : "1024M",
"services" : [ "github-rabbitmq", "github-eureka" ],
"type" : "direct",
"routes" : [ "sc-pipelines-test-github-webhook.test.foo.com" ]
},
"provider" : "cloudfoundry",
"region" : "scpipelines > sc-pipelines-test-github-webhook",
"stack" : "",
"strategy" : "highlander"
} ],
"name" : "Deploy to test latest prod version",
"refId" : "deploy4",
"requisiteStageRefIds" : [ "jenkins3" ],
"type" : "deploy",
"stageEnabled" : {
"expression" : "$\\{trigger.properties['LATEST_PROD_VERSION']}",
"type" : "expression"
}
}, {
"name" : "Run rollback tests on test",
"refId" : "jenkins5",
"requisiteStageRefIds" : [ "deploy4" ],
"type" : "jenkins",
"waitForCompletion" : true,
"parameters" : {
"PIPELINE_VERSION" : "$\\{trigger.properties['PIPELINE_VERSION']}",
"PASSED_LATEST_PROD_TAG" : "$\\{trigger.properties['PASSED_LATEST_PROD_TAG']}"
},
"master" : "Spinnaker-Jenkins",
"job" : "spinnaker-github-webhook-pipeline-test-env-rollback-test",
"stageEnabled" : {
"expression" : "$\\{trigger.properties['LATEST_PROD_VERSION']}",
"type" : "expression"
}
}, {
"instructions" : "Wait for stage env",
"refId" : "manualJudgment6",
"requisiteStageRefIds" : [ "jenkins5" ],
"type" : "manualJudgment",
"judgmentInputs" : []
}, {
"name" : "Prepare stage environment",
"refId" : "jenkins7",
"requisiteStageRefIds" : [ "manualJudgment6" ],
"type" : "jenkins",
"waitForCompletion" : true,
"parameters" : {
"PIPELINE_VERSION" : "$\\{trigger.properties['PIPELINE_VERSION']}"
},
"master" : "Spinnaker-Jenkins",
"job" : "spinnaker-github-webhook-pipeline-stage-prepare"
}, {
"clusters" : [ {
"account" : "calabasasaccount",
"application" : "githubwebhook",
"artifact" : {
"account" : "jenkins",
"pattern" : "^github-webhook.*VERSION.jar${'$'}",
"type" : "trigger"
},
"capacity" : {
"desired" : "1",
"max" : "1",
"min" : "1"
},
"cloudProvider" : "cloudfoundry",
"detail" : "",
"manifest" : {
"diskQuota" : "1024M",
"env" : [ ],
"instances" : 1,
"memory" : "1024M",
"services" : [ "github-rabbitmq", "github-eureka" ],
"type" : "direct",
"routes" : [ "github-webhook-sc-pipelines-stage.stage.foo.com" ]
},
"provider" : "cloudfoundry",
"region" : "scpipelines > sc-pipelines-stage",
"stack" : "",
"strategy" : "highlander"
} ],
"name" : "Deploy to stage",
"refId" : "deploy8",
"requisiteStageRefIds" : [ "jenkins7" ],
"type" : "deploy"
}, {
"instructions" : "Prepare for end to end tests",
"refId" : "manualJudgment9",
"requisiteStageRefIds" : [ "deploy8" ],
"type" : "manualJudgment",
"judgmentInputs" : [ ]
}, {
"name" : "End to end tests on stage",
"refId" : "jenkins10",
"requisiteStageRefIds" : [ "manualJudgment9" ],
"type" : "jenkins",
"waitForCompletion" : true,
"parameters" : {
"PIPELINE_VERSION" : "$\\{trigger.properties['PIPELINE_VERSION']}"
},
"master" : "Spinnaker-Jenkins",
"job" : "spinnaker-github-webhook-pipeline-stage-env-test"
}, {
"instructions" : "Approve production",
"refId" : "manualJudgment11",
"requisiteStageRefIds" : [ "jenkins10" ],
"type" : "manualJudgment",
"judgmentInputs" : [ ]
}, {
"clusters" : [ {
"account" : "calabasasaccount",
"application" : "githubwebhook",
"artifact" : {
"account" : "jenkins",
"pattern" : "^github-webhook.*VERSION.jar${'$'}",
"type" : "trigger"
},
"capacity" : {
"desired" : "1",
"max" : "1",
"min" : "1"
},
"cloudProvider" : "cloudfoundry",
"detail" : "",
"manifest" : {
"diskQuota" : "1024M",
"env" : [ ],
"instances" : 1,
"memory" : "1024M",
"services" : [ "github-rabbitmq", "github-eureka" ],
"type" : "direct",
"routes" : [ "github-webhook.prod.foo.com" ]
},
"provider" : "cloudfoundry",
"region" : "scpipelines > sc-pipelines-prod",
"stack" : "",
"strategy" : "highlander"
} ],
"name" : "Deploy to prod",
"refId" : "deploy12",
"requisiteStageRefIds" : [ "manualJudgment11" ],
"type" : "deploy"
}, {
"name" : "Push prod tag",
"refId" : "jenkins13",
"requisiteStageRefIds" : [ "deploy12" ],
"type" : "jenkins",
"waitForCompletion" : true,
"parameters" : {
"PIPELINE_VERSION" : "$\\{trigger.properties['PIPELINE_VERSION']}"
},
"master" : "Spinnaker-Jenkins",
"job" : "spinnaker-github-webhook-pipeline-prod-tag-repo"
}, {
"instructions" : "Approve rollback",
"refId" : "manualJudgment14",
"requisiteStageRefIds" : [ "deploy12" ],
"type" : "manualJudgment",
"judgmentInputs" : [ ]
}, {
"clusters" : [ {
"account" : "calabasasaccount",
"application" : "githubwebhook",
"artifact" : {
"account" : "jenkins",
"pattern" : "^github-webhook.*VERSION-latestprodversion.jar${'$'}",
"type" : "trigger"
},
"capacity" : {
"desired" : "1",
"max" : "1",
"min" : "1"
},
"cloudProvider" : "cloudfoundry",
"detail" : "",
"manifest" : {
"diskQuota" : "1024M",
"env" : [ ],
"instances" : 1,
"memory" : "1024M",
"services" : [ "github-rabbitmq", "github-eureka" ],
"type" : "direct",
"routes" : [ "github-webhook.prod.foo.com" ]
},
"provider" : "cloudfoundry",
"region" : "scpipelines > sc-pipelines-prod",
"stack" : "",
"strategy" : "highlander"
} ],
"name" : "Rollback",
"refId" : "deploy15",
"requisiteStageRefIds" : [ "manualJudgment14" ],
"type" : "deploy"
}, {
"failPipeline" : true,
"name" : "Remove prod tag",
"refId" : "jenkins16",
"requisiteStageRefIds" : [ "deploy15" ],
"type" : "jenkins",
"waitForCompletion" : true,
"parameters" : {
"PIPELINE_VERSION" : "$\\{trigger.properties['PIPELINE_VERSION']}"
},
"master" : "Spinnaker-Jenkins",
"job" : "spinnaker-github-webhook-pipeline-prod-env-remove-tag",
"continuePipeline" : false
} ],
"triggers" : [ {
"enabled" : true,
"job" : "spinnaker-github-webhook-pipeline-build",
"master" : "Spinnaker-Jenkins",
"type" : "jenkins",
"propertyFile" : "trigger.properties"
} ]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment