mirror of
https://github.com/saymrwulf/cryptography.git
synced 2026-05-14 20:37:55 +00:00
Move docker image pulling for wheel buidler to pre-run (#5645)
This commit is contained in:
parent
206300d1e4
commit
a8bb7b03bf
3 changed files with 43 additions and 36 deletions
|
|
@ -29,6 +29,7 @@
|
|||
- job:
|
||||
name: pyca-cryptography-build-wheel
|
||||
abstract: true
|
||||
pre-run: .zuul.playbooks/playbooks/wheel/pre.yaml
|
||||
run: .zuul.playbooks/playbooks/wheel/main.yaml
|
||||
|
||||
- job:
|
||||
|
|
|
|||
42
.zuul.playbooks/playbooks/wheel/pre.yaml
Normal file
42
.zuul.playbooks/playbooks/wheel/pre.yaml
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
- hosts: all
|
||||
tasks:
|
||||
- name: Sanity check build list
|
||||
assert:
|
||||
that: wheel_builds is defined
|
||||
|
||||
- name: Run ensure-docker
|
||||
include_role:
|
||||
name: ensure-docker
|
||||
|
||||
- name: Workaround Linaro aarch64 cloud MTU issues
|
||||
# NOTE(ianw) : Docker default networking, the Linaro NAT setup and
|
||||
# *insert random things here* cause PMTU issues, resulting in hung
|
||||
# connections, particularly to fastly CDN (particularly annoying
|
||||
# because pypi and pythonhosted live behind that). Can remove after
|
||||
# upstream changes merge, or we otherwise find a solution in the
|
||||
# upstream cloud.
|
||||
# https://review.opendev.org/747062
|
||||
# https://review.opendev.org/746833
|
||||
# https://review.opendev.org/747064
|
||||
when: ansible_architecture == 'aarch64'
|
||||
block:
|
||||
- name: Install jq
|
||||
package:
|
||||
name: jq
|
||||
state: present
|
||||
become: yes
|
||||
|
||||
- name: Reset docker MTU
|
||||
shell: |
|
||||
jq --arg mtu 1400 '. + {mtu: $mtu|tonumber}' /etc/docker/daemon.json > /etc/docker/daemon.json.new
|
||||
cat /etc/docker/daemon.json.new
|
||||
mv /etc/docker/daemon.json.new /etc/docker/daemon.json
|
||||
service docker restart
|
||||
become: yes
|
||||
|
||||
- name: Pre-pull containers
|
||||
command: >-
|
||||
docker pull {{ item.image }}
|
||||
become: yes
|
||||
loop: '{{ wheel_builds }}'
|
||||
|
||||
|
|
@ -11,36 +11,6 @@
|
|||
include_role:
|
||||
name: ensure-pip
|
||||
|
||||
- name: Run ensure-docker
|
||||
include_role:
|
||||
name: ensure-docker
|
||||
|
||||
- name: Workaround Linaro aarch64 cloud MTU issues
|
||||
# NOTE(ianw) : Docker default networking, the Linaro NAT setup and
|
||||
# *insert random things here* cause PMTU issues, resulting in hung
|
||||
# connections, particularly to fastly CDN (particularly annoying
|
||||
# because pypi and pythonhosted live behind that). Can remove after
|
||||
# upstream changes merge, or we otherwise find a solution in the
|
||||
# upstream cloud.
|
||||
# https://review.opendev.org/747062
|
||||
# https://review.opendev.org/746833
|
||||
# https://review.opendev.org/747064
|
||||
when: ansible_architecture == 'aarch64'
|
||||
block:
|
||||
- name: Install jq
|
||||
package:
|
||||
name: jq
|
||||
state: present
|
||||
become: yes
|
||||
|
||||
- name: Reset docker MTU
|
||||
shell: |
|
||||
jq --arg mtu 1400 '. + {mtu: $mtu|tonumber}' /etc/docker/daemon.json > /etc/docker/daemon.json.new
|
||||
cat /etc/docker/daemon.json.new
|
||||
mv /etc/docker/daemon.json.new /etc/docker/daemon.json
|
||||
service docker restart
|
||||
become: yes
|
||||
|
||||
# We build an sdist of the checkout, and then build wheels from the
|
||||
# sdist. This ensures that nothing is left out of the sdist.
|
||||
- name: Install sdist required packages
|
||||
|
|
@ -95,12 +65,6 @@
|
|||
dest: '{{ _build_dir }}'
|
||||
mode: 0755
|
||||
|
||||
- name: Pre-pull containers
|
||||
command: >-
|
||||
docker pull {{ item.image }}
|
||||
become: yes
|
||||
loop: '{{ wheel_builds }}'
|
||||
|
||||
- name: Run builds
|
||||
command: |
|
||||
docker run --rm \
|
||||
|
|
|
|||
Loading…
Reference in a new issue