job {
  name 'ng-devtools-proxy-build'
  using 'TEMPLATE-autobuild'
  scm {
    git {
      remote {
        github 'dta/ng_devtools_proxy', 'ssh', 'git-aws.internal.justin.tv'
        credentials 'git-aws-read-key'
      }
    }
  }
  steps {
    shell 'docker build -t deployproxy:$GIT_COMMIT . ; docker tag deployproxy:$GIT_COMMIT docker.internal.justin.tv/devtools/deployproxy:$GIT_COMMIT; docker push docker.internal.justin.tv/devtools/deployproxy:$GIT_COMMIT'
  }
}

job { 
  name 'ng-devtools-proxy-deploy' 
  using 'TEMPLATE-deploy-aws'
  steps {
    shell 'courier deploy --hosts $HOSTS --environment $ENVIRONMENT --repo "dta/ng_devtools_proxy" --image "docker.internal.justin.tv/devtools/deployproxy"'
  }
}
