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
=== modified file 'cupstream2distro/settings.py'
--- cupstream2distro/settings.py 2013-10-11 07:31:44 +0000
+++ cupstream2distro/settings.py 2013-11-19 19:29:35 +0000
@@ -65,5 +65,5 @@
65STACK_STARTED_FILENAME = "stack.started"65STACK_STARTED_FILENAME = "stack.started"
66STACK_BUILDING_FILENAME = "stack.building"66STACK_BUILDING_FILENAME = "stack.building"
6767
68STACK_RUNNING_DIR = "/var/lib/jenkins/cu2d/work"68STACK_RUNNING_DIR = "/iSCSI/jenkins/cu2d/work"
69STACK_STATUS_PUBLISHING_DIR = "/var/lib/jenkins/cu2d/result_publishing"69STACK_STATUS_PUBLISHING_DIR = "/iSCSI/jenkins/cu2d/result_publishing"
7070
=== modified file 'latest_autopilot_results'
--- latest_autopilot_results 2013-08-09 09:44:17 +0000
+++ latest_autopilot_results 2013-11-19 19:29:35 +0000
@@ -1,25 +1,27 @@
1#!/bin/sh1#!/bin/sh
22
3if [ $# -lt 2 ]; then3if [ $# -ne 3 ]; then
4 cat>&2 <<EOF4 cat>&2 <<EOF
5usage: $(basename $0) JOBNAME NODENAME5usage: $(basename $0) JENKINSROOT JOBNAME NODENAME
6Returns the path to the junit result file of latest build of autopilot6Returns the path to the junit result file of latest build of autopilot
77
8Arguments:8Arguments:
9 JENKINSROOT : Root of the jenkins directory
9 JOBNAME : Name of the job that runs the check10 JOBNAME : Name of the job that runs the check
10 NODENAME : Name of the jenkins node on which this test has run e.g autopilot-ati11 NODENAME : Name of the jenkins node on which this test has run e.g autopilot-ati
1112
12example:13example:
13 \$ $(basename $0) autopilot-raring-daily_release autopilot-intel14 \$ $(basename $0) /iSCSI/jenkins autopilot-raring-daily_release autopilot-intel
14EOF15EOF
1516
16 exit 117 exit 1
17fi18fi
1819
19JOBNAME=$120JENKINSROOT=$1
20NODENAME=$221JOBNAME=$2
22NODENAME=$3
2123
22BASEDIR=/var/lib/jenkins/jobs24BASEDIR=${JENKINSROOT}/jobs
23SEARCHPATH=${BASEDIR}/${JOBNAME}/configurations/axis-label/${NODENAME}/builds/25SEARCHPATH=${BASEDIR}/${JOBNAME}/configurations/axis-label/${NODENAME}/builds/
24RESULTFILE=junitResult.xml26RESULTFILE=junitResult.xml
25if [ ! -d "$SEARCHPATH" ]; then27if [ ! -d "$SEARCHPATH" ]; then
2628
=== modified file 'stack_status'
--- stack_status 2013-04-12 09:55:15 +0000
+++ stack_status 2013-11-19 19:29:35 +0000
@@ -28,6 +28,7 @@
28import xml.etree.ElementTree as etree28import xml.etree.ElementTree as etree
29import sys29import sys
3030
31JENKINS_ROOT_DEFAULT = '/iSCSI/jenkins'
3132
32class CU2DStackStatus(object):33class CU2DStackStatus(object):
33 ''' This class search the latest results and each step and report the global34 ''' This class search the latest results and each step and report the global
@@ -41,7 +42,7 @@
41 self.stack = self.args.stack42 self.stack = self.args.stack
42 self.release = self.args.release43 self.release = self.args.release
4344
44 self.jenkinsdir = '/var/lib/jenkins'45 self.jenkinsdir = self.args.jenkins_root
45 self.jobs = ('1.0prepare', '2.1build', '2.2check', '3.0publish')46 self.jobs = ('1.0prepare', '2.1build', '2.2check', '3.0publish')
46 self.statuses = ('NA', 'SUCCESS', 'UNSTABLE', 'ABORTED', 'FAILURE')47 self.statuses = ('NA', 'SUCCESS', 'UNSTABLE', 'ABORTED', 'FAILURE')
47 self.jobformat = 'cu2d-{}-{}-{}'48 self.jobformat = 'cu2d-{}-{}-{}'
@@ -62,6 +63,10 @@
62 help='name of the stack')63 help='name of the stack')
63 parser.add_argument('-r', '--release',64 parser.add_argument('-r', '--release',
64 help='name of the release (default: head)')65 help='name of the release (default: head)')
66 parser.add_argument('-j', '--jenkins-root',
67 default=JENKINS_ROOT_DEFAULT,
68 help='jenkins root directory (default: {}'.format(
69 JENKINS_ROOT_DEFAULT)
65 args = parser.parse_args()70 args = parser.parse_args()
66 set_logging(args.debug)71 set_logging(args.debug)
67 logging.debug(args)72 logging.debug(args)

Subscribers

People subscribed via source and target branches