mistral/playbooks/docker-buildimage/run.yaml
Brad P. Crochet 15bbcbb8d8 Fix docker image build job
The commands need to be run as root.

Also adds a test job for the docker image build so that zuul will run
the experimental job to test before merging.

Change-Id: I1d1cb6979865d7ef22587315544f39646bc9d49d
Closes-Bug: #1765421
2018-04-20 08:59:03 -04:00

31 lines
756 B
YAML

- hosts: all
vars:
work_dir: '{{ ansible_user_dir }}/src/{{ zuul.project.canonical_name }}'
tasks:
- name: Install Docker
shell: curl -fsSL https://get.docker.com/ | sh
args:
chdir: '{{ work_dir }}'
become: yes
- name: Restart Docker service
service:
name: docker
state: restarted
become: yes
- name: Install docker-py
pip:
name: docker-py
become: yes
- name: Build and archive a Mistral image
docker_image:
name: mistral
path: '{{ work_dir }}'
dockerfile: '{{ work_dir }}/tools/docker/Dockerfile'
archive_path: '{{ work_dir}}/mistral-docker.tar.gz'
buildargs:
BUILD_V8EVAL: false
become: yes