jenkins version in jenkins charm

Steve Powell spowell at gopivotal.com
Fri Jan 10 13:52:59 UTC 2014


On 10 Jan 2014, at 12:56, Richard Harding <rick.harding at canonical.com> wrote:
> Steve, I believe that changing the release changes the source updates are
> fetched from during the normal apt-get install/upgrade process. It does not
> actually perform the upgrade itself.
…
> If you do want to get dirty with the charm implementation the work that
> handles the release updates is part of the install hook in the charm [2].
> You can find the source for it here [3] and see that it's just doing an
> apt-get install. Not an upgrade.

Thank you Richard.

Looking at the hook code [1] you sent me, I see that the setup_source() function is called from lines 41ff:
# Only setup the source if jenkins is not already installed
# this makes the config 'release' immutable - i.e. you 
# can change source once deployed
[[ -d /var/lib/jenkins ]] || setup_source
which implies that after the first deploy, this has absolutely no effect.  Note that one of the commands in the function is:
  apt-get update || true
Which is what synchronises the indexes.  So this is not repeated after deploy.

The apt-get install command issued is here:
  apt-get -y install -qq jenkins
and, IIANM, this will do an upgrade of the jenkins package from the current index. No actual upgrade call is necessary (which would, in any case, do an upgrade of all installed packages).

The update is not called after the initial deploy, and I cannot see how it would ever be.

The comment in line 43 above, is wrong, it should read:
# cannot change source once deployed
(my red).

Is there a way of fixing the charm settings before deploying for the first time, so that I can set the release (source) (and plugins, btw) before the service is initialised?

1. http://bazaar.launchpad.net/~charmers/charms/precise/jenkins/trunk/view/head:/hooks/install#L15

Steve Powell

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju/attachments/20140110/922e0a39/attachment-0001.html>


More information about the Juju mailing list