This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
##### | |
## Helper script to use when we need to restart/redeploy spinnaker due to config changes or some other reason. | |
## | |
## This script has been written for a local debian install of spinnaker (all services running on the same box), but could be adapted fairly easily for a distributed install | |
## | |
## Steps: | |
## - ping health endpoints for all services every 2 seconds, reporting status of each each iteration, until all report healthy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Grab('com.amazonaws:aws-java-sdk-ec2:1.11.281') | |
@Grab('com.amazonaws:aws-java-sdk-elasticloadbalancingv2:1.11.281') | |
import groovy.json.JsonOutput | |
import com.amazonaws.services.ec2.AmazonEC2 | |
import com.amazonaws.services.ec2.AmazonEC2ClientBuilder | |
import com.amazonaws.services.ec2.model.Filter | |
import com.amazonaws.services.ec2.model.DescribeInstancesRequest | |
import com.amazonaws.services.ec2.model.DescribeInstancesResult |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import jenkins.model.Jenkins | |
import hudson.model.AbstractItem | |
import hudson.model.Cause | |
// === this code enables you to run this whole thing === | |
// === just in https://myjenkins.me/script console === | |
def currentBuild = Jenkins.instance.getAllItems(AbstractItem.class) | |
.findAll{ it.fullName == "my/org/job-name" } | |
.collect{ it.builds.findAll{ it.number == 3 } } // desired build number of "my/org/job-name" | |
.flatten()[0] |