CI: Use Docker proxy for pulls + Ruby fixes

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

- 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

Change-Id: I0c4d5e1ea16c6677813a334b38b3a22ad811531d
Co-Authored-By: Radosław Piliszek <radoslaw.piliszek@gmail.com>
Depends-On: https://review.opendev.org/c/openstack/kolla-ansible/+/772077
(cherry picked from commit a8c12def85)
This commit is contained in:
Michał Nasiadka 2021-01-14 09:49:07 +01:00 committed by Radosław Piliszek
parent 3e020fdf2a
commit 36126c0825
3 changed files with 22 additions and 2 deletions

View File

@ -55,7 +55,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.
# 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.
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} \
&& mkdir -p ${monasca_grafana_build_path} \
&& tar --strip 1 -xvf /tmp/monasca-grafana.tgz -C ${monasca_grafana_build_path} \

View File

@ -88,7 +88,8 @@ RUN echo '{{ image_name }} not yet available for {{ base_distro }}' \
# 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(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 %}
{% block sensu_client_footer %}{% endblock %}

View File

@ -64,3 +64,21 @@
name: tox
virtualenv: "{{ ansible_user_dir }}/tox-venv"
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/"
]
}