Provides a docker image of the python runtime for use as a Jenkins agent.
docker build -t jenkins-agent-python .
For local running and experimentation run docker run -i -t jenkins-agent-python /bin/bash
and have a play once inside the container.
oc process -f ../../.openshift/templates/jenkins-agent-generic-template.yml \
-p NAME=jenkins-agent-python \
-p SOURCE_CONTEXT_DIR=jenkins-agents/jenkins-agent-python \
-p DOCKERFILE_PATH=Dockerfile \
| oc create -f -
For all params see the list in the ../../.openshift/templates/jenkins-agent-generic-template.yml
or run oc process --parameters -f ../../.openshift/templates/jenkins-agent-generic-template.yml
.
Add a new Kubernetes Container template called jenkins-agent-python
(if you've build and pushed the container image locally) and specify this as the node when running builds. If you're using the template attached; the role: jenkins-agent
is attached and Jenkins should automatically discover the agent for you. Further instructions can be found here. Python installation commands are slightly modified from the SCL versions, which can be found here.