~aittner/charms/+source/scalebot-jenkins:add-libmaas-dependency-in-charm

Last commit made on 2019-11-25
Get this branch:
git clone -b add-libmaas-dependency-in-charm https://git.launchpad.net/~aittner/charms/+source/scalebot-jenkins
Only Alexandre Erwin Ittner can upload to this branch. If you are Alexandre Erwin Ittner please log in for upload directions.

Branch merges

Branch information

Name:
add-libmaas-dependency-in-charm
Repository:
lp:~aittner/charms/+source/scalebot-jenkins

Recent commits

761d7f1... by Alexandre Erwin Ittner

Add dependency for libmaas

9694736... by dann frazier

README.devel: Update built charm path

charm-tools changed where it outputs built charms sometime ago.

1c51385... by dann frazier

Rename 'mkjobs' hook to 'refresh'

mkjobs implies what it does, not when it does it. There are other things
a user might want to do after refreshing a repo - e.g. installing new
dependencies. Make the naming more reflective of that.

3d79ac1... by dann frazier

Add a scalebot_production config

This simply sets an environment variable for tests to determine whether
they are in a production environment or not. What that means is really
up to an individual deployment. Our need, for example, is that we have
a "test" that just frees up nodes in the lab. We only want the production
environment doing that.

a01bbfa... by dann frazier

Call refreshjobs action script when doing initial jenkins job import

Eliminates duplicate code, and also allows the mkjobs hook to be called
during initial import. It will cause a git pull to happen right after
the initial clone - likely a no-op, but adds a bit of overhead.

53838ef... by dann frazier

Add 'mkjobs' hook for scalebot config repos

I have a scalebot config repo where I need to generate jenkins job
yaml dynamically. Add a generic hook I can use to do so.

31aeb53... by dann frazier

Remove the /var/lib/jenkins/updatejobs trigger

Now that we've a suitable (and working!) replacement in place, get rid
of the @when_file_changed trigger.

Existing Scalebot config repos with jobs that make use of this trigger
will need to be updated. Though, AFAICT, those jobs don't work today
anyway. I tried watching juju debug-log while making changes to the
/var/lib/jenkins/updatejobs file, but I didn't see anything happen.

be25cbd... by dann frazier

Make 'refreshjobs' action just a small wrapper around pull-and-reload-jobs

Instead of relying on the @when_file_changed('/var/lib/jenkins/updatejobs')
hack, lets make the action synchronous by having it run pull-and-reload-jobs
directly.

c6b9fa4... by dann frazier

Introduce bin/pull-and-reload-jobs

Now that
 - The git config contains everything we need to do a pull
 - The necessary commands are in a predictable place
 - The jobset is available outside of charm context

We can create a simple shell script to refresh git and update jobs.

7cc3a82... by dann frazier

Make jobsync.py available to jenkins user in predictable path

We want a jenkins jobs to be able to update jobs directly, so we need
the jenkins user to be able to find the jobsync.py script. In charm
context, we know it lives under $JUJU_CHARM_DIR, but $JUJU_CHARM_DIR
isn't set outside of charm context. So, let's put move jobsync.py
into a "bin" directory in the charm and symlink that into
$SCALEBOT_HOME, which is now exported system-wide.