Merge lp://staging/~canonical-ci-engineering/charms/precise/ubuntu-ci-services-itself/lander-fix-job-input into lp://staging/~canonical-ci-engineering/charms/precise/ubuntu-ci-services-itself/lander

Proposed by Francis Ginther
Status: Merged
Approved by: Francis Ginther
Approved revision: 23
Merged at revision: 22
Proposed branch: lp://staging/~canonical-ci-engineering/charms/precise/ubuntu-ci-services-itself/lander-fix-job-input
Merge into: lp://staging/~canonical-ci-engineering/charms/precise/ubuntu-ci-services-itself/lander
Diff against target: 901 lines (+368/-323)
9 files modified
config.yaml (+16/-0)
hooks/config-changed (+13/-0)
templates/jobs/lander_archiver.xml (+7/-2)
templates/jobs/lander_branch_source_builder.xml (+9/-7)
templates/jobs/lander_image_builder.xml (+9/-7)
templates/jobs/lander_master.xml (+287/-286)
templates/jobs/lander_ppa_assigner.xml (+9/-7)
templates/jobs/lander_publisher.xml (+9/-7)
templates/jobs/lander_test_runner.xml (+9/-7)
To merge this branch: bzr merge lp://staging/~canonical-ci-engineering/charms/precise/ubuntu-ci-services-itself/lander-fix-job-input
Reviewer Review Type Date Requested Status
Francis Ginther Needs Resubmitting
Andy Doan (community) Approve
Review via email: mp+200721@code.staging.launchpad.net

Commit message

Fix jenkins jobs so that the accumulated json data is passed as a job parameter, update lander_archiver to work with updated script.

The lander_archiver job parameters have been updated to work with https://code.launchpad.net/~fginther/ubuntu-ci-services-itself/lander-archiver/+merge/200438

Description of the change

Fix jenkins jobs so that the accumulated json data is passed as a job parameter, update lander_archiver to work with updated script.

To post a comment you must log in.
Revision history for this message
Andy Doan (doanac) wrote :

LGTM. i'll work on rebasing my stuff on it.

review: Approve
Revision history for this message
Andy Doan (doanac) wrote :

i think this is still broke. I see something in master.xml:

# Convert to a format that can be passed to the child jobs
all_params=`cat all.json`
cat > child.json <<EOF
request_parameters=$all_params
EOF

That won't generate valid JSON. You also seem to call:

 request_parameters=$(echo $request_parameters | sed -e 's/^"//' -e 's/"$//')

two times - I don't see why?

Another thing that would make this easier: use CDATA in the command XML elements so we don't have all this " stuff

Revision history for this message
Vincent Ladeuil (vila) wrote :

> i think this is still broke. I see something in master.xml:
>
> # Convert to a format that can be passed to the child jobs
> all_params=`cat all.json`
> cat > child.json <<EOF
> request_parameters=$all_params
> EOF
>
> That won't generate valid JSON. You also seem to call:
>
> request_parameters=$(echo $request_parameters | sed -e
> 's/^"//' -e 's/"$//')
>
> two times - I don't see why?
>
> Another thing that would make this easier: use CDATA in the command XML
> elements so we don't have all this " stuff

I agree the " stuff is hard to read.

Can't we have an external job instead to reduce the xml itself ?

That would make the whole stuff easier to test too.

I realize that the initial idea was to make it simpler to create jenkins
jobs but the downsides weigth seem to have increased enough to ruin that
initial ease.

23. By Francis Ginther

Wrap jenkins job scripts in CDATA, fix child.json file format and add config parameters to setup datastore_config.yaml.

Revision history for this message
Andy Doan (doanac) wrote :

Its awfully hard to review a jenkins job, but I think this looks like what I was wanting. I say merge it. Any issues I encounter can be fixed when I wire up the ppa-assigner and branch-source-builder.

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

Alrighty. Andy and Vincent,

I've wrapped the jenkins scripts in CDATA (I wish would have defaulted to this behavior, but oh well).

Also, the parameter passing from one child job to the next was broken because I foolishly developed my solution on my workstation which has a newer version of the jenkin's Parameterized Trigger Plugin and behaved differently. The parameters are now being passed by specifying the jenkins parameters via a json file. This now works for me, if it works for Andy I'll refine to trim the excess xml.

The specification of the datastore parameters is not required to make it all work and I'm looking for a better solution to specify these. If the parameters are missing, the lander_archive job will fail to work, but all this does is copy files to the data store. The lander workflow will continue to execute.

review: Needs Resubmitting

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: