[#33] Add image build gate

This change adds a voting job that builds the airshipctl docker image on
each patch set. The same job will be updated in a later commit to
publish the image to the quay.io/airshipit/airshipctl repository.

Related #33

Change-Id: I202da62c77ec277312518fead09f0f3ef32ccde8
Signed-off-by: Drew Walters <andrew.walters@att.com>
This commit is contained in:
Drew Walters 2020-02-12 13:00:35 -06:00
parent d6811316a1
commit 5aebf87fc2
4 changed files with 50 additions and 0 deletions

View File

@ -0,0 +1,17 @@
# 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
#
# http://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: all
become: yes
roles:
- install-docker
- airshipctl-build-images

View File

@ -0,0 +1,21 @@
# 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
#
# http://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.
- name: Buid airshipctl Image
make:
chdir: "{{ zuul.project.src_dir }}"
target: images
- name: Verify Image Exists
shell: docker image inspect "$(make print-docker-image-tag)"
args:
chdir: "{{ zuul.project.src_dir }}"

View File

@ -16,6 +16,16 @@
run: playbooks/airship-airshipctl-lint-unit.yaml run: playbooks/airship-airshipctl-lint-unit.yaml
nodeset: airship-airshipctl-single-node nodeset: airship-airshipctl-single-node
- job:
name: airship-airshipctl-build-image
nodeset: airship-airshipctl-single-node
run: playbooks/airship-airshipctl-build-images.yaml
roles:
- zuul: openstack/openstack-helm-infra
irrelevant-files:
- ^.*\.md$
- ^docs/.*$
- job: - job:
name: airship-airshipctl-functional-existing-k8s name: airship-airshipctl-functional-existing-k8s
pre-run: playbooks/airship-airshipctl-deploy-existing-k8s.yaml pre-run: playbooks/airship-airshipctl-deploy-existing-k8s.yaml

View File

@ -14,11 +14,13 @@
check: check:
jobs: jobs:
- airship-airshipctl-lint-unit - airship-airshipctl-lint-unit
- airship-airshipctl-build-image
- airship-airshipctl-functional-existing-k8s - airship-airshipctl-functional-existing-k8s
- airship-airshipctl-gate-test - airship-airshipctl-gate-test
gate: gate:
jobs: jobs:
- airship-airshipctl-lint-unit - airship-airshipctl-lint-unit
- airship-airshipctl-build-image
- airship-airshipctl-functional-existing-k8s - airship-airshipctl-functional-existing-k8s
- airship-airshipctl-gate-test - airship-airshipctl-gate-test
post: post: