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
This commit is contained in:
parent
0b1e0bd626
commit
15bbcbb8d8
10
.zuul.yaml
10
.zuul.yaml
@ -45,6 +45,14 @@
|
|||||||
required-projects:
|
required-projects:
|
||||||
- openstack/mistral
|
- openstack/mistral
|
||||||
|
|
||||||
|
- job:
|
||||||
|
name: mistral-docker-buildimage-test
|
||||||
|
run: playbooks/docker-buildimage/run.yaml
|
||||||
|
post-run: playbooks/docker-buildimage/post.yaml
|
||||||
|
timeout: 1800
|
||||||
|
required-projects:
|
||||||
|
- openstack/mistral
|
||||||
|
|
||||||
# This job does not work. We can come back to it later.
|
# This job does not work. We can come back to it later.
|
||||||
# - job:
|
# - job:
|
||||||
# name: mistral-ha
|
# name: mistral-ha
|
||||||
@ -104,7 +112,7 @@
|
|||||||
branches: master
|
branches: master
|
||||||
experimental:
|
experimental:
|
||||||
jobs:
|
jobs:
|
||||||
- mistral-docker-buildimage:
|
- mistral-docker-buildimage-test:
|
||||||
branches: master
|
branches: master
|
||||||
# This job doesn't work yet.
|
# This job doesn't work yet.
|
||||||
# - mistral-ha:
|
# - mistral-ha:
|
||||||
|
@ -6,15 +6,25 @@
|
|||||||
shell: curl -fsSL https://get.docker.com/ | sh
|
shell: curl -fsSL https://get.docker.com/ | sh
|
||||||
args:
|
args:
|
||||||
chdir: '{{ work_dir }}'
|
chdir: '{{ work_dir }}'
|
||||||
|
become: yes
|
||||||
|
|
||||||
- name: Restart Docker service
|
- name: Restart Docker service
|
||||||
service:
|
service:
|
||||||
name: docker
|
name: docker
|
||||||
state: restarted
|
state: restarted
|
||||||
|
become: yes
|
||||||
|
|
||||||
|
- name: Install docker-py
|
||||||
|
pip:
|
||||||
|
name: docker-py
|
||||||
|
become: yes
|
||||||
|
|
||||||
- name: Build and archive a Mistral image
|
- name: Build and archive a Mistral image
|
||||||
docker_image:
|
docker_image:
|
||||||
name: mistral
|
name: mistral
|
||||||
path: '{{ work_dir }}'
|
path: '{{ work_dir }}'
|
||||||
dockerfile: '{{ work_dir }}/tools/docker/Dockerfile'
|
dockerfile: '{{ work_dir }}/tools/docker/Dockerfile'
|
||||||
archive_path: '{{ work_dir}}}/mistral-docker.tar.gz'
|
archive_path: '{{ work_dir}}/mistral-docker.tar.gz'
|
||||||
|
buildargs:
|
||||||
|
BUILD_V8EVAL: false
|
||||||
|
become: yes
|
||||||
|
Loading…
Reference in New Issue
Block a user