When freezing a job tree for a change, we apply each matching
job definition in order to create the final, frozen version of
the job for the change. We would do this even if no jobs other
than the one defined in the project-pipeline job tree matched.
This would mean that a job whose global definition had a
restriction such as irrelevant-files, skip-if, or branch might
be run desipite that restriction if the entry in the
project-pipeline job tree for that job did not include a similar
restriction. Those entries are meant to modify jobs defined
elsewhere (possibly adding restrictions of their own) but are not
intended to *broaden* existing jobs, or even fully define them.
To correct this, ensure that the change matches not only the
entry in the project-pipeline job tree, but also at least one
globally defined variant of the job in question.
Change-Id: I36585b8cacfe3c20260dc754a6f246842cb0fdc8
Story: 2000804
Task: 3387
In all cases, the launcher-merger updates the repos involved in a
job before running it. If there are pre-merge changes, it then
merges those changes into the repos. If the job does not involve
pre-merge changes, then nothing further needs to happen. Avoid
attempting to merge changes which are already merged in this case.
Change-Id: Ie0c0d258b4edad4afc3b569f8ea222523bc769c1
This re-enables test_success_pattern. This job parameter has been renamed to
success-url and the test has been reworked and renamed accordingly.
Change-Id: I4ef00923ed916d08e4edb3a24fcb2e25bca823b0
Story: 2000773
Task: 3380
So that we can minimize the special casing of the internal 'noop'
job, automatically instantiate it in each layout.
Change-Id: Iee4111e481bd604f56c7791f3c35fd30e9741528
This requires some updating of how merger data construction gets
handled between Refs and Changes.
Change-Id: Icd81a95565ab137b98d6a8ac52e262487d412534
Story: 2000773
Task: 3389
Re-enable the requirement-email layout tests that ensure a specific user
within a user with a specific email approved a change.
Change-Id: Ic94ff3570fd88fa7293b399b2d686941fe85d687
Re-enable the requirement-username layout tests that ensure a specific
user or regex approved a test.
Change-Id: Idbe86bbb79977c3678c82c7e38f4dfe74b746088
Re-enable the requirement-older-than tests that ensure a specific user has had
an approve for a certain amount of time.
Change-Id: Id733f824311bbc752251d0f6406f49917c23bc13
Re-enable the requirement-newer-than layout tests that ensure a specific
user within a specific time approved a request.
Change-Id: I8ae870257db06e3e9958e151bcf4791c87f4ec71
Skip individual tests in test_requirements rather than the whole class
so we can start activating them.
Change-Id: Ie00e15fcc96509b9f6f90a2cea23ad8a805f8199
This includes forward-porting changes to launcher/server.py with the
exception of the pre/post playbooks changes which will be done in a
follow up commit as they have deviated.
Change-Id: I13aa229c1460b748745babe178c0a745e52f841c
We have decided to rename the 'password' auth to 'secrets' on the
zuulv3 spec.
The idea is that we will both encrypt the user and password using
PKCS1, also allowing to have more than one secrets.
This change modifies the model to meet new spec requirements.
Change-Id: Ief78ac27732f30b17d7995a3e2032e33e7979ca9
Skip-if has been removed in favor of irrelevant-files and the branch
matchers. This refactors the tests that used to be used for skip-if to
cover irrelevant-files.
There may still be need to cover the other types of matchers.
The 'test_parse_skip_if' has just been removed as it wasn't really
covering anything not also covered by the functional tests.
Change-Id: I3a4080426c4dc680ed656e18f26597e3d1b7d759
Story: 2000773
Task: 3378
This ensures the state of the queue, not the builds, so we cannot use
FakeBuild.hasChanges. This is unique, so there doesn't seem to be any
need to genericize the operation.
Change-Id: I13532f4038170ac4539f1d0131dd4a06e6ffd8ac
Story: 2000773
Task: 3377
There is a bug (https://github.com/ansible/ansible/issues/18281) in the
ansible synchronize module that causes any retry attempt at
synchronizing to fail because the paths get munged resulting in invalid
paths. Unfortunately this also means that the error message we get is
not for the first failed sync attempt but for the last making it hard to
debug why things failed in the first place.
Address this by not attempting to retry until ansible is fixed. This way
we get accurate error messages more quickly (as we don't retry over and
over and generate a bad error message at the end).
Change-Id: I545c44b11f37576edc8768a3ed78962ff870995f
In re-enabling test_zuul_refs and refactoring it to use
FakeBuild.hasChanges, a weakness was discovered in hasChanges where it
would not check the repositories of all the changes one is looking for.
After fixing that, the test passes and others should be able to be
refactored in the same way.
Change-Id: Iaf647412d2518c079c8b42ed670919f4e8ca0b63
Story: 2000773
Task: 3296
Now that zuul is supports multi tenants, we need to update our json
too. Also enable unit tests for it too.
Change-Id: I8dbac9090aab705aa32d4af3c9995b37e96174b6
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
Add support for tenants in _areAllBuildsComplete().
Story: #2000773
Change-Id: Ie93cb79cc75405bb90cf4d1bae5e0fb00214b975
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
Create the 'mp' branch for org/project2, since we no longer create
them in init_repo().
Change-Id: I33eb0cd843a9cf8df385b2ecd4f44ec5adc70e34
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This one was a little tricky, we needed to add
hold_jobs_in_build = True to the test so we can access the jobdir.
This is so we can get access to the git repos, each job creates now.
Change-Id: I53c2f6fec8d9d04aa11a8cc13ec5f89a28e4997c
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
We also had to update the test_independent_queues test to reflect the
changes made to the layout file.
Story: #2000773
Change-Id: I4755776c1badfdbb669a97747a4ceaccde7ffa2b
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
We need to pass the project name to self.getJobFromHistory() since
project-merge runs on multiple jobs now.
Change-Id: If999452dcde9c1f2750188e4bff559b2ee6257e8
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
Update the unit test to use the new tenant_config_file for zuulv3.
Change-Id: I5fc2f56647b3e6e05f68607c584d8f594f24aeee
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
Since it is possible for createJobTree() to have an unknown project,
we need to properly hand that for project_configs().
Change-Id: I29f10110027c24e9a47a371a3b608262137d5b60
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This required switching to the new getJobTreeForJob() function to find
the job.
Change-Id: I3e918b88e27f1174879f1d47d36ffcf492b9208a
Signed-off-by: Paul Belanger <pabelanger@redhat.com>