This is a set of Docker buildbot master and slave images. The image requires that the git repository being monitored and cloned contain two files :
Buildbot is an open-source framework for automating software build, test, and release processes. Refer to Buildbot for more details.
To build the master image
cd master
docker build --rm=true -q -t junaid/buildbot-master .
To build the slave image. The build slave also allows adding SSH-Keys into the container. This is achieved by adding the required SSH-Keys into the .ssh/ directory within the slave. At run time the container will add all the available keys to the SSH-Agent and use them for pulling code from the repositories (if required).
NOTE: The SSH Keys should not have a passphrase.
cd slave
# Copy any required SSH-Keys to .ssh/ directory
mkdir .ssh/
cp ~/.ssh/id_rsa_bitbucket .ssh/
# Build the image
docker build --rm=true -q -t junaid/buildbot-slave .
The buildbot master images are used to run the buildbot master server. This is the main server that is used to start and monitor the build activities. To run the buildbot master image
docker run -d -P -p 8010:8010 --name=master junaid/buildbot-master
The buildbot master supports the following Environment Variables
The buildbot configuration is set to clone the repository, run any requirements specified in the requirements.txt file and finally run the tests in run_tests.sh script.
To start a buildmaster that uses a custom repository and project
docker run -d -P -p 8010:8010 --name=master \
-e [email protected]:mydomain/myrepo.git \
-e PROJECT_TITLE="My Project Title" \
-e PROJECT_URL="https://bitbucket.org/mydomain/myproject" \
junaid/buildbot-master
The slave is used to run the different builds depending upon the configuration of the build server. The slave uses linked containers to avoid exposing the buildbot RPC port (9989) over the network.
The run the buildbot slave image
docker run -d --link master:master --name=slave junaid/buildbot-slave
The buildbot slave supports the following Environment Variables
Content type
Image
Digest
sha256:72b547d78…
Size
307.9 MB
Last updated
about 11 years ago
docker pull junaid/buildbot-master