drydock/tools/gate/playbooks/omni_test.yaml

57 lines
1.9 KiB
YAML

# 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.
# Combine several test tasks into a single playbook
# to minimize Zuul node consumption
- hosts: primary
tasks:
- name: Execute the make target for PEP8 linting
make:
chdir: "{{ zuul.project.src_dir }}"
target: pep8
register: result
- name: Execute the make target for Helm chart linting
make:
chdir: "{{ zuul.project.src_dir }}"
target: helm_lint
register: result
- name: Execute the make target for security scanning
make:
chdir: "{{ zuul.project.src_dir }}"
target: security
register: result
- name: Execute the make target for unit testing
make:
chdir: "{{ zuul.project.src_dir }}"
target: unit_tests
register: result
- name: Execute Go tests for baclient
make:
chdir: "{{ zuul.project.src_dir }}"
target: test_baclient
become: true
register: result
- name: Execute the make target for building and running the Drydock Docker image
make:
chdir: "{{ zuul.project.src_dir }}"
target: run_drydock
register: result
become: true
- name: Setup Apparmor
shell: |
set -xe;
./tools/deployment/apparmor/001-setup-apparmor-profiles.sh
args:
chdir: "{{ zuul.projects['opendev.org/openstack/openstack-helm-infra'].src_dir }}"
executable: /bin/bash