Some jobs[1] are not working with current awk command to get
a substring from rdopkg output. This patch replaces with ansible
regex_search instead.
This patch also fix the 'host' value extract from zuul vars. The
previous value is invalid as host when cloning code with git module.
This git checkout isn't failing since the previous step, that copies
cloned code from zuul working dir is always executed with success.
[1] https://logserver.rdoproject.org/46/46046/26/check/periodic-tripleo-ci-build-containers-ubi-9-quay-push-wallaby/1cc4376/job-output.txt
Change-Id: I5efc6adf0c8039f6a618b3ae1e1e8184304465d1
This reverts commit 8226fa9a25.
Reason for revert: rdopkg-1.5.1 has been pushed to pypi where rpmlint is not longer a install mandatory requirement but only optional for rdopkg[lint].
Change-Id: I3f4a7f90295e30bf32fd8bd6196d5135e44c34c1
Latest release of rdopkg (1.5.0) with
error: metadata-generation-failed and is blocking the whole
CI.
We are currently pinning rdopkg to older version till we fix
the rdopkg or install rdopkg from RPM.
Related-Bug: #1993343
Signed-off-by: Chandan Kumar (raukadah) <chkumar@redhat.com>
Change-Id: I3382ead6eafe8a77b9b874ca7a22d4266851e3ac
Previously, artg_change_list in role build-test-packages would default
to an empty list if not defined. Now, artg_change_list will default to
job.artg_change_list which itself defaults to empty list. This allows
us to specify variable artg_change_list in Zuul jobs. If role
build-test-packages is executed locally, then a locally defined
artg_change_list still has higher precedence, as expected.
Previously, if a change had e.g. a 'Depends-On:' statement in its
commit message, the artg_change_list variable would be overwritten
with patches defined in the 'Depends-On:' statements. Now, patches
listed in 'Depends-On:' will be added to the artg_change_list
variable instead of overwriting its contents.
Both functionality is required in our TripleO jobs in the Ansible
OpenStack collection. There we want to build the RPM of
openstacksdk from its upstream master branch instead of using the
pinned version provided by RDO [1].
[1] f482a6ecc4/tags/zed-uc.yml (L467)
Change-Id: If44fe00bda10faa61df1dff9dc6da2ea26aa6b59
This explicitly removes the extras-common repo from being
included by build-test-packages role for the dlrn build.
See related-bug for more information
Related-Bug: 1967012
Change-Id: Iec7c3baad8ddffe692bd3317aa1753d6241b8203
DLRN with --local and --dev options uses whatever already checked
out source and distgit[1]. So in order to get packages build for
multiple releases like in upgrade jobs we need to prepare both
source(git clean and git checkout) and distgit(remove it so
DLRN fetches it based on config).
Also use release var to compute what change to build when it's
defined, when not defined use zuul override-checkout or branch.
Additionally add non-cached fact artg_change_list_prep to compute
the changes list as using artg_change_list causes inclusion of
changes from previous run.
[1] https://github.com/softwarefactory-project/DLRN/issues/39
Co-authored-by: Bogdan Dobrelya <bdobreli@redhat.com>
Closes-Bug: #1958995
Change-Id: I1495128dc3087bc728a51cf667a8fb394fe87893
This patch adds any existing centos repos generated from yum-config
into dlrn configuration file.
Change-Id: I325fbc375b632b892de4e456234a60ee81070d5d
Signed-off-by: Douglas Viroel <dviroel@redhat.com>
Some repositories don't have branches, using only master.
We need still build them in stable branches.
Added following branchless projects for now, more can
be added later:
- openstack/octavia-tempest-plugin
- openstack/tempest
- openstack/validations-common
- opnestack/validations-libs
- x/tripleo-ipa
Change-Id: I8e708e88f16f29238c080a6209928d4d8e955e98
Clone and build github change if there is link in commit message:
"github: https://...path_to_github_pr"
Change-Id: I23489d9d166a634cde16a3dadb22113e535d6e56
When running in RDO CI job with PR to github we should have option
to build those PRs as RPMs and install as any other DLRN project.
Add specific case for now for Ansible Podman collection building.
Later will be expanded to other collections as well.
Change-Id: Ie08dfa49ab2a213e35e3208d495a1fcb44593c39
When DLRN tries to clone the spec file using downstream
dist-git server, it uses git+ssh in clone url which requires
host key verification which is not possible in downstream
CI jobs, so replacing git+ssh with git will fix the issue.
Signed-off-by: Chandan Kumar (raukadah) <chkumar@redhat.com>
Change-Id: Ia2853a3c58a65efc4ea244e44707405550f81710
Use python3 to create virtualenv for dlrn, [1][2]
already switched quickstart and toci to use python3 venv.
Also remove contextlib2 hack which was added for python2
virtualenv as part of #1863632 and #1867023.
Since using python3 native venv module let's remove
virtualenv detection and installation tasks.
Related-Bug: #1867023
Related-Bug: #1905386
Related-Bug: #1863632
Change-Id: I72e8586acb0bfd7194fa08c08d849a6073373aff
Ensure that facts are gathered so that
the user and user_dir settings are correct
and not using root.
Closes-Bug: #1895138
Change-Id: I3b44c75ca42579fdaca7559b0991aed9a24eda4f
yum/package operations can occasionally be affected by network glitches,
resulting in false negatives and need for rechecks.
This tries to minimize impact of these by using the same
until/retries/delay approach as is already used for git task.
Change-Id: I781d9e833e5b6d39755b4c4ba376c6aed401343a
It includes:
* parameterize rdoinfo_repo_name
* Use zuul dict to parse zuul changes and remove zuul_deps
ansible plugin as it is no longer needed.
* Added dlrn config template for downstream and should be
enabled only when osp_release is defined.
* Use latest rdopkg
* It also fixes the DLRN installing from source.
* Moves dlrn command to shell script
* Remove deprecated parts of DLRN-0.8.0
* find out zuul dict only when there is a change_url otherwise
ignore it.
https://tree.taiga.io/project/tripleo-ci-board/task/1789
Change-Id: I48bcddbc7693375396a99dc0ee79d32f6e4a4863
Signed-off-by: Chandan Kumar (raukadah) <chkumar@redhat.com>
Sometimes this is failing because contextlib is a installed project.
Adding ignore-installed fix it
Change-Id: I907e94bb431a3665dbd706a2568f353a8ab8f4d3
DLRN with mock-2.2 creates /dev/loop[0-11] devices,
in CI we rely on /dev/loop devices for setting up block
devices, so let's ensure the loop devices get's cleaned up.
Related-Bug: #1872881
Change-Id: I5295fbb45b79a3e2edea2b24fa007fc011549d77
Contextlib2 need to be between 0.5 and 0.6 for queens.
Since upgrade job tries to upgrade from queens to pike, the task were
skipped because the release has change to pike.
Change-Id: Ic692f57c8828e776f49e6c703e50e20d4bc87fe4
Closes-Bug: #1867023
As described in related bug we need to install a particular version
of contextlib2 to fix an issue with very old virtualenv installed.
Installing contextlib2 in this way seems to pull in a new enough
version of virtualenv without causing other dependency issues.
Also add tags: notest to skip molecule testing which makes
tox-molecule job fail, ideally this task shouldn't run except queens
release.
Related-Bug: 1863632
Change-Id: Iff5ed3f7f5196016b6cd807ee9408c204b349498
* based on the ansible_distro and version
set the appropriate build target and
dlrn server.
* set type to -local where appropriate
Change-Id: I74ce4f9ab46de4301309ae6b6fdee54a5ed869a8
rdoinfo is branchless and to test reviews under
non-master branches, we need to treat rdoinfo
specially.
Also use zuul.override_checkout if defined to build
zuul_deps.
Change-Id: I44353e7308d2eab56e986d0f2f6fb3a80a25b227
The zuul change needs to built at the right
time in upgrades. If the change is rocky
and it's a standalone-upgrade job. The change
needs to be built on the appropriate branch
at the right time.
Change-Id: If97dd12ebe994cfed859309653d6fbd2987d2a92
This fixes failures produced when project name
doesn't starts with 'openstack/'
This is intended to unblock the use of tripleo-ci
that is now failing with projects that are not
hosted under the 'openstack/' prefix (like for
example x/tobiko).
Note: removed set -u because this can break source activate on old
versions of virtualenv.
The role should not fail when it fails to find a mapping, so it was
refactored to assured that.
Also assures that the html report of Ansible is colored, making it
easier to read.
Change-Id: Ibb562f818419373700177f3b2e665cd4eb5e32ef
Partial-Bug: #1859167
Partial-Bug: #1858890
- run `pre-commit autoupdate` and fixed new issues
- adopted newer pre-commit config for ansible-lint 4.2.0+
- fixed some reported broken rules
- temporary disabled few rules, just to contain the size of of review,
planning to drop/fix them in follow-ups.
Change-Id: I807ba4e919527be56c85ec72d0f4c7148f04e994
It's possible that GitHub might be having issues during a CI run
which results in the clone failing making the entire job fail.
Given that a failure in cloning can easily be retried with no
consequences, let's do that to avoid failing the entire job.
Change-Id: I8d1bad8d453c61ac113a0bab3529392cbffaf75a
Currently RHUI repos are not added to dlrn mock config leading
to failure in building packages, enabling and adding it fixes the
issue.
Change-Id: I3be1be596d07542d538897f29321db68f153cd46
Signed-off-by: Chandan Kumar (raukadah) <chkumar@redhat.com>
This commit adds a 'become: true' to the 'package' task responsible
for installing virtualenv. Depending on the environment this is
likely required/mandatory.
Additional background: https://review.opendev.org/#/c/656933
Change-Id: Ifc1d56cda2e3b32dedd2dd5637fc5e647dd148cc
Currently inject gating repo is triggered based on
repo_built.skipped. This is wrong as repo_built.skipped
is defined if the last project in the dependency change
is skipped.
This patch fixes it by relying on artg_rdo_packages
variable. So whenever atleast 1 rdo packge is built
inject repo will be triggered.
Related-Bug: #1815744
Change-Id: I3c363c82c12b356e9073289a6912edd878b0f6ab
There might be no blank lines in repofile, which
might corrupt some repos, this adds a blank line
when concatenating multiple repo files.
Change-Id: Id5af3e71c63c13484c4398e57c3e8445a1b0794f
This is required to gate distgit projects with tripleo
jobs[1]. DLRN already builds packages for rpm spec changes,
no need to additionally build using dlrn-build.yml tasks.
[1] https://review.rdoproject.org/r/#/c/18151
Change-Id: Ib86a2e0e6200b00390443fe253abd0c3c0ef775f
Makes those files conformant with current linting rules and avoids
linting errors when we need to toch them again.
Previous doing "pre-commit run -a" uncovered these errors, now is no
longer reporting any other errors.
Change-Id: Ie4cf229c8f11c2b55b323eac23c89483b26d3781
OVB failures due to
- ansible_user variable was used instead of ansible_user_id, the first
one being unreliable as is may only be user defined (or undefined).
- lack of become on tasks that needed it
Fixes problem identified by molecule testing
- lack of idempotence on few tasks
- failure when ansible_user variale was not defined
Change-Id: I11adec7104a59bfa29b00c702eb9b7eb6a5c6766
Depends-On: Iade08ee92d7f48e07a625678d2a1c6ac1cd1982b
Partial-Bug: https://tree.taiga.io/project/tripleo-ci-board/task/358
Closes-Bug: #1802825
Looks like we where using yum at fedora28 job at build-test-packages, we
need to generalize code at build-test-package so it works with fedora
too.
Also install-build-repo was trying to use yum.
Change-Id: I8cea39a9923e23c5f0fceb895a1efe4cb8ec395d
Story: https://tree.taiga.io/project/tripleo-ci-board/task/319?kanban-status=1447275
This reverts commit 2af6e87045.
This includes a fix for the repo_built variable logic
It turns out ansible will always register a variable even if a task is
skipped. In this case, that means we are not properly collecting the
repo since repo_built is skipped in the second declaration. This logic
works fine if artg_build_one is false but not if it is true (the
default)
Change-Id: I1408d9ded18cdacbd1fb5410e70de2ef8104f950
This breaks using the previous method. The new method will register
"repo_built" even if disabled and overwrite the "repo_built" var
from the old method. This results in the packages that were built
never getting installed.
This reverts commit 0e2ca879ee.
Change-Id: Ie21cc0dfed28353a13d419ff38cea82e65166221
By default, we currently loop through the packages to build and build
them one at a time. It is possible to have dlrn handle building all the
packages in a single invocation of dlrn. This patch adds a new variable
to the build-test-packages role called artg_build_one that switches
between these two package building methods.
Change-Id: I98fd6cde44f8e4b693d79fbd5abb77b8636a84c9
In order to run this role on another OS than centos7 we need to be able
to use the package module in ansible and make the centos7 configurations
configurable. This change swaps out the centos designations for
variables so it can be configured.
Change-Id: Id7464886e9dbf18b918562bf7401a813c19d33d5
A new release of rdopkg has broken everything, we need to pin to the
last known good version.
Depends-On: I0b76c432440f78cab8199eb30c0295d53f137659
Change-Id: Ib28f20db0aa1db9f2c5b3cbbdae1c85c97bbeba1
Closes-Bug: #1787244
Currently we have a few possible places for building package in
the job. It requires logic change in order to differentiate
between injection cases.
build-test-packages role can run and not to build anything bc of
various reasons, in this case we need to avoid running
install-built-repo role, that's why we set compressed_gating_repo
to empty string and check in every case if it's empty or not.
If compressed_gating_repo is emptry - we didn't built *last* time
anything, so nothing should run.
Change-Id: Ib19addc66678804abb86f36006fb35f3f1f1d471