Commit Graph

78 Commits

Author SHA1 Message Date
Ghanshyam Mann 72ea117f61 Retire Tripleo: remove repo content
TripleO project is retiring
- https://review.opendev.org/c/openstack/governance/+/905145

this commit remove the content of this project repo

Change-Id: Ic549bdcc76a5e12a0104143fbe79fd0db2c866b0
2024-02-24 11:44:35 -08:00
Douglas Viroel 7c1510421a Replace awk with ansible regex_search on build-test-packages
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
2023-05-17 17:20:07 -03:00
Alfredo Moralejo 32f33f3dac Revert "Pin rdopkg to 1.4.0"
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
2022-10-19 15:34:41 +00:00
Chandan Kumar (raukadah) 8226fa9a25 Pin rdopkg to 1.4.0
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
2022-10-19 09:09:35 +05:30
Jakob Meng ff64ea937c Allow to define artg_change_list variable in zuul jobs
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
2022-07-15 09:08:28 +02:00
Marios Andreou b8f09e0159 Disable extras common for build-test-packages
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
2022-03-30 12:43:10 +00:00
yatinkarel f07c71809d Allow dlrn builds from both deploy release and upgrade release
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
2022-02-11 12:34:00 +01:00
Zuul e253d88512 Merge "Add compose-repos to dlrn config" 2022-01-06 12:02:37 +00:00
Douglas Viroel 9c67668a16 Add compose-repos to dlrn config
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>
2022-01-04 21:37:40 -07:00
Sagi Shnaidman a53f6cf7ee Add print statements for build packages
Change-Id: I110a59dd82c3eb50c19de89c227f3b6e788376ce
2021-11-25 11:52:21 +02:00
Sagi Shnaidman 3877173e15 Build branchless projects with build-tests role
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
2021-11-18 20:18:51 +05:30
Sagi Shnaidman b43654a933 Add github PR change from commit message
Clone and build github change if there is link in commit message:
"github: https://...path_to_github_pr"

Change-Id: I23489d9d166a634cde16a3dadb22113e535d6e56
2021-07-01 10:10:12 +03:00
Sagi Shnaidman 1c108e8534 Add option to build collection github PRs
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
2021-06-28 18:04:29 +03:00
Chandan Kumar (raukadah) a633da7a89 Remove ssh reference from downstream dist-git url
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
2021-05-06 17:19:52 +05:30
Rafael Folco 8cd2e1dd01 Switch to python3 venv by default
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
2021-01-06 17:01:42 +05:30
Sagi Shnaidman 707a7aeca9 Remove DLRN packages.yaml change
Change-Id: I0e0c89ca3161ec17becbcb44905bec02db5a42f8
2020-10-27 14:51:58 +00:00
Wes Hayutin 01bc68dd3a always gather facts in build-test-packages
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
2020-09-18 09:31:11 -06:00
Pavel Sedlák 2bf5c2e60a build-test-packages: retry package installation
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
2020-09-03 14:24:17 +00:00
Chandan Kumar (raukadah) c3a2d81104 Refactor buildtestpackages for downstream purpose
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>
2020-06-30 06:42:56 +00:00
Arx Cruz d66f0b3518 Adding --ignore-installed
Sometimes this is failing because contextlib is a installed project.
Adding ignore-installed fix it

Change-Id: I907e94bb431a3665dbd706a2568f353a8ab8f4d3
2020-05-04 19:12:23 +02:00
yatinkarel c57822580d Ensure loop devices created by DLRN get's cleaned up
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
2020-04-20 17:40:40 +05:30
Arx Cruz ba04f75b44 Fix installation of contextlib2
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
2020-03-12 06:02:52 +00:00
Zuul 404d5638a3 Merge "Handle package builds when testing in rdoinfo" 2020-03-04 01:00:09 +00:00
Zuul 8c7c171f26 Merge "Add explicit contextlib2 0.5<0.6 for queens ancient virtualenv" 2020-03-01 19:26:27 +00:00
Wes Hayutin 260689e24d Add explicit contextlib2 0.5<0.6 for queens ancient virtualenv
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
2020-02-29 14:51:39 +00:00
Wes Hayutin 6179852a9d update build-test-packages for centos-8
* based on the ansible_distro and version
set the appropriate build target and
dlrn server.

* set type to -local where appropriate

Change-Id: I74ce4f9ab46de4301309ae6b6fdee54a5ed869a8
2020-02-26 16:37:22 +05:30
fpantano 6053122a25 Handle package builds when testing in rdoinfo
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
2020-02-03 10:23:59 +05:30
Wes Hayutin 0e3bc48794 add useful debug info for change and builds
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
2020-01-15 11:57:01 -07:00
Sorin Sbarnea 5795847107 Fix project name mapping to DLRN project name (v2)
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
2020-01-11 09:29:02 +00:00
Sorin Sbarnea 16649df878 lint: bumping to latest versions
- 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
2020-01-05 19:36:36 +00:00
Mohammed Naser 8435281809 build-test-packages: add retries for git clones
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
2019-12-16 15:33:15 +00:00
Chandan Kumar (raukadah) 08b28732f6 Copy rh-cloud.repo to RHEL-8 mock config
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>
2019-08-05 15:26:28 +05:30
Luca Miccini d9cf48795f Add become:true to virtualenv installation task
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
2019-05-09 04:23:19 +00:00
yatin c6478adc86 Rely on artg_rdo_packages to inject gating repo
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
2019-04-22 19:40:01 +05:30
OpenDev Sysadmins db85f97e1d OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins
as a part of the Git hosting and code review systems migration
detailed in these mailing list posts:

http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html

Attempts have been made to correct repository namespaces and
hostnames based on simple pattern matching, but it's possible some
were updated incorrectly or missed entirely. Please reach out to us
via the contact information listed at https://opendev.org/ with any
questions you may have.
2019-04-19 19:42:23 +00:00
yatin a803afda29 Add blank line to repo while creating dlrn config
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
2019-04-08 12:11:43 +00:00
yatin 2bc4f29be5 Do not build projects with '-distgit' in project name
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
2019-01-21 12:36:48 +05:30
Sorin Sbarnea cc82349363 Adapt code to newer code style (linters)
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
2018-11-16 12:42:51 +00:00
Sorin Sbarnea 2ded6f1df1 Make build-test-packages more resilient
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
2018-11-14 19:01:46 +00:00
Quique Llorente 5b7e12b826 Use correct package manager at DLRN
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
2018-11-10 12:09:17 +00:00
Sorin Sbarnea 04585eb6f4 Use dnf and python3 on platforms where these are default
Roles do not need to make any assumptions about having some facts
already gathered, thus at start they should assure they gather any
missiong facts that are used inside the role.

Change-Id: I49fd1a0c070d96aecb880164acde490c9e7c95ef
Story: https://tree.taiga.io/project/tripleo-ci-board/task/153
Depends-On: https://review.openstack.org/#/c/615489/
2018-11-05 15:58:33 +00:00
Quique Llorente a8fde94fca Upgrade rdopkg to 0.47.3
To run rdopkg over fedora28 + py3 we need [1] the 0.47.3 includes the
fix

[1] https://softwarefactory-project.io/r/#/c/14080/

Change-Id: Ied5ac9e48980dd4725bcfffbcbad95562f11a0b5
Story: https://tree.taiga.io/project/tripleo-ci-board/task/296?kanban-status=1447276
2018-10-31 15:12:33 +01:00
Quique Llorente 3588ffbb7b Don't install setuptools/pip/virtualenv from RPMs
Openstack infra has them already installed and we are not supose to
install it, for example at fedora the exclude them explitcitly from the
dnf.conf

Change-Id: I3b276e159ff7534777219975995fc20c967d0e42
Store: https://tree.taiga.io/project/tripleo-ci-board/task/248?kanban-status=1447275
2018-10-25 11:54:12 +00:00
Alex Schultz 65384f03fd Revert "Revert "Add ability to have dlrn build all the packages at once""
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
2018-09-18 09:10:31 -06:00
trown 2af6e87045 Revert "Add ability to have dlrn build all the packages at once"
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
2018-09-14 16:58:25 -04:00
Alex Schultz 0e2ca879ee Add ability to have dlrn build all the packages at once
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
2018-09-09 04:01:16 +00:00
Alex Schultz af2691fb36 Update build-test-package for non-centos7
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
2018-09-05 03:10:54 +00:00
Alex Schultz e4cc61a21a Pin rdopkg to 0.46.3
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
2018-08-15 23:05:45 +00:00
wes hayutin b4e000cc6d Revert "Don't trigger repo injection if nothing was built"
This reverts commit 6fd5393cbd.

Closes-Bug: #1781752
Change-Id: I398980184f3c2ae2057b7cc5c56a6a1f42774be0
2018-07-14 23:44:57 +00:00
Sagi Shnaidman 6fd5393cbd Don't trigger repo injection if nothing was built
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
2018-06-20 08:37:00 +00:00