Hello,
We use docker for our Jenkins-buildslaves and want to use rancher for scaling and recreating the slave-containers. As we use the Jenkins-swarm-plugin we need an environment variable for labeling them in a unique way.
docker-compose.yml:
[...]
environment:
JENKINS_SLAVE_NAME: buildslave-01
[...]
We need to adapt the Jenkins_slave_name due to the name of the docker-container. We cannot find any environment variable to get these information though.
we thought we could use something like the variables you can define in the rancher-compose file, but the scaling function doesn’t adapt these variables.
Is there a trick to get that information? It doesn’t necessarily have to be the whole name, the number would be sufficient.