Fixed the Mistral Docker build job
Change-Id: I4d969d2a3b1c51dd1f2b55bf4d678e09c33e85f7
This commit is contained in:
parent
1361e8d2ad
commit
e3918a1efd
@ -1,16 +0,0 @@
|
||||
#!/bin/bash -xe
|
||||
|
||||
# TODO (akovi): This script is needed practically only for the CI builds.
|
||||
# Should be moved to some other place
|
||||
|
||||
# install docker
|
||||
curl -fsSL https://get.docker.com/ | sh
|
||||
|
||||
sudo service docker restart
|
||||
|
||||
sudo -E docker pull ubuntu:14.04
|
||||
|
||||
# build image
|
||||
sudo -E tools/docker/build.sh
|
||||
|
||||
sudo -E docker save mistral-all | gzip > mistral-docker.tar.gz
|
@ -1,6 +1,20 @@
|
||||
- hosts: all
|
||||
vars:
|
||||
work_dir: '{{ ansible_user_dir }}/src/{{ zuul.project.canonical_name }}'
|
||||
tasks:
|
||||
- shell:
|
||||
cmd: |
|
||||
./docker_image_build.sh
|
||||
chdir: '{{ ansible_user_dir }}/src/{{ zuul.project.canonical_name }}'
|
||||
- name: Install Docker
|
||||
shell: curl -fsSL https://get.docker.com/ | sh
|
||||
args:
|
||||
chdir: '{{ work_dir }}'
|
||||
|
||||
- name: Restart Docker service
|
||||
service:
|
||||
name: docker
|
||||
state: restarted
|
||||
|
||||
- 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'
|
||||
|
Loading…
Reference in New Issue
Block a user