Docker Community Forums

Share and learn in the Docker community.

Pull request number in an automated build

(Shaun Jackman) #1

In a Docker Cloud Automated Build, I’d like to have the pull request number in an environment variable. Travis CI has the environment variables TRAVIS_REPO_SLUG and TRAVIS_PULL_REQUEST, so the URL of the pull request is$TRAVIS_REPO_SLUG/pull/$TRAVIS_PULL_REQUEST

How do I get this information in a Docker Cloud Automated Build?


(Shin) #2

AFAIK you can’t send parameters like that to Automated Build.

Take a look at which is the image used by Automated Build to build your images and in particular look at; it doesn’t looked like it’s passed anything from the build trigger.

I think at most you’d be able use whatever information git gives you and then pass it to ‘docker build’ as an argument (by a custom build command - see hooks/build)