CI: Use Docker proxy for pulls + Ruby fixes + get_pip

For Stein (due to CentOS 7) includes as well:

- get_pip macro: fix for Python 2.7

- sensu-client: Pin simpleidn Ruby gem

  simpleidn Ruby gem started requiring Ruby 2.2.

- monasca-grafana: Pin git Ruby gem

  fpm Ruby gem started requiring git Ruby gem
  git Ruby gem started requiring Ruby 2.3

- mark helm-repository as unbuildable

  It no longer builds, it's not used, it's been removed...

Change-Id: I0c4d5e1ea16c6677813a334b38b3a22ad811531d
Co-Authored-By: Radosław Piliszek <radoslaw.piliszek@gmail.com>
Depends-On: https://review.opendev.org/772501
(cherry picked from commit a8c12def85)
This commit is contained in:
Mark Goddard 2021-01-26 08:58:15 +00:00
parent bd4f3977c1
commit cde47e352f
5 changed files with 31 additions and 3 deletions

View File

@ -38,7 +38,7 @@
{% else %} {% else %}
{% set python='python3' %} {% set python='python3' %}
{% endif %} {% endif %}
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \ RUN curl https://bootstrap.pypa.io/{% if distro_python_version == '2.7' %}2.7/{% endif %}get-pip.py -o get-pip.py \
&& {{python}} get-pip.py \ && {{python}} get-pip.py \
&& rm get-pip.py && rm get-pip.py
{% endmacro %} {% endmacro %}

View File

@ -54,7 +54,8 @@ ARG monasca_grafana_url=https://github.com/monasca/grafana/archive/$monasca_graf
# NPM installs itself in /usr/local/bin (the default in Ubuntu) which is not in the PATH. # NPM installs itself in /usr/local/bin (the default in Ubuntu) which is not in the PATH.
# This is forced for all distros to avoid conflicts with native packages. # This is forced for all distros to avoid conflicts with native packages.
# NOTE(mgoddard): childprocess 3.0.0 and ffi 1.13.0 depend on Ruby 2.3. # NOTE(mgoddard): childprocess 3.0.0 and ffi 1.13.0 depend on Ruby 2.3.
RUN gem install rake:"~>12" ffi:"<1.13.0" childprocess:"<2.0.0" fpm \ # NOTE(yoctozepto): pinning git because fpm started requiring git and git started requiring Ruby 2.3
RUN gem install rake:"~>12" ffi:"<1.13.0" childprocess:"<2.0.0" git:"~>1.7.0" fpm \
&& curl -sSL -o /tmp/monasca-grafana.tgz ${monasca_grafana_url} \ && curl -sSL -o /tmp/monasca-grafana.tgz ${monasca_grafana_url} \
&& mkdir -p ${monasca_grafana_build_path} \ && mkdir -p ${monasca_grafana_build_path} \
&& tar --strip 1 -xvf /tmp/monasca-grafana.tgz -C ${monasca_grafana_build_path} \ && tar --strip 1 -xvf /tmp/monasca-grafana.tgz -C ${monasca_grafana_build_path} \

View File

@ -93,7 +93,8 @@ RUN echo '{{ image_name }} not yet available for {{ base_distro }}' \
# http://cbs.centos.org/koji/search?match=glob&type=package&terms=*sensu* # http://cbs.centos.org/koji/search?match=glob&type=package&terms=*sensu*
# NOTE(hrw): whois 5.0.0 requires Ruby 2.4+ while CentOS has 2.0 # NOTE(hrw): whois 5.0.0 requires Ruby 2.4+ while CentOS has 2.0
# NOTE(yoctozepto): pinning minitest for the same reason # NOTE(yoctozepto): pinning minitest for the same reason
RUN {%if base_package_type == 'rpm' %} gem install whois:"<5" minitest:"~>5.11.3" && {% endif %} sensu-install --plugins {{ sensu_plugins | customizable('plugins') | join (',') }} # NOTE(yoctozepto): pinning simpleidn because it started requiring Ruby 2.2
RUN {%if base_package_type == 'rpm' %} gem install whois:"<5" minitest:"~>5.11.3" simpleidn:"~>0.1.1" && {% endif %} sensu-install --plugins {{ sensu_plugins | customizable('plugins') | join (',') }}
{% endblock %} {% endblock %}
{% block sensu_client_footer %}{% endblock %} {% block sensu_client_footer %}{% endblock %}

View File

@ -85,6 +85,7 @@ SKIPPED_IMAGES = {
"cyborg-base", "cyborg-base",
"dragonflow-base", "dragonflow-base",
"freezer-base", "freezer-base",
"helm-repository",
"karbor-base", "karbor-base",
"kuryr-base", "kuryr-base",
"monasca-base", "monasca-base",
@ -98,6 +99,7 @@ SKIPPED_IMAGES = {
"zun-base", "zun-base",
], ],
'centos+source': [ 'centos+source': [
"helm-repository",
"mongodb", "mongodb",
"ovsdpdk", "ovsdpdk",
"tripleoclient", "tripleoclient",
@ -117,6 +119,7 @@ SKIPPED_IMAGES = {
"ec2-api", "ec2-api",
"freezer-base", "freezer-base",
"heat-all", "heat-all",
"helm-repository",
"ironic-neutron-agent", "ironic-neutron-agent",
"karbor-base", "karbor-base",
"kuryr-base", "kuryr-base",
@ -143,6 +146,7 @@ SKIPPED_IMAGES = {
"crane", "crane",
"cyborg-base", "cyborg-base",
"helm-repository",
# There is no qdrouterd package for ubuntu bionic # There is no qdrouterd package for ubuntu bionic
"qdrouterd", "qdrouterd",
"tripleoclient", "tripleoclient",
@ -162,6 +166,7 @@ SKIPPED_IMAGES = {
"ec2-api", "ec2-api",
"freezer-base", "freezer-base",
"heat-all", "heat-all",
"helm-repository",
"ironic-neutron-agent", "ironic-neutron-agent",
"karbor-base", "karbor-base",
"kuryr-base", "kuryr-base",
@ -185,6 +190,7 @@ SKIPPED_IMAGES = {
'debian+source': [ 'debian+source': [
"crane", "crane",
"cyborg-base", "cyborg-base",
"helm-repository",
"sensu-base", "sensu-base",
"tripleoclient", "tripleoclient",
"tripleo-ui" "tripleo-ui"
@ -197,6 +203,7 @@ SKIPPED_IMAGES = {
"cyborg-base", "cyborg-base",
"dragonflow-base", "dragonflow-base",
"freezer-base", "freezer-base",
"helm-repository",
"karbor-base", "karbor-base",
"kuryr-base", "kuryr-base",
"monasca-base", "monasca-base",
@ -213,6 +220,7 @@ SKIPPED_IMAGES = {
], ],
'oraclelinux+source': [ 'oraclelinux+source': [
"bifrost-base", "bifrost-base",
"helm-repository",
"mongodb", "mongodb",
"ovsdpdk", "ovsdpdk",
"rsyslog", "rsyslog",

View File

@ -62,3 +62,21 @@
name: tox name: tox
virtualenv: "{{ ansible_user_dir }}/tox-venv" virtualenv: "{{ ansible_user_dir }}/tox-venv"
become: true become: true
- name: Ensure /etc/docker exists
become: true
file:
path: /etc/docker
state: directory
mode: 0755
- name: Configure registry-mirror in daemon.json
become: true
copy:
dest: /etc/docker/daemon.json
content: |
{
"registry-mirrors": [
"http://{{ zuul_site_mirror_fqdn }}:8082/"
]
}