Commit Graph

155 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
Chandan Kumar 34cb52dfd2
Include whitebox-neutron-tempest-plugin under branchless project
Change-Id: Ifb2e0ec421a9213c4ec10fe652b1e1d95c563e1e
Signed-off-by: Chandan Kumar <chkumar@redhat.com>
2023-07-21 15:49:52 +05:30
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
Sandeep Yadav c0d26337a2 Add var for distro in versions_url
`use_upstream_spec` is set to true in downstream case refer [1],
If we use upstream spec we should correctly set distro.

Removing hardcoded version 8 with this patch, as this is causing
issue in downstream:
~~~
404 Client Error: Not Found for url:
https://trunk.rdoproject.org/centos8-zed/current/versions.csv
~~~

[1] https://review.opendev.org/c/openstack/tripleo-quickstart-extras/+/873218/1/roles/build-test-packages/templates/projects.ini.j2#42

Depends-On: https://review.opendev.org/c/openstack/tripleo-quickstart/+/873213
Change-Id: I916d25e8b39e4106a21a503b946dc719675e29bc
2023-02-09 09:48:04 +05:30
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
Jiri Podivin b95f8023c0 Propagating branch_override variable into DLRN build role
The role was previously set to handle only branch names directly received from
Zuul or preset default. This could lead to role checking out incorrect distgit
repos in cases when the name of the branch in upstream repo differs significantly
from that in the distgit repo.

This change will allow per job override of the behavior, using the 'branch_override' var.

Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
Change-Id: I3c6a8612de60b201b9f4ac1070f52d4debe37eb5
2022-05-25 06:34:25 +00:00
Sandeep Yadav 0c2be73411 Add diskimage-builder in artg_branchless_projects
Some repositories don't have branches, using only master.
We need still to build them in stable branches.

Added diskimage-builder to branchless projects list.

Change-Id: I9335371f6f096c37e5ce5c2cd9888315a6e590a3
2022-05-09 11:09:59 +05:30
Chandan Kumar (raukadah) 20edf29f8a Remove reference of Mitaka from built-test-packages
mitaka release had gone EOL long time ago. So removing
its reference from build-test-packages.

Signed-off-by: Chandan Kumar (raukadah) <chkumar@redhat.com>
Change-Id: I10b43b9d30e10060bceaaac7501616de1817cd39
2022-04-18 12:52:38 +05:30
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
Zuul 0015b09012 Merge "Add SSL verification for DLRN actions" 2022-02-16 14:36:32 +00:00
Daniel Pawlik c8f69bf599 Add SSL verification for DLRN actions
In downstream build-test-packages is failing on Task
: Run DLRN because with [SSL: CERTIFICATE_VERIFY_FAILED]

Exporting correct cert before running DLRN actions for downstream case
based on condition if OS is rhel.

Change-Id: I7c27d21a565b5672d0a455f55c9a7f4a4231c1d6
2022-02-16 13:52:52 +05:30
Rafael Castillo e46b0b9e22 Avoid using git -C
The git version that ships with centos 7 does not support the -C flag.
This patch works around it's usage in the dlrn-build.yml playbook

Closes-Bug: #1960973
Change-Id: Iae6cdfa82fe68ff0de1da789378845950d70f03e
2022-02-15 17:19:46 -07:00
Zuul d261f1e4cf Merge "Allow dlrn builds from both deploy release and upgrade release" 2022-02-15 16:33:41 +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
Alfredo Moralejo 17c27f754f Use CentOS Stream when dlrn_use_local_mirrors is disabled
Currently, when dlrn_use_local_mirrors parameter is false, target is set
to centos[8|9]. For CS9 that's fine as centos9.cfg is a symlink to
centos9-stream config [1]. However, that's not true for centos8 where it
points to the old CL8 which is now EOL. This patch is setting target to
centos8-stream in that case.

[1] 48c4decf75/scripts

Change-Id: Ib78602d7fb2dd10f1e7ea630d937cc3bfa35b109
2022-02-07 12:49: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 12ee5046ee Install ansible-core in CentOS 9 for github PRs
Change-Id: Icd61c64c744a61fb9731feba6922220c71623543
2022-01-03 08:31:46 +02:00
Zuul e13a68310c Merge "Add print statements for build packages" 2021-12-09 17:08:46 +00:00
Sandeep Yadav a38e97e920 Update versions_url for downstream case
For version_url: We should not track master for all downstream
branches, because when package version difference between
older branch and master, rpm build could get skip.

For example: Faced below in 16.2
~~~
python-networking-ovn not present
in https://trunk.rdoproject.org/centos8-master/current/versions.csv
- skipping.
~~~

Adding release var so that correct upstream branch
versions_url is used.

Change-Id: I4504a8291fc69a42b181b5b09cfc3ecb3351cfa1
2021-12-01 20:03:24 +05:30
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 0e628a984e Add option for RPM spec to build with ansible-core
With Ansible 2.11 we need to build collection packages and it's
not identified as "ansible", but "ansible-core". Let's add
options to build RPM either with Ansible 2.9 or Ansible-Core 2.11.

Change-Id: I0d4de1681ecfd3140cfbf14ec5adab8a9117e60c
2021-10-13 15:48:20 +03:00
Sagi Shnaidman d5032c944c Fix GH PRs build with Ansible install
After I4f9f3f13346761d3dec35844234cb6ae03ad4107 was merged the
build fails because we don't have ansible installed. It was
installed before in undercloud-setup role later.
Install ansible as a dependency for GH PRs building of collections.
Change-Id: I5681fe386a85643365847e27ff4a803ba43a633a
2021-08-16 23:55:35 +03:00
Zuul 6b47287c4a Merge "Add release_numbering & release_minor support" 2021-07-08 02:24:40 +00:00
Sandeep Yadav 4907eec940 Add release_numbering & release_minor support
With this patch we are adding support for release_numbering
& release_minor for downstream.

We will pass these parameters through downstream release config
files, should be transparent for upstream.

• `release_numbering` defines the algorithm used by DLRN to assign
   release numbers to packages.

The release number is created from the current date and the source
repository git hash, and can use different algorithms:

– 0.date.hash if the old method is used: 0.<date>.<hash>
– 0.1.date.hash if the new method is used: 0.1.<date>.<hash>.
This new method provides better compatibility with the Fedora
packaging guidelines.
– minor.date.hash allows you to specify the minor version to be
used, which can be different from 0.
If this release numbering schema is used, the value of minor
will be determined by release_minor.

• `release_minor` only takes place when release_numbering
is set to minor.date.hash. For example, if this value is set to 3,
the release number for all packages will be computed as 3.date.hash.

Change-Id: Ie20ccbcbeed0769202a8408e7bae0465daaa1803
2021-07-07 12:51:55 +05:30
Sagi Shnaidman acbce91d91 Add build for ansible collections in build-test
Add building for 3 other ansible collections we use in TripleO:
  - ansible-collections/community.general
  - ansible-collections/ansible.posix
  - ansible-collections/ansible.netcommon
For each one add RPM spec so we can manage it and not depend on
one in koji.

Change-Id: I3198961a239766c6ac4b8de82336998f499412e1
2021-07-05 14:03:26 +03:00
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
Sandeep Yadav 8ba32ad8e3 build-test-package: Set distro for downstream case
`use_upstream_spec` is set to true in downstream case in [1],
If we use upstream spec we should correctly set distro otherwise
rpm-master will be used and rpm build can fail for older branches
because spec is from master.

[1] https://opendev.org/openstack/tripleo-quickstart-extras/src/branch/master/roles/build-test-packages/templates/projects.ini.j2#L34

Change-Id: I27e1589c2ff9f2ca16bb162e0661375c96e095be
2021-06-15 19:43:42 +05:30
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
Chandan Kumar (raukadah) 8754de0abb Make sure /usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT actually exists
Currently when ansible tries to create the dummy file
/usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT so time /usr/share/rhn
dir does not exists leading to failure of task.

In order to fix, we need to make sure directory needs to be present
there and if not, create it and then create the file.

Signed-off-by: Chandan Kumar (raukadah) <chkumar@redhat.com>
Change-Id: I2d66e082594e65d3c3ada8b5511d4a12b4888948
2021-05-06 16:37:48 +05:30
wes hayutin 37109c55aa Revert "Upgrade linters (ansible-lint v5)"
This reverts commit ac93fbbb47.

Reason for revert: breaks default install path for quickstart

Change-Id: I7d513d1bffdfd4293f199c38216ceb00343e06c5
2021-03-12 17:50:42 +00:00
Sorin Sbarnea ac93fbbb47 Upgrade linters (ansible-lint v5)
Change-Id: I75562efd62fff9739d32f8b1b92e7826120e9d1a
2021-03-11 13:48:54 +00:00
Sagi Shnaidman ae172b9792 Add containers/podman to ignore by DLRN for build
We don't build podman using DLRN, so it should be ignored by this
role.
Change-Id: I512c74de73dceb0aa769afa2273348d7d6b089e5
2021-02-23 17:26:07 +02:00
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
Sandeep Yadav e86f82b9a0 Generalize vars in template file in build-test-packages role
With this patch we are generalizing vars in template file to take care
of differenet osp_release naming conventions we currently have in 
downstream:-

For 17:- osp_release: rhos-17
For 16.2:- osp_release: rhos-16.2

We have plans to switch 17 osp_release to numbered in downstream from
osp_release: rhos-17 --> osp_release: rhos-17.0 in near future so that
these kind of changes are not required. 
But as osp_release for 17 is in multiple places, For now we are going 
ahead with this change to make both versions working.

Change-Id: I101d1d938862785ec7afc5d5a7c97ad2f1e78c04
2020-08-18 07:27:40 +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
Sandeep Yadav abbad5ab90 Update build-test-packages to support c8 train
With this patch we are updating the build test packages role to
support centos8 train component pipeline.

We moved away from OS to release based conditional in patch[1]
but earlier Train runs on C7 only.

We are reintroducing OS conditional and removing release conditional
as its not needed anymore, all C8 based repos are component based and
all C7 based repos runs on old non-component pipelines.

[1] https://review.opendev.org/#/c/726919/
Story: https://tree.taiga.io/project/tripleo-ci-board/task/1837

Change-Id: I04c463fa5c897034bc118ba62e69bed176242d3e
2020-06-26 14:09:30 +05:30
Wes Hayutin 2d046a1be6 fix AGAIN, when to use components.. use release
queens, rocky, stein, train atm do not use
components in dlrn.

Change-Id: I575974cec974bd8d32f24f447950fdbb9677d03b
2020-05-11 12:00:33 -06: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
wes hayutin b919f0dd84 Revert "Disable build of validations"
This reverts commit cc71de4c41.

Depends-On: https://review.opendev.org/#/c/723529/
Change-Id: Ic899ccb0241fe382173dafb0700932c62cec7254
2020-04-28 14:38:10 +00:00
Zuul 1bb0618e63 Merge "Ensure loop devices created by DLRN get's cleaned up" 2020-04-26 08:41:18 +00:00
Sagi Shnaidman c8e3f5df27 Disable build of testproject
Change-Id: Ib383b43d7d59f105797a783ecd793816ce201f36
2020-04-23 23:19:21 +03:00
Sagi Shnaidman cc71de4c41 Disable build of validations
Validations build always fail on tests discovery
Related-Bug: #1874535

Change-Id: I2f398463b18d1fff53ba774a538a7e9879f989c0
2020-04-23 23:18:06 +03:00