Merge lp:~caio1982/charms/trusty/jenkins/trunk into lp:charms/trusty/jenkins

Proposed by Caio Begotti
Status: Merged
Merged at revision: 33
Proposed branch: lp:~caio1982/charms/trusty/jenkins/trunk
Merge into: lp:charms/trusty/jenkins
Diff against target: 27 lines (+12/-0)
2 files modified
hooks/api-relation-changed (+9/-0)
metadata.yaml (+3/-0)
To merge this branch: bzr merge lp:~caio1982/charms/trusty/jenkins/trunk
Reviewer Review Type Date Requested Status
Marco Ceppi (community) Approve
Review Queue (community) automated testing Needs Fixing
Review via email: mp+242803@code.launchpad.net

Description of the change

This is a fix for https://bugs.launchpad.net/capomastro/+bug/1387601

The idea is having the necessary variables set in the relation so services which know how to talk to Jenkins via its API can easily do so without changing the charm by branching it locally. The change is in fact quite small but helpful.

We've been using this API relation in lp:capomastro for some time now, it's a major charm component for our deployments of build services at Canonical and we believe this can benefit more users :-)

To post a comment you must log in.
Revision history for this message
Review Queue (review-queue) wrote :

This items has failed automated testing! Results available here http://reports.vapour.ws/charm-tests/charm-bundle-test-10468-results

review: Needs Fixing (automated testing)
Revision history for this message
Caio Begotti (caio1982) wrote :

Hey hello there Marco! I'm not sure I understand how to interpret these
test results. I mean, I haven't touch the master relation so I wonder why
it failed? Also, we don't use Jenkins on Precise in the PES team, so I
can't vouch for this test. What exactly I should do?

Cheers!

On Fri, Nov 28, 2014 at 2:32 PM, Review Queue <
<email address hidden>> wrote:

> Review: Needs Fixing automated testing
>
> This items has failed automated testing! Results available here
> http://reports.vapour.ws/charm-tests/charm-bundle-test-10468-results
> --
>
> https://code.launchpad.net/~caio1982/charms/trusty/jenkins/trunk/+merge/242803
> You are the owner of lp:~caio1982/charms/trusty/jenkins/trunk.
>

Revision history for this message
Review Queue (review-queue) wrote :

This items has failed automated testing! Results available here http://reports.vapour.ws/charm-tests/charm-bundle-test-10852-results

review: Needs Fixing (automated testing)
Revision history for this message
Marco Ceppi (marcoceppi) wrote :

LGTM, +1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'hooks/api-relation-changed'
2--- hooks/api-relation-changed 1970-01-01 00:00:00 +0000
3+++ hooks/api-relation-changed 2014-11-25 16:16:16 +0000
4@@ -0,0 +1,9 @@
5+#!/bin/bash
6+
7+set -ue
8+
9+juju-log "Updating API interface with up-to-date Jenkins information."
10+
11+relation-set admin_username="$(config-get username)" \
12+ admin_password="$(config-get password)" \
13+ jenkins_url="http://$(unit-get private-address):8080" \
14
15=== modified file 'metadata.yaml'
16--- metadata.yaml 2014-01-24 21:48:52 +0000
17+++ metadata.yaml 2014-11-25 16:16:16 +0000
18@@ -21,6 +21,9 @@
19 interface: jenkins-extension
20 scope: container
21 optional: true
22+ api:
23+ interface: jenkins-api
24+ optional: true
25 requires:
26 master:
27 interface: jenkins-slave

Subscribers

People subscribed via source and target branches

to all changes: