Forked from
Platform / Infrastructure / CI CD / Jenkins jobs
62 commits behind the upstream repository.
-
Antoine Lambert authored
It was changed in 3ac703bd to allow jobs execution on a local Jenkins instance but it triggered permission errors on production Jenkins so retore previous GID value for jenkins group when deploying jobs on thyssen.
Antoine Lambert authoredIt was changed in 3ac703bd to allow jobs execution on a local Jenkins instance but it triggered permission errors on production Jenkins so retore previous GID value for jenkins group when deploying jobs on thyssen.
tox.ini 927 B
[tox]
skipsdist = true
envlist = test
minversion = 4
[testenv]
basepython = python3
skip_install = true
deps =
jenkins-job-builder >= 6
[testenv:test]
allowlist_externals = bash
commands =
# generate secret jenkins token to trigger builds from gitlab webhooks
bash -c "echo -n $(openssl rand -base64 32 | sha1sum | cut -c1-40) > jobs/templates/jenkins-token"
bash -c "echo -n true > jobs/production-jenkins"
# check possible errors in settings for production jobs only
bash -c "[ \"$(uname -n)\" != \"thyssen\" ] && jenkins-jobs test -r jobs > /dev/null || true"
# generate jobs settings
bash -c "([ \"$(uname -n)\" == \"thyssen\" ] && echo -n true || echo -n false) > jobs/production-jenkins"
bash -c "stat -c '%g' /var/run/docker.sock > jobs/docker-gid"
bash -c "([ \"$(uname -n)\" == \"thyssen\" ] && echo -n 120 || cat jobs/docker-gid) > jobs/jenkins-docker-gid"
jenkins-jobs {posargs:test} -r jobs