Add check manifests zuul job
Signed-off-by: Ruslan Aliev <raliev@mirantis.com> Closes: #665 Change-Id: I53283e0c3b2e5807abdb84433c5563d2e391dcfe
This commit is contained in:
parent
ddf7b36259
commit
1d0561045e
5
Makefile
5
Makefile
@ -310,6 +310,11 @@ docker-image-golint: docker-image_MAKETGT = golint
|
|||||||
docker-image-golint: docker-image_DOCKERTGT = builder
|
docker-image-golint: docker-image_DOCKERTGT = builder
|
||||||
docker-image-golint: docker-image
|
docker-image-golint: docker-image
|
||||||
|
|
||||||
|
.PHONY: docker-image-check-manifests
|
||||||
|
docker-image-check-manifests: docker-image_MAKETGT = "generate manifests check-git-diff"
|
||||||
|
docker-image-check-manifests: docker-image_DOCKERTGT = builder
|
||||||
|
docker-image-check-manifests: docker-image
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
@rm -fr $(BIN_DIR)
|
@rm -fr $(BIN_DIR)
|
||||||
|
20
playbooks/airship-airshipctl-check-manifests.yaml
Normal file
20
playbooks/airship-airshipctl-check-manifests.yaml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
# 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: primary
|
||||||
|
tasks:
|
||||||
|
- name: Run manifests check
|
||||||
|
block:
|
||||||
|
- name: "make docker-image-check-manifests"
|
||||||
|
make:
|
||||||
|
chdir: "{{ zuul.project.src_dir }}"
|
||||||
|
target: docker-image-check-manifests
|
@ -30,6 +30,20 @@ then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
git diff-files --quiet --ignore-submodules **/zz_generated.deepcopy.go
|
||||||
|
if [ $? -ne 0 ]
|
||||||
|
then
|
||||||
|
echo "git diff found modified zz_generated.deepcopy.go file, please run make generate"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
git diff-files --quiet --ignore-submodules manifests/function/airshipctl-schemas/airshipit.org_*.yaml
|
||||||
|
if [ $? -ne 0 ]
|
||||||
|
then
|
||||||
|
echo "git diff found modified CRD files, please run make manifests"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# Evaluate git index for differences, if found print message and fail.
|
# Evaluate git index for differences, if found print message and fail.
|
||||||
git diff-index --cached --quiet --ignore-submodules HEAD -- **/*.golden
|
git diff-index --cached --quiet --ignore-submodules HEAD -- **/*.golden
|
||||||
if [ $? -ne 0 ]
|
if [ $? -ne 0 ]
|
||||||
@ -45,4 +59,18 @@ then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
git diff-index --cached --quiet --ignore-submodules HEAD **/zz_generated.deepcopy.go
|
||||||
|
if [ $? -ne 0 ]
|
||||||
|
then
|
||||||
|
echo "git diff found modified zz_generated.deepcopy.go file, please run make generate"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
git diff-index --cached --quiet --ignore-submodules HEAD manifests/function/airshipctl-schemas/airshipit.org_*.yaml
|
||||||
|
if [ $? -ne 0 ]
|
||||||
|
then
|
||||||
|
echo "git diff found modified CRD files, please run make manifests"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
echo "no git diff detected, make target completed successfully"
|
echo "no git diff detected, make target completed successfully"
|
||||||
|
@ -42,6 +42,12 @@
|
|||||||
nodeset: airship-airshipctl-single-node
|
nodeset: airship-airshipctl-single-node
|
||||||
files: *gofiles
|
files: *gofiles
|
||||||
|
|
||||||
|
- job:
|
||||||
|
name: airship-airshipctl-check-manifests
|
||||||
|
pre-run: playbooks/airship-airshipctl-deploy-docker.yaml
|
||||||
|
run: playbooks/airship-airshipctl-check-manifests.yaml
|
||||||
|
nodeset: airship-airshipctl-single-node
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: airship-airshipctl-check-github-issues
|
name: airship-airshipctl-check-github-issues
|
||||||
description: Checks if a Github issue is referenced in the commit message
|
description: Checks if a Github issue is referenced in the commit message
|
||||||
@ -118,6 +124,8 @@
|
|||||||
soft: true
|
soft: true
|
||||||
- name: airship-airshipctl-unit
|
- name: airship-airshipctl-unit
|
||||||
soft: true
|
soft: true
|
||||||
|
- name: airship-airshipctl-check-manifests
|
||||||
|
soft: true
|
||||||
- name: airship-airshipctl-build-image
|
- name: airship-airshipctl-build-image
|
||||||
soft: true
|
soft: true
|
||||||
vars:
|
vars:
|
||||||
@ -157,6 +165,8 @@
|
|||||||
soft: true
|
soft: true
|
||||||
- name: airship-airshipctl-golint
|
- name: airship-airshipctl-golint
|
||||||
soft: true
|
soft: true
|
||||||
|
- name: airship-airshipctl-check-manifests
|
||||||
|
soft: true
|
||||||
- name: airship-airshipctl-unit
|
- name: airship-airshipctl-unit
|
||||||
soft: true
|
soft: true
|
||||||
- name: airship-airshipctl-build-image
|
- name: airship-airshipctl-build-image
|
||||||
@ -198,6 +208,8 @@
|
|||||||
soft: true
|
soft: true
|
||||||
- name: airship-airshipctl-golint
|
- name: airship-airshipctl-golint
|
||||||
soft: true
|
soft: true
|
||||||
|
- name: airship-airshipctl-check-manifests
|
||||||
|
soft: true
|
||||||
- name: airship-airshipctl-build-image
|
- name: airship-airshipctl-build-image
|
||||||
soft: true
|
soft: true
|
||||||
- name: airship-airshipctl-validate-site-docs
|
- name: airship-airshipctl-validate-site-docs
|
||||||
|
@ -34,6 +34,7 @@
|
|||||||
- airship-airshipctl-golint
|
- airship-airshipctl-golint
|
||||||
- airship-airshipctl-lint
|
- airship-airshipctl-lint
|
||||||
- airship-airshipctl-unit
|
- airship-airshipctl-unit
|
||||||
|
- airship-airshipctl-check-manifests
|
||||||
- airship-airshipctl-roles-test
|
- airship-airshipctl-roles-test
|
||||||
- airship-airshipctl-check-github-issues
|
- airship-airshipctl-check-github-issues
|
||||||
- airship-airshipctl-build-image
|
- airship-airshipctl-build-image
|
||||||
@ -52,6 +53,7 @@
|
|||||||
- openstack-tox-docs: *docs
|
- openstack-tox-docs: *docs
|
||||||
- airship-airshipctl-lint
|
- airship-airshipctl-lint
|
||||||
- airship-airshipctl-unit
|
- airship-airshipctl-unit
|
||||||
|
- airship-airshipctl-check-manifests
|
||||||
- airship-airshipctl-build-image
|
- airship-airshipctl-build-image
|
||||||
- airship-airshipctl-validate-site-docs
|
- airship-airshipctl-validate-site-docs
|
||||||
- airship-airshipctl-gate-script-runner
|
- airship-airshipctl-gate-script-runner
|
||||||
|
Loading…
Reference in New Issue
Block a user