Merge lp://staging/~sinzui/ci-director/generic-jobs into lp://staging/ci-director
Status: | Merged |
---|---|
Merged at revision: | 113 |
Proposed branch: | lp://staging/~sinzui/ci-director/generic-jobs |
Merge into: | lp://staging/ci-director |
Diff against target: |
713 lines (+472/-22) 4 files modified
cidirector/cidirector.py (+146/-5) cidirector/storage.py (+40/-3) cidirector/tests/test_cidirector.py (+199/-5) cidirector/tests/test_storage.py (+87/-9) |
To merge this branch: | bzr merge lp://staging/~sinzui/ci-director/generic-jobs |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Aaron Bentley (community) | Approve | ||
Review via email: mp+226204@code.staging.launchpad.net |
Description of the change
This branch introduces a generic Job class called ResourcefulJob. It can be configured with the job it requires to have succeeded, those it conflicts with, and the failure-threshold. You can also pass a group_name to create a subgroup in the state-file's yaml.
* The get_available_
in the job description. We do extra calls to jenkins to get the description.
* The only difference between maybe_build() and the base class is the job status check
...maybe we want to extract the status check to a helper method.
* I left two comments in ResultJudge.
CIDirector.
co-exist with the current jobs. I don't want to create duplicate jobs when I start
adding configuration to the current jobs.
The StageFile gains to new methods to get and iterate over grouped jobs. These two methods can do the work of all the other specialised methods except for the build-revision (build) job, which I think is too special to replace.
* These methods only work with the current version. I didn't see a need
(from my reading of the code) to support older versions. Maybe you know
of a reason to pass the revision_build?
My hope is to get this branch safe to land. Maybe land a separate branch to solve the XXX problems. I want to add configuration to jobs to convert them to ResourcefulJobs. If config doesn't work. I remove it, fix ci-director, the retry the config. When all the current jobs are converted to ResourcefulJob, I can remove the specific jobs.
The make-binaries- trusty- amd64 might looks like this
[ci-director] packages tests-trusty- amd64
group-name: prepare-release
requires: make-source-
conflicts: run-unit-
failure-threshold: 2
The publish-revision job might looks like this
[ci-director] trusty- amd64 make-binaries- precise- amd64 make-binaries- utopic- amd64 make-binaries- trusty- arm64 make-binaries- trusty- ppc64 make-binaries- trusty- i386
group-name: prepare-release
requires: make-binaries-
failure-threshold: 2