Merge "Fix image build"
This commit is contained in:
commit
8b796ea963
12
.zuul.yaml
12
.zuul.yaml
@ -14,9 +14,11 @@
|
||||
check:
|
||||
jobs:
|
||||
- airship-images-functional
|
||||
- airship-images-build
|
||||
gate:
|
||||
jobs:
|
||||
- airship-images-functional
|
||||
- airship-images-build
|
||||
post:
|
||||
jobs:
|
||||
- images-upload-git-mirror
|
||||
@ -24,7 +26,7 @@
|
||||
|
||||
- job:
|
||||
name: airship-images-functional
|
||||
pre-run: playbooks/airship-airshipctl-deploy-docker.yaml
|
||||
pre-run: playbooks/airship-images-deploy-docker.yaml
|
||||
run: playbooks/airship-images-test.yaml
|
||||
nodeset: airship-images-single-node
|
||||
|
||||
@ -39,12 +41,18 @@
|
||||
secret: images_airshipit_github_secret
|
||||
pass-to-parent: true
|
||||
|
||||
- job:
|
||||
name: airship-images-build
|
||||
nodeset: airship-images-single-node
|
||||
pre-run: playbooks/airship-images-deploy-docker.yaml
|
||||
run: playbooks/airship-images-build.yaml
|
||||
|
||||
- job:
|
||||
name: airship-images-publish
|
||||
nodeset: airship-images-single-node
|
||||
timeout: 1800
|
||||
post-timeout: 1800
|
||||
pre-run: playbooks/airship-airshipctl-deploy-docker.yaml
|
||||
pre-run: playbooks/airship-images-deploy-docker.yaml
|
||||
run: playbooks/airship-images-publish.yaml
|
||||
secrets:
|
||||
- name: airship_images_quay_creds
|
||||
|
37
playbooks/airship-images-build.yaml
Normal file
37
playbooks/airship-images-build.yaml
Normal file
@ -0,0 +1,37 @@
|
||||
# Copyright 2019 AT&T Intellectual Property. All other rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# https://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
- hosts: primary
|
||||
tasks:
|
||||
- name: Install python-docker module
|
||||
apt:
|
||||
pkg:
|
||||
- python-docker
|
||||
- python3-requests
|
||||
state: present
|
||||
become: true
|
||||
when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
|
||||
- name: Install docker pip module
|
||||
pip:
|
||||
name: docker
|
||||
- name: Publish images
|
||||
block:
|
||||
- make:
|
||||
chdir: "{{ zuul.project.src_dir }}"
|
||||
target: "images"
|
||||
params:
|
||||
COMMIT: "{{ zuul.newrev | default('') }}"
|
||||
PUSH_IMAGE: "false"
|
||||
become: True
|
@ -23,6 +23,9 @@
|
||||
state: present
|
||||
become: true
|
||||
when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
|
||||
- name: Install docker pip module
|
||||
pip:
|
||||
name: docker
|
||||
- name: Publish images
|
||||
block:
|
||||
- docker_login:
|
||||
|
Loading…
Reference in New Issue
Block a user