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

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