- hosts: all tasks: - include_vars: vars.yaml - name: Ensure dep files are sorted command: "sort --check -f {{ loci_src_dir }}/{{ item }}" loop: - "bindep.txt" - "pydep.txt" environment: LC_ALL: C - name: Gather wheels to local registry block: - docker_image: name: loci/requirements tag: "{{ branch }}-{{ item.name }}" repository: 172.17.0.1:5000/loci/requirements push: yes with_items: "{{ distros }}" when: - reuse_requirements | bool - project != 'requirements' - name: Build base images block: - name: "Build base image for {{ item.name }}" docker_image: path: "{{ loci_src_dir }}/dockerfiles/{{ item.name }}" name: base tag: "{{ item.name }}" buildargs: "{{ item.buildargs.base }}" with_items: "{{ distros }}" - name: Build requirements image block: - name: "Build requirements image for {{ item.name }}" docker_image: path: "{{ loci_src_dir }}" name: loci/requirements tag: "{{ branch }}-{{ item.name }}" repository: 172.17.0.1:5000/loci/requirements push: yes pull: False buildargs: "{{ item.buildargs.requirements }}" with_items: "{{ distros }}" when: - (not reuse_requirements) | bool - project != 'requirements' - name: Build project images block: - name: "Build {{ project }} image for {{ item.name }}" docker_image: path: "{{ loci_src_dir }}" name: loci/{{ project }} tag: "{{ branch }}-{{ item.name }}" pull: False buildargs: "{{ item.buildargs.project }}" with_items: "{{ distros }}"