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

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