Browse Source

Replace deprecated bindep-fallback testing

Adopts testing using in-repo bindep.txt testing file instead of
using the deprecated externally hosted bindep-fallback.txt file.

Initial file is the same but in the future we may want to simplify it.

Change-Id: I570fe8686068478a163e4fe597514460b6a69fef
changes/63/636163/5
Sorin Sbarnea 3 months ago
parent
commit
2152331ebf
4 changed files with 150 additions and 35 deletions
  1. 26
    26
      .zuul.yaml
  2. 5
    6
      README.rst
  3. 115
    0
      bindep/tests/bindep.txt
  4. 4
    3
      playbooks/bindep/run.yaml

+ 26
- 26
.zuul.yaml View File

@@ -1,52 +1,52 @@
1 1
 - job:
2
-    name: bindep-fallback
2
+    name: bindep-base
3 3
     description: |
4
-      Check that bindep can install packages from
5
-      openstack-infra/project-config/nodepool/elements/bindep-fallback.txt.
4
+      Check that bindep itself can install packages on various platforms.
5
+    abstract: true
6 6
     roles:
7 7
       - zuul: openstack-infra/zuul-jobs
8
-    run: playbooks/bindep-fallback/run.yaml
8
+    run: playbooks/bindep/run.yaml
9 9
     vars:
10 10
       zuul_work_dir: '{{ zuul.project.src_dir }}'
11 11
       zuul_work_virtualenv: '{{ ansible_user_dir }}/.venv'
12 12
 
13 13
 - job:
14
-    name: bindep-fallback-centos-7
15
-    parent: bindep-fallback
14
+    name: bindep-centos-7
15
+    parent: bindep-base
16 16
     nodeset: centos-7
17 17
 
18 18
 - job:
19
-    name: bindep-fallback-opensuse-423
20
-    parent: bindep-fallback
21
-    nodeset: opensuse-423
19
+    name: bindep-opensuse-150
20
+    parent: bindep-base
21
+    nodeset: opensuse-150
22 22
 
23 23
 - job:
24
-    name: bindep-fallback-opensuse-150
25
-    parent: bindep-fallback
26
-    nodeset: opensuse-150
24
+    name: bindep-opensuse-423
25
+    parent: bindep-base
26
+    nodeset: opensuse-423
27 27
 
28 28
 - job:
29
-    name: bindep-fallback-ubuntu-trusty
30
-    parent: bindep-fallback
29
+    name: bindep-ubuntu-trusty
30
+    parent: bindep-base
31 31
     nodeset: ubuntu-trusty
32 32
 
33 33
 - job:
34
-    name: bindep-fallback-ubuntu-xenial
35
-    parent: bindep-fallback
34
+    name: bindep-ubuntu-xenial
35
+    parent: bindep-base
36 36
     nodeset: ubuntu-xenial
37 37
 
38 38
 - project:
39 39
     check:
40 40
       jobs:
41
-        - bindep-fallback-centos-7
42
-        - bindep-fallback-opensuse-423
43
-        - bindep-fallback-opensuse-150
44
-        - bindep-fallback-ubuntu-trusty
45
-        - bindep-fallback-ubuntu-xenial
41
+        - bindep-centos-7
42
+        - bindep-opensuse-150
43
+        - bindep-opensuse-423
44
+        - bindep-ubuntu-trusty
45
+        - bindep-ubuntu-xenial
46 46
     gate:
47 47
       jobs:
48
-        - bindep-fallback-centos-7
49
-        - bindep-fallback-opensuse-423
50
-        - bindep-fallback-opensuse-150
51
-        - bindep-fallback-ubuntu-trusty
52
-        - bindep-fallback-ubuntu-xenial
48
+        - bindep-centos-7
49
+        - bindep-opensuse-150
50
+        - bindep-opensuse-423
51
+        - bindep-ubuntu-trusty
52
+        - bindep-ubuntu-xenial

+ 5
- 6
README.rst View File

@@ -119,12 +119,6 @@ bindep would select the ``libffi6`` package in all cases and if the
119 119
 ``test`` profile gets choosen with ``bindep test``, then both packages
120 120
 would be selected.
121 121
 
122
-The following content gives some examples as used in the `default bindep file
123
-<http://git.openstack.org/cgit/openstack-infra/project-config/tree/nodepool/elements/bindep-fallback.txt>`_
124
-that OpenStack CI takes if no ``bindep.txt`` file exists for setup of
125
-some jobs. The examples only use the automatically defined profiles
126
-like ``platform:dpkg`` which is defined on Debian based systems.
127
-
128 122
 If a repository needs for deployment the libxml2 development
129 123
 libraries for support of Debian, Gentoo, and RPM based distros, the
130 124
 ``bindep.txt`` file can contain::
@@ -175,3 +169,8 @@ To select a package based on a group of profiles::
175 169
 This selects the ``ceph-common`` package when the profile ``ceph`` is
176 170
 specified. However, it will only select the ``python-rbd`` package when both
177 171
 ``ceph`` and ``glance`` profiles are active.
172
+
173
+For a more comprehensive example check bindep.txt_ file that is used to
174
+test bindep itself on multiple platforms.
175
+
176
+.. _bindep.txt: http://git.openstack.org/cgit/openstack-infra/bindep/tree/bindep/tests/bindep.txt

+ 115
- 0
bindep/tests/bindep.txt View File

@@ -0,0 +1,115 @@
1
+# This is the fallback list for packages to install. Do not add
2
+# additional packages here. Repositories should use bindep and create
3
+# their own bindep.txt files if the list below is not
4
+# working for them.
5
+
6
+build-essential [platform:dpkg]
7
+curl [!platform:gentoo]
8
+net-misc/curl [platform:gentoo]
9
+dev-libs/cyrus-sasl [platform:gentoo]
10
+cyrus-sasl-devel [platform:rpm]
11
+media-fonts/nanumfont [platform:gentoo]
12
+fonts-nanum [platform:dpkg]
13
+media-fonts/takao-fonts [platform:gentoo]
14
+fonts-takao [platform:dpkg]
15
+gawk
16
+gettext [!platform:suse]
17
+gettext-runtime [platform:suse]
18
+graphviz [!platform:gentoo]
19
+media-gfx/graphviz [platform:gentoo]
20
+language-pack-en [platform:ubuntu]
21
+libcurl-devel [platform:rpm]
22
+libcurl4-gnutls-dev [platform:dpkg]
23
+libevent-dev [platform:dpkg]
24
+libevent-devel [platform:rpm]
25
+dev-libs/libevent [platform:gentoo]
26
+libffi-dev [platform:dpkg]
27
+libffi-devel [platform:redhat platform:suse !platform:opensuse423]
28
+libffi48-devel [platform:opensuse423]
29
+virtual/libffi [platform:gentoo]
30
+libjerasure-dev [platform:ubuntu]
31
+dev-libs/jerasure [platform:gentoo]
32
+libjpeg-dev [platform:dpkg]
33
+libjpeg8-devel [platform:suse]
34
+libjpeg-turbo-devel [platform:redhat]
35
+media-libs/libjpeg-turbo [platform:gentoo]
36
+libldap2-dev [platform:dpkg]
37
+net-nds/openldap [platform:gentoo]
38
+libmysqlclient-dev [platform:dpkg]
39
+libpcap-dev [platform:dpkg]
40
+libpcap-devel [platform:rpm]
41
+net-libs/libpcap [platform:gentoo]
42
+libpq-dev [platform:dpkg]
43
+librrd-dev [platform:dpkg]
44
+net-analyzer/rrdtool [platform:gentoo]
45
+libsasl2-dev [platform:dpkg]
46
+libselinux-python [platform:redhat]
47
+python-selinux [platform:suse]
48
+sys-libs/libselinux [platform:gentoo]
49
+libsqlite3-dev [platform:dpkg]
50
+libuuid-devel [platform:rpm]
51
+libvirt-dev [platform:dpkg]
52
+libvirt-devel [platform:rpm]
53
+app-emulation/libvirt [platform:gentoo]
54
+libvirt-python [platform:rpm]
55
+dev-python/libvirt-python [platform:gentoo]
56
+libxml2-dev [platform:dpkg]
57
+libxml2-devel [platform:rpm]
58
+libxml2-utils [platform:dpkg]
59
+dev-libs/libxml2 [platform:gentoo]
60
+libxslt-devel [platform:rpm]
61
+libxslt1-dev [platform:dpkg]
62
+dev-libs/libxslt [platform:gentoo]
63
+locales [platform:debian]
64
+mariadb [platform:rpm]
65
+mariadb-server [platform:redhat]
66
+mariadb-devel [platform:redhat]
67
+libmysqlclient-devel [platform:suse]
68
+dev-db/mariadb [platform:gentoo]
69
+memcached
70
+mysql-client [platform:dpkg]
71
+mysql-server [platform:dpkg]
72
+openldap-devel [platform:redhat]
73
+openldap2-devel [platform:suse]
74
+pkg-config [platform:dpkg platform:suse]
75
+pkgconfig [platform:redhat]
76
+virtual/pkgconfig [platform:gentoo]
77
+postgresql
78
+postgresql-client [platform:dpkg]
79
+postgresql-devel [platform:rpm]
80
+postgresql-server [platform:rpm]
81
+pypy [platform:ubuntu]
82
+pypy-dev [platform:ubuntu]
83
+python-dev [platform:dpkg]
84
+python-devel [platform:rpm]
85
+dev-lang/python [platform:gentoo]
86
+python-libvirt [platform:dpkg]
87
+python-lxml [!platform:gentoo !platform:fedora]
88
+python2-lxml [platform:fedora]
89
+dev-python/lxml [platform:gentoo]
90
+# Note that python3-all-dev includes python3-all, added
91
+# both here for documentary purpose.
92
+python3-all [platform:dpkg]
93
+python3-all-dev [platform:dpkg]
94
+python3-devel [platform:fedora platform:suse]
95
+# python3-devel does not pull in the python3 package on openSUSE so
96
+# we need to be explicit. The python3 package contains the XML module
97
+# which is required by a python3 virtualenv. Similarly, in python2,
98
+# the XML module is located in python-xml which is not pulled in
99
+# by python-devel as well. See https://bugzilla.suse.com/show_bug.cgi?id=1046990
100
+python3 [platform:suse]
101
+python-xml [platform:suse]
102
+rrdtool-devel [platform:rpm]
103
+sqlite [platform:redhat]
104
+sqlite-devel [platform:redhat]
105
+sqlite3-devel [platform:suse]
106
+sqlite3 [platform:dpkg]
107
+dev-db/sqlite [platform:gentoo]
108
+swig
109
+unzip
110
+uuid-dev [platform:dpkg]
111
+xsltproc [platform:dpkg]
112
+zip
113
+zlib-devel [platform:rpm]
114
+zlib1g-dev [platform:dpkg]
115
+sys-libs/zlib [platform:gentoo]

playbooks/bindep-fallback/run.yaml → playbooks/bindep/run.yaml View File

@@ -1,8 +1,6 @@
1 1
 - hosts: all
2 2
   vars:
3 3
     bindep_profile: test
4
-    # Define the global file so that no local file gets used.
5
-    bindep_file: /usr/local/bindep-fallback/bindep-fallback.txt
6 4
   tasks:
7 5
     - name: Install requirements
8 6
       pip:
@@ -17,7 +15,10 @@
17 15
         name: .
18 16
 
19 17
     - name: Run bindep with the file
20
-      command: "{{ zuul_work_virtualenv }}/bin/bindep -b -f {{ bindep_file }} {{ bindep_profile }}"
18
+      command: >
19
+        {{ zuul_work_virtualenv }}/bin/bindep -b -f
20
+        "{{ ansible_user_dir }}/{{ zuul.projects['git.openstack.org/openstack-infra/bindep'].src_dir }}/bindep/tests/bindep.txt"
21
+        {{ bindep_profile }}
21 22
       register: _bindep_output
22 23
       changed_when: false
23 24
       failed_when: false

Loading…
Cancel
Save