Merge lp:~fginther/cupstream2distro/jenkins-home into lp:cupstream2distro

Proposed by Francis Ginther
Status: Merged
Approved by: Didier Roche-Tolomelli
Approved revision: 405
Merged at revision: 405
Proposed branch: lp:~fginther/cupstream2distro/jenkins-home
Merge into: lp:cupstream2distro
Diff against target: 81 lines (+16/-9)
3 files modified
cupstream2distro/settings.py (+2/-2)
latest_autopilot_results (+8/-6)
stack_status (+6/-1)
To merge this branch: bzr merge lp:~fginther/cupstream2distro/jenkins-home
Reviewer Review Type Date Requested Status
Didier Roche-Tolomelli Approve
Jean-Baptiste Lallement Approve
Review via email: mp+195848@code.launchpad.net

Commit message

Relocate JENKINS_HOME directory, provide CLI options to set.

Description of the change

Relocate JENKINS_HOME directory, provide CLI options to set.

Jenkins provides $JENKINS_HOME as the root of the jenkins FS. Jobs should be referencing this when the jenkins root path is required.

To post a comment you must log in.
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

8 -STACK_RUNNING_DIR = "/var/lib/jenkins/cu2d/work"
9 -STACK_STATUS_PUBLISHING_DIR = "/var/lib/jenkins/cu2d/result_publishing"
10 +STACK_RUNNING_DIR = "/iSCSI/jenkins/cu2d/work"
11 +STACK_STATUS_PUBLISHING_DIR = "/iSCSI/jenkins/cu2d/result_publishing"
Francis: are you sure about those changes?

the stacks run and we were able to publish content, so it means (I ls /var/lib/jenkins/cu2d/work and see latest content here). Can you double check? What's in "/var/lib/jenkins/cu2d/work" then and why does it work with some autopilot tests (like sdk today)

On changing latest_autopilot_results and stack_status, jibel did those scripts, so better to check with him

review: Needs Information
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

You can also update :

cupstream2distro-config/daily-release/jenkins-templates/master-config.xml.tmpl:{{ BINDIR }}/stack_status -s {{ stack }} -r {{ release }}

to pass jenkins root as argument and not rely on the default value.

Otherwise LGTM, thanks!

review: Approve
Revision history for this message
Francis Ginther (fginther) wrote :

> 8 -STACK_RUNNING_DIR = "/var/lib/jenkins/cu2d/work"
> 9 -STACK_STATUS_PUBLISHING_DIR =
> "/var/lib/jenkins/cu2d/result_publishing"
> 10 +STACK_RUNNING_DIR = "/iSCSI/jenkins/cu2d/work"
> 11 +STACK_STATUS_PUBLISHING_DIR = "/iSCSI/jenkins/cu2d/result_publishing"
> Francis: are you sure about those changes?
>
> the stacks run and we were able to publish content, so it means (I ls
> /var/lib/jenkins/cu2d/work and see latest content here). Can you double check?
> What's in "/var/lib/jenkins/cu2d/work" then and why does it work with some
> autopilot tests (like sdk today)
>
>
> On changing latest_autopilot_results and stack_status, jibel did those
> scripts, so better to check with him

So /var/lib/jenkins is there and will be maintained as a backup, but it's not the live data being generated by jenkins. Anything new history here (as jibel mentioned) will need to be updated back to /iSCSI/jenkins when we complete the cut-over.

Revision history for this message
Francis Ginther (fginther) wrote :

> You can also update :
>
> cupstream2distro-config/daily-release/jenkins-templates/master-
> config.xml.tmpl:{{ BINDIR }}/stack_status -s {{ stack }} -r {{ release }}
>
> to pass jenkins root as argument and not rely on the default value.
>
> Otherwise LGTM, thanks!

I've created https://code.launchpad.net/~fginther/cupstream2distro-config/update-stack_status/+merge/195956 to update the callers.

Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

ok, thanks for the infos then!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'cupstream2distro/settings.py'
2--- cupstream2distro/settings.py 2013-10-11 07:31:44 +0000
3+++ cupstream2distro/settings.py 2013-11-19 19:29:35 +0000
4@@ -65,5 +65,5 @@
5 STACK_STARTED_FILENAME = "stack.started"
6 STACK_BUILDING_FILENAME = "stack.building"
7
8-STACK_RUNNING_DIR = "/var/lib/jenkins/cu2d/work"
9-STACK_STATUS_PUBLISHING_DIR = "/var/lib/jenkins/cu2d/result_publishing"
10+STACK_RUNNING_DIR = "/iSCSI/jenkins/cu2d/work"
11+STACK_STATUS_PUBLISHING_DIR = "/iSCSI/jenkins/cu2d/result_publishing"
12
13=== modified file 'latest_autopilot_results'
14--- latest_autopilot_results 2013-08-09 09:44:17 +0000
15+++ latest_autopilot_results 2013-11-19 19:29:35 +0000
16@@ -1,25 +1,27 @@
17 #!/bin/sh
18
19-if [ $# -lt 2 ]; then
20+if [ $# -ne 3 ]; then
21 cat>&2 <<EOF
22-usage: $(basename $0) JOBNAME NODENAME
23+usage: $(basename $0) JENKINSROOT JOBNAME NODENAME
24 Returns the path to the junit result file of latest build of autopilot
25
26 Arguments:
27+ JENKINSROOT : Root of the jenkins directory
28 JOBNAME : Name of the job that runs the check
29 NODENAME : Name of the jenkins node on which this test has run e.g autopilot-ati
30
31 example:
32- \$ $(basename $0) autopilot-raring-daily_release autopilot-intel
33+ \$ $(basename $0) /iSCSI/jenkins autopilot-raring-daily_release autopilot-intel
34 EOF
35
36 exit 1
37 fi
38
39-JOBNAME=$1
40-NODENAME=$2
41+JENKINSROOT=$1
42+JOBNAME=$2
43+NODENAME=$3
44
45-BASEDIR=/var/lib/jenkins/jobs
46+BASEDIR=${JENKINSROOT}/jobs
47 SEARCHPATH=${BASEDIR}/${JOBNAME}/configurations/axis-label/${NODENAME}/builds/
48 RESULTFILE=junitResult.xml
49 if [ ! -d "$SEARCHPATH" ]; then
50
51=== modified file 'stack_status'
52--- stack_status 2013-04-12 09:55:15 +0000
53+++ stack_status 2013-11-19 19:29:35 +0000
54@@ -28,6 +28,7 @@
55 import xml.etree.ElementTree as etree
56 import sys
57
58+JENKINS_ROOT_DEFAULT = '/iSCSI/jenkins'
59
60 class CU2DStackStatus(object):
61 ''' This class search the latest results and each step and report the global
62@@ -41,7 +42,7 @@
63 self.stack = self.args.stack
64 self.release = self.args.release
65
66- self.jenkinsdir = '/var/lib/jenkins'
67+ self.jenkinsdir = self.args.jenkins_root
68 self.jobs = ('1.0prepare', '2.1build', '2.2check', '3.0publish')
69 self.statuses = ('NA', 'SUCCESS', 'UNSTABLE', 'ABORTED', 'FAILURE')
70 self.jobformat = 'cu2d-{}-{}-{}'
71@@ -62,6 +63,10 @@
72 help='name of the stack')
73 parser.add_argument('-r', '--release',
74 help='name of the release (default: head)')
75+ parser.add_argument('-j', '--jenkins-root',
76+ default=JENKINS_ROOT_DEFAULT,
77+ help='jenkins root directory (default: {}'.format(
78+ JENKINS_ROOT_DEFAULT)
79 args = parser.parse_args()
80 set_logging(args.debug)
81 logging.debug(args)

Subscribers

People subscribed via source and target branches