Merge remote-tracking branch 'origin/master'

This commit is contained in:
Brad Rydzewski 2014-02-26 15:24:35 -07:00
commit 80c42309d3

View file

@ -412,6 +412,21 @@ func (b *Builder) writeDockerfile(dir string) error {
dockerfile.WriteRun("echo 'StrictHostKeyChecking no' > /root/.ssh/config")
}
dockerfile.WriteEnv("CI", "true")
dockerfile.WriteEnv("DRONE", "true")
if b.Repo.Branch != "" {
dockerfile.WriteEnv("DRONE_BRANCH", b.Repo.Branch)
}
if b.Repo.Commit != "" {
dockerfile.WriteEnv("DRONE_COMMIT", b.Repo.Commit)
}
if b.Repo.PR != "" {
dockerfile.WriteEnv("DRONE_PR", b.Repo.PR)
}
if b.Repo.Dir != "" {
dockerfile.WriteEnv("DRONE_BUILD_DIR", b.Repo.Dir)
}
dockerfile.WriteAdd("proxy.sh", "/etc/drone.d/")
dockerfile.WriteEntrypoint("/bin/bash -e /usr/local/bin/drone")