diff --git a/Makefile b/Makefile index 800666845..928d77b3d 100644 --- a/Makefile +++ b/Makefile @@ -160,7 +160,7 @@ print-docker-image-tag: @echo "$(DOCKER_IMAGE)" .PHONY: docker-image-test-suite -docker-image-test-suite: DOCKER_MAKE_TARGET = "lint cover update-golden check-git-diff check-copyright" +docker-image-test-suite: DOCKER_MAKE_TARGET = "cover update-golden check-git-diff" docker-image-test-suite: DOCKER_TARGET_STAGE = builder docker-image-test-suite: docker-image @@ -170,7 +170,7 @@ docker-image-unit-tests: DOCKER_TARGET_STAGE = builder docker-image-unit-tests: docker-image .PHONY: docker-image-lint -docker-image-lint: DOCKER_MAKE_TARGET = lint +docker-image-lint: DOCKER_MAKE_TARGET = "lint check-copyright" docker-image-lint: DOCKER_TARGET_STAGE = builder docker-image-lint: docker-image diff --git a/playbooks/airship-airshipctl-lint.yaml b/playbooks/airship-airshipctl-lint.yaml new file mode 100644 index 000000000..82965a6f1 --- /dev/null +++ b/playbooks/airship-airshipctl-lint.yaml @@ -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 Auxiliary Linter and Check copyright header + block: + - name: "make docker-image-lint" + make: + chdir: "{{ zuul.project.src_dir }}" + target: docker-image-lint diff --git a/playbooks/airship-airshipctl-lint-unit.yaml b/playbooks/airship-airshipctl-unit.yaml similarity index 92% rename from playbooks/airship-airshipctl-lint-unit.yaml rename to playbooks/airship-airshipctl-unit.yaml index f3a0e7857..4efca0a2d 100644 --- a/playbooks/airship-airshipctl-lint-unit.yaml +++ b/playbooks/airship-airshipctl-unit.yaml @@ -12,7 +12,7 @@ - hosts: primary tasks: - - name: Run Linter, Unit Tests, Verify Golden Testdata + - name: Run Unit Tests, Verify Golden Testdata block: - name: "make docker-image-test-suite" make: diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml index f9c611063..e9e2fefaa 100644 --- a/zuul.d/jobs.yaml +++ b/zuul.d/jobs.yaml @@ -27,13 +27,19 @@ - ^Makefile$ - ^\.golangci\.yaml$ - ^(go\.(mod|sum)|.*\.go)$ - - ^playbooks/airship-airshipctl-(golint|lint-unit)\.yaml$ + - ^playbooks/airship-airshipctl-(golint|lint|unit)\.yaml$ - ^tools/(coverage_check|golint|gomod_check|install_linter)$ - job: - name: airship-airshipctl-lint-unit + name: airship-airshipctl-lint pre-run: playbooks/airship-airshipctl-deploy-docker.yaml - run: playbooks/airship-airshipctl-lint-unit.yaml + run: playbooks/airship-airshipctl-lint.yaml + nodeset: airship-airshipctl-single-node + +- job: + name: airship-airshipctl-unit + pre-run: playbooks/airship-airshipctl-deploy-docker.yaml + run: playbooks/airship-airshipctl-unit.yaml nodeset: airship-airshipctl-single-node files: *gofiles @@ -102,10 +108,12 @@ dependencies: - name: openstack-tox-docs soft: true - - name: airship-airshipctl-lint-unit + - name: airship-airshipctl-lint soft: true - name: airship-airshipctl-golint soft: true + - name: airship-airshipctl-unit + soft: true - name: airship-airshipctl-build-image soft: true - name: airship-airshipctl-validate-site-docs diff --git a/zuul.d/projects.yaml b/zuul.d/projects.yaml index 898c3ab93..65dbc3072 100644 --- a/zuul.d/projects.yaml +++ b/zuul.d/projects.yaml @@ -19,7 +19,8 @@ files: - ^docs/.*$ - airship-airshipctl-golint - - airship-airshipctl-lint-unit + - airship-airshipctl-lint + - airship-airshipctl-unit - airship-airshipctl-roles-test - airship-airshipctl-build-image - airship-airshipctl-validate-site-docs @@ -29,7 +30,8 @@ gate: jobs: - openstack-tox-docs: *docs - - airship-airshipctl-lint-unit + - airship-airshipctl-lint + - airship-airshipctl-unit - airship-airshipctl-build-image - airship-airshipctl-validate-site-docs - airship-airshipctl-gate-script-runner