freeStyleJob('d8a-cohesion_chat-migrations') {
  using 'TEMPLATE-autobuild'
  scm {
    git {
      remote {
        github 'd8a/cohesion_chat-migrations', 'ssh', 'git-aws.internal.justin.tv'
        credentials 'git-aws-read-key'
      }
      clean true
    }
  }
  steps {
    saveDeployArtifact 'd8a/cohesion_chat-migrations', '.'
  }
}

freeStyleJob('d8a-cohesion_chat-migrations-deploy') {
  using 'TEMPLATE-deploy-aws'
  steps {
    shell 'courier deploy --skip-restart --repo d8a/cohesion_chat-migrations --dir /opt/twitch/migrations/cohesion_chat'
  }
}
