blob: f89ded66b092919082219c72eb471e8ed1d2e58c [file] [log] [blame]
[tox]
minversion = 1.6
skipsdist = True
envlist = jobs
[testenv]
usedevelop = False
envdir = {toxworkdir}/shared
deps =
git+https://opendev.org/jjb/jenkins-job-builder@3.0.2#egg=jenkins-job-builder
passenv = JENKINS_URL JJB_* CI_NAME HOME XDG_CACHE_HOME
whitelist_externals =
cp
sed
[testenv:jobs]
commands =
jenkins-jobs --version
jenkins-jobs \
--conf conf/jenkins_job.ini.example \
test servers/sandbox-ci:common \
-o {toxinidir}/output/sandbox-ci
[testenv:update]
commands =
cp {toxinidir}/conf/jenkins_job.ini.example {toxinidir}/conf/jenkins_job.ini~
sed -i "s|^url=.*|url={env:JENKINS_URL:unknown}|" {toxinidir}/conf/jenkins_job.ini~
jenkins-jobs --version
jenkins-jobs \
--conf {toxinidir}/conf/jenkins_job.ini~ \
update \
--jobs-only \
servers/sandbox-ci:common {posargs}
[testenv:compare-xml-old]
commands =
jenkins-jobs --version
jenkins-jobs \
--conf conf/jenkins_job.ini.example \
test \
servers/sandbox-ci:common \
-o {toxinidir}/output/sandbox-ci/old
[testenv:compare-xml-new]
commands =
jenkins-jobs --version
jenkins-jobs \
--conf conf/jenkins_job.ini.example \
test \
servers/sandbox-ci:common \
-o {toxinidir}/output/sandbox-ci/new
[testenv:delete]
commands =
cp {toxinidir}/conf/jenkins_job.ini.example {toxinidir}/conf/jenkins_job.ini~
sed -i "s|^url=.*|url={env:JENKINS_URL:unknown}|" {toxinidir}/conf/jenkins_job.ini~
jenkins-jobs --version
jenkins-jobs \
--conf {toxinidir}/conf/jenkins_job.ini~ \
delete \
--jobs-only \
{posargs}