diff --git a/playbooks/airship-airshipctl-build-images.yaml b/playbooks/airship-airshipctl-build-images.yaml new file mode 100644 index 000000000..017e9c503 --- /dev/null +++ b/playbooks/airship-airshipctl-build-images.yaml @@ -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 diff --git a/roles/airshipctl-build-images/tasks/main.yaml b/roles/airshipctl-build-images/tasks/main.yaml new file mode 100644 index 000000000..65b5b6a73 --- /dev/null +++ b/roles/airshipctl-build-images/tasks/main.yaml @@ -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 }}" diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml index 4eafc4c62..4b2e0659c 100644 --- a/zuul.d/jobs.yaml +++ b/zuul.d/jobs.yaml @@ -16,6 +16,16 @@ run: playbooks/airship-airshipctl-lint-unit.yaml 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: name: airship-airshipctl-functional-existing-k8s pre-run: playbooks/airship-airshipctl-deploy-existing-k8s.yaml diff --git a/zuul.d/projects.yaml b/zuul.d/projects.yaml index 3d7df475e..f62ae4ba2 100644 --- a/zuul.d/projects.yaml +++ b/zuul.d/projects.yaml @@ -14,11 +14,13 @@ check: jobs: - airship-airshipctl-lint-unit + - airship-airshipctl-build-image - airship-airshipctl-functional-existing-k8s - airship-airshipctl-gate-test gate: jobs: - airship-airshipctl-lint-unit + - airship-airshipctl-build-image - airship-airshipctl-functional-existing-k8s - airship-airshipctl-gate-test post: