The only thing that appears to be missing to support bionic is that juju
is no longer in the Ubuntu archive for bionic - it has moved to a snap.
Switching to the snap will take some work. snap binaries don't work when
$HOME isn't under /home, which is the case for the jenkins user
(HOME=/var/lib/jenkins). Fixing - or even working around that - turns out
to be complicated. For now, pull it from the stable PPA, which appears to
be kept up-to-date.
We do have the same tests in both labs: tremont and 1ss.
All jobs are using the same template, e.g. they need
juju-deploy-ubuntu and destroy-model, we just need to change 2 words:
the machine tag (from MAAS) and the test name:
"python3 $SCALEBOT_REPO/tests/juju-deploy-ubuntu.py -s xenial -t
scalebot,gigabyte" or
"python3 $SCALEBOT_REPO/tests/juju-deploy-ubuntu.py -s xenial -t
scalebot,crb1s" and
"$SCALEBOT_REPO/tests/kerneltest/kerneltest-jujuclient.py"
To avoid copy and paste the same .yaml with almost the same content, we
can start to use jenkins macros and then job-templates in scalelebot repo.
Many of the actions of a job can be defined as a 'macro', and then used in the
job description. e.g.: builders. Builders define actions that jenkins job
should execute and can be defined as a macro.
This way we can use the same builders in both labs and also in jobs
files.
To get 'macros option' in scalebot we need to reflect it in scalebot-jenkins.
'jobsync.py' file is responsable to update the jobs from scalebot directory.
This way it will check the common/global configuration while
updating/creating job(s).
update juju layer-basic to use python_packages option
Delete wheelhouse.txt file to avoid compilation when building the charm.
We are not able to build the charm using wheelhouse file. It fails.
So, adding the packages to the new juju layer-basic option: 'python_packages'.
This way the packages will be installed during bootstrap process.
Added the dependencies of python_packages (basic - packages)
Also, pinning python-jenkins to version 0.4.15 because:
- it's a jenkins-job-builder's requirement
"python-jenkins>=0.4.15 (from jenkins-job-builder)"
- jenkins charm installs this version: "Name: python-jenkins, Version: 0.4.15"
- jenkins charm is still using wheelhouse file: "python-jenkins>=0.4.13"
- otherwise, scalebot fails to establish a connection with jenkins while
running extension-relation-changed hook.
Jenkins charm doesn't have bionic support, so we cannot test bionic on
scalebot-jenkins (it is subordinate).
I tested bionic on jenkins charm, but it failed during installing phase,
we'll need more time to debug jenkins issues before adding bionic.
I also re-tested jenkins on xenial and it deployed ok.