This file contains hidden or 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
| lazy val pipeline = TaskKey[Unit]("pipeline", "Runs the full build pipeline: compile, test, integration tests") | |
| pipeline <<= (test in IntegrationTest).dependsOn(test in Test) |
This file contains hidden or 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 akka.testkit.TestActorRef | |
| object TestActorHelpers { | |
| def queueMessagesTo(pausedActor: TestActorRef[Nothing])(sendMessages: => Unit) = { | |
| pausedActor.suspend() | |
| sendMessages | |
| pausedActor.resume(null) | |
| } | |
| } |
This file contains hidden or 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/sh | |
| aws ecs describe-container-instances \ | |
| --region ${REGION} \ | |
| --cluster ${CLUSTER} \ | |
| --container-instances $(aws ecs list-container-instances \ | |
| --region ${REGION} \ | |
| --cluster ${CLUSTER} | \ | |
| jq -r '.containerInstanceArns | | |
| map(match("container-instance/(.*)").captures[].string)[]') | \ |
This file contains hidden or 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
| docker inspect $(docker ps -q) | \ | |
| jq 'map(.Config.Env | | |
| map(select((. | startswith("SERVICE")) and | |
| (. | startswith("SERVICE_IGNORE") | not)))) | | |
| reduce .[] as $item ([]; . + $item)' |
This file contains hidden or 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 | |
| cluster=default | |
| container_instance= # container instance guid | |
| tasks=$(aws --region us-west-2 ecs list-tasks --container-instance $container_instance --cluster $cluster | jq -r '.taskArns | map(.[40:]) | reduce .[] as $item (""; . + $item + " ")') | |
| for task in $tasks; do | |
| aws --region us-west-2 ecs stop-task --task $task --cluster $cluster | |
| done | |
| aws --region us-west-2 ecs deregister-container-instance --cluster $cluster --container-instance $container_instance |
This file contains hidden or 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
| package com.dwolla.http.finagle | |
| import com.twitter.finagle.Http.Client | |
| import com.twitter.finagle.http.{Method, Request, Response} | |
| import com.twitter.finagle.loadbalancer.LoadBalancerFactory | |
| import com.twitter.finagle.{Http, Service} | |
| object FinagleHttpClient { | |
| private def newService(dest: String): Service[Request, Response] = { |
This file contains hidden or 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
| for (node in hudson.model.Hudson.instance.slaves.take(100)) { | |
| println(node.name) | |
| node.getComputer().setTemporarilyOffline(true,null); | |
| node.getComputer().doDoDelete(); | |
| } | |
| println(hudson.model.Hudson.instance.slaves.size()); | |
| for (node in hudson.model.Hudson.instance.slaves.take(10)) { | |
| computer = node.getComputer(); | |
| if(computer != null && computer.isOffline()) { |
This file contains hidden or 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
| package com.dwolla.sbt.cloudformation | |
| import com.dwolla.awssdk.cloudformation.CloudFormationClient | |
| import com.dwolla.sbt.cloudformation.CloudFormationStackParsers._ | |
| import sbt.IO.{read, utf8} | |
| import sbt.Keys._ | |
| import sbt._ | |
| import scala.language.{implicitConversions, postfixOps} |
This file contains hidden or 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
| name := "example" | |
| scalaVersion := "2.12.4" | |
| scalacOptions ++= Seq( | |
| "-feature", | |
| "-deprecation", | |
| "-Ypartial-unification", | |
| // "-Xlog-implicits", | |
| ) |
This file contains hidden or 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
| #!/usr/bin/env bash | |
| set -euo pipefail | |
| IFS=$'\n\t' | |
| function find_ip () { | |
| aws --region us-west-2 \ | |
| ec2 describe-instances --filters \ | |
| "Name=tag:Name,Values=${1}" \ | |
| "Name=instance-state-name,Values=running" | \ | |
| jq -rc '.Reservations | map(.Instances) | map(map(.PrivateIpAddress)) | flatten | flatten | .[0]' |