From 93ac6c99712946a677b7323cab8728a3fc06ad66 Mon Sep 17 00:00:00 2001 From: Thierry Carrez Date: Tue, 4 Aug 2020 14:49:12 +0200 Subject: [PATCH] Retire kata-containers/zuul-config The Kata Containers project no longer uses Zuul for CI. This project is therefore no longer maintained. Change-Id: I1426be073422ee243d599893ea8e54f12d74d785 --- .gitignore | 14 -- LICENSE | 202 ------------------ README.rst | 14 +- bindep.txt | 21 -- playbooks/CI-setup/postrun.yaml | 85 -------- playbooks/CI-setup/presetup.yaml | 7 - playbooks/QA-check/run.yaml | 14 -- playbooks/github-wip/run.yaml | 5 - roles/CI-setup/README.rst | 1 - roles/CI-setup/tasks/main.yaml | 23 -- roles/CI-setup/tasks/setup/Fedora.yaml | 9 - roles/CI-setup/tasks/setup/Ubuntu.yaml | 9 - roles/CI-setup/tasks/setup/default.yaml | 5 - roles/check-github-pr-is-wip/README.rst | 17 -- .../files/github_wip.py | 68 ------ roles/check-github-pr-is-wip/tasks/main.yaml | 3 - test-requirements.txt | 3 - tox.ini | 42 ---- zuul.d/jobs.yaml | 46 ---- zuul.d/pipelines.yaml | 192 ----------------- zuul.d/project-templates.yaml | 12 -- zuul.d/projects.yaml | 12 -- 22 files changed, 9 insertions(+), 795 deletions(-) delete mode 100644 .gitignore delete mode 100644 LICENSE delete mode 100644 bindep.txt delete mode 100644 playbooks/CI-setup/postrun.yaml delete mode 100644 playbooks/CI-setup/presetup.yaml delete mode 100644 playbooks/QA-check/run.yaml delete mode 100644 playbooks/github-wip/run.yaml delete mode 100644 roles/CI-setup/README.rst delete mode 100644 roles/CI-setup/tasks/main.yaml delete mode 100644 roles/CI-setup/tasks/setup/Fedora.yaml delete mode 100644 roles/CI-setup/tasks/setup/Ubuntu.yaml delete mode 100644 roles/CI-setup/tasks/setup/default.yaml delete mode 100644 roles/check-github-pr-is-wip/README.rst delete mode 100755 roles/check-github-pr-is-wip/files/github_wip.py delete mode 100644 roles/check-github-pr-is-wip/tasks/main.yaml delete mode 100644 test-requirements.txt delete mode 100644 tox.ini delete mode 100644 zuul.d/jobs.yaml delete mode 100644 zuul.d/pipelines.yaml delete mode 100644 zuul.d/project-templates.yaml delete mode 100644 zuul.d/projects.yaml diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 48bdfc8..0000000 --- a/.gitignore +++ /dev/null @@ -1,14 +0,0 @@ -*.pyc -*~ - -# Unit test / coverage reports -.coverage -.tox -.stestr - -# Sphinx -doc/build - -# pbr generates these -AUTHORS -ChangeLog diff --git a/LICENSE b/LICENSE deleted file mode 100644 index d645695..0000000 --- a/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - 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. diff --git a/README.rst b/README.rst index fde9538..44fbcf9 100644 --- a/README.rst +++ b/README.rst @@ -1,6 +1,10 @@ -Kata Containers Zuul jobs and config -==================================== +The Kata Containers project no longer uses Zuul for CI. +This project is therefore no longer maintained. -This repo contains a set of ansible playbooks which are used by the -Kata Containers tenant in OpenDev's Zuul. It also contains pipelines, -jobs and project-template definitions for this Kata Containers tenant. +The contents of this repository are still available in the Git +source code management system. To see the contents of this +repository before it reached its end of life, please check out the +previous commit with "git checkout HEAD^1". + +For any further questions, please email +kata-dev@lists.katacontainers.io or join #kata-dev on Freenode. diff --git a/bindep.txt b/bindep.txt deleted file mode 100644 index ee40a90..0000000 --- a/bindep.txt +++ /dev/null @@ -1,21 +0,0 @@ -# This is a cross-platform list tracking distribution packages needed by tests; -# see http://docs.openstack.org/infra/bindep/ for additional information. - -# Need to build cryptography for installing ansible-lint -build-essential [platform:dpkg] -gcc [platform:rpm] -libssl-dev [platform:dpkg] -openssl [platform:brew] -openssl-devel [platform:rpm] -libffi [platform:brew] -libffi-dev [platform:dpkg] -libffi-devel [platform:rpm] -python-dev [platform:dpkg] -python-devel [platform:rpm] -libre2-dev [compile test platform:dpkg] -libre2-4 [platform:ubuntu-bionic] -libre2-3 [platform:debian-stretch] -libre2-1v5 [platform:ubuntu-xenial] -re2-devel [compile test platform:rpm] -re2-dev [platform:apk] -re2 [platform:rpm platform:apk platform:brew] diff --git a/playbooks/CI-setup/postrun.yaml b/playbooks/CI-setup/postrun.yaml deleted file mode 100644 index d7e9f0f..0000000 --- a/playbooks/CI-setup/postrun.yaml +++ /dev/null @@ -1,85 +0,0 @@ ---- -- hosts: all - tasks: - - name: Ensure logs directory - file: - path: '{{ ansible_user_dir }}/logs' - state: directory - mode: 0755 - - # TODO use with items - - name: Write runtime log - shell: | - set -x - journalctl -b -o short-precise -t kata-runtime | gzip > {{ ansible_user_dir }}/logs/kata-runtime.log.gz - become: yes - - name: Make runtime log readable - file: - path: '{{ ansible_user_dir }}/logs/kata-runtime.log.gz' - mode: 'u+r,g+r,o+r' - become: yes - - - name: Write agent and proxy log - shell: | - set -x - journalctl -b -o short-precise -t kata-proxy | gzip > {{ ansible_user_dir }}/logs/kata-proxy.log.gz - become: yes - - name: Make proxy log readable - file: - path: '{{ ansible_user_dir }}/logs/kata-proxy.log.gz' - mode: 'u+r,g+r,o+r' - become: yes - - - name: Write shim log - shell: | - set -x - journalctl -b -o short-precise -t kata-shim | gzip > {{ ansible_user_dir }}/logs/kata-shim.log.gz - become: yes - - name: Make shim log readable - file: - path: '{{ ansible_user_dir }}/logs/kata-shim.log.gz' - mode: 'u+r,g+r,o+r' - become: yes - - - name: Write docker log - shell: | - set -x - journalctl -b -o short-precise -u docker.service | gzip > {{ ansible_user_dir }}/logs/docker.log.gz - become: yes - - name: Make docker log readable - file: - path: '{{ ansible_user_dir }}/logs/docker.log.gz' - mode: 'u+r,g+r,o+r' - become: yes - - - name: Write crio log - shell: | - set -x - journalctl -b -o short-precise -u crio | gzip > {{ ansible_user_dir }}/logs/crio.log.gz - become: yes - - name: Make crio log readable - file: - path: '{{ ansible_user_dir }}/logs/crio.log.gz' - mode: 'u+r,g+r,o+r' - become: yes - - - name: Write kubelet log - shell: | - set -x - journalctl -b -o short-precise -u kubelet | gzip > {{ ansible_user_dir }}/logs/kubelet.log.gz - become: yes - - name: Make kubelet log readable - file: - path: '{{ ansible_user_dir }}/logs/kubelet.log.gz' - mode: 'u+r,g+r,o+r' - become: yes - - - name: Copy log files from test node to executor - synchronize: - src: '{{ ansible_user_dir }}/logs' - dest: '{{ zuul.executor.log_root }}' - mode: pull - copy_links: true - verify_host: true - rsync_opts: - - --prune-empty-dirs diff --git a/playbooks/CI-setup/presetup.yaml b/playbooks/CI-setup/presetup.yaml deleted file mode 100644 index 641f043..0000000 --- a/playbooks/CI-setup/presetup.yaml +++ /dev/null @@ -1,7 +0,0 @@ ---- -- hosts: all - # the CI setup is placed out into a role, as the distro specific - # file/task fragments do not pass the zuul yaml linter checks if - # placed into the playbook tree. - roles: - - CI-setup diff --git a/playbooks/QA-check/run.yaml b/playbooks/QA-check/run.yaml deleted file mode 100644 index e83abed..0000000 --- a/playbooks/QA-check/run.yaml +++ /dev/null @@ -1,14 +0,0 @@ ---- -- hosts: all - tasks: - - name: Run kata QA CI - args: - executable: /bin/bash - chdir: "{{ zuul.project.src_dir }}" - shell: | - set -x - export CI=true - export ZUUL=true - export GOPATH=$HOME/go - export PATH=${GOPATH}/bin:/usr/local/go/bin:/usr/sbin:$PATH - .ci/run.sh diff --git a/playbooks/github-wip/run.yaml b/playbooks/github-wip/run.yaml deleted file mode 100644 index 7f39570..0000000 --- a/playbooks/github-wip/run.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -- hosts: localhost - roles: - - role: check-github-pr-is-wip - github_pr: "{{ zuul.change_url }}" diff --git a/roles/CI-setup/README.rst b/roles/CI-setup/README.rst deleted file mode 100644 index 8feb3bc..0000000 --- a/roles/CI-setup/README.rst +++ /dev/null @@ -1 +0,0 @@ -Platform specific setup for kata CI. diff --git a/roles/CI-setup/tasks/main.yaml b/roles/CI-setup/tasks/main.yaml deleted file mode 100644 index 00ad18d..0000000 --- a/roles/CI-setup/tasks/main.yaml +++ /dev/null @@ -1,23 +0,0 @@ -- name: Run distribution specific tasks - include_tasks: "{{ lookup('first_found', file_list) }}" - vars: - file_list: - - "setup/{{ ansible_distribution }}.yaml" - - "setup/{{ ansible_os_family }}.yaml" - - "setup/default.yaml" - -- name: Run Kata CI setup - args: - executable: /bin/bash - chdir: "{{ zuul.project.src_dir }}" - shell: | - set -x - # set a ${WORKSPACE}, so we look enough like a Jenkins env that - # the Kata ci script will execute - export WORKSPACE=$HOME - export GOPATH=$HOME/go - export CI=true - export ZUUL=true - export PATH=${GOPATH}/bin:/usr/local/go/bin:/usr/sbin:$PATH - .ci/install_go.sh -p -f - .ci/setup.sh diff --git a/roles/CI-setup/tasks/setup/Fedora.yaml b/roles/CI-setup/tasks/setup/Fedora.yaml deleted file mode 100644 index 6006ad6..0000000 --- a/roles/CI-setup/tasks/setup/Fedora.yaml +++ /dev/null @@ -1,9 +0,0 @@ -- name: Install golang - package: - # It does not really matter which version we install, as long as it - # can 'go get' the test repo, to then run the platform setup scripts, - # which will then ensure we have the correct/necessary version of - # golang installed. - name: golang - state: present - become: yes diff --git a/roles/CI-setup/tasks/setup/Ubuntu.yaml b/roles/CI-setup/tasks/setup/Ubuntu.yaml deleted file mode 100644 index 6006ad6..0000000 --- a/roles/CI-setup/tasks/setup/Ubuntu.yaml +++ /dev/null @@ -1,9 +0,0 @@ -- name: Install golang - package: - # It does not really matter which version we install, as long as it - # can 'go get' the test repo, to then run the platform setup scripts, - # which will then ensure we have the correct/necessary version of - # golang installed. - name: golang - state: present - become: yes diff --git a/roles/CI-setup/tasks/setup/default.yaml b/roles/CI-setup/tasks/setup/default.yaml deleted file mode 100644 index 0030ad2..0000000 --- a/roles/CI-setup/tasks/setup/default.yaml +++ /dev/null @@ -1,5 +0,0 @@ -- name: Warn about unsupported distribution - debug: - msg: > - WARNING: {{ ansible_distribution }} not supported for Kata CI under Zuul. - You can add support to this directory if desired. diff --git a/roles/check-github-pr-is-wip/README.rst b/roles/check-github-pr-is-wip/README.rst deleted file mode 100644 index 5d4392a..0000000 --- a/roles/check-github-pr-is-wip/README.rst +++ /dev/null @@ -1,17 +0,0 @@ -Fail if any WIP labels are attached to a given GitHub PR, or if -any WIP keywords are included in a given GitHub PR title. - -**Role Variables** - -.. zuul:rolevar:: github_pr - - URL for the GitHub PR to check. Should be something like: - https://github.com/kata-containers/runtime/pull/1112 - -.. zuul:rolevar:: wip_labels - - Space-separated label names to consider as WIP labels. - -.. zuul:rolevar:: wip_keywords - - Space-separated keywords to consider as WIP keywords in PR titles. diff --git a/roles/check-github-pr-is-wip/files/github_wip.py b/roles/check-github-pr-is-wip/files/github_wip.py deleted file mode 100755 index b2a8100..0000000 --- a/roles/check-github-pr-is-wip/files/github_wip.py +++ /dev/null @@ -1,68 +0,0 @@ -#!/usr/bin/python3 -# -# Job testing a GitHub PR for presence of specific WIP labels -# or specific WIP keywords in PR title, in order to block merging. -# -# Copyright 2018 Thierry Carrez -# All Rights Reserved. -# -# 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. - -import argparse -import json -import re -import sys -import urllib.request - - -def get_github_PR(change_url): - match = re.search(r".*/([^/]+/[^/]+)/pulls?/(\d+)", change_url) - repository = match.group(1) - prnumber = match.group(2) - - url = 'https://api.github.com/repos/%s/pulls/%s' % (repository, prnumber) - - with urllib.request.urlopen(url) as link: - data = json.loads(link.read().decode()) - return data - - -def is_wip(change, wip_keywords, wip_labels): - for wip_keyword in wip_keywords: - if wip_keyword in change['title']: - print('%s is mentioned in PR title' % wip_keyword) - return True - - for label in change['labels']: - for wip_label in wip_labels: - if label['name'] == wip_label: - print('PR is labeled %s' % wip_label) - return True - - print('No blocking marker found, this PR is OK to merge') - return False - - -def main(): - parser = argparse.ArgumentParser(description='Is the PR blocked ?') - parser.add_argument('change_url', help='GitHub PR URL') - parser.add_argument('keywords', help='Key words in PR title to block on') - parser.add_argument('labels', help='Names of labels to block on') - args = parser.parse_args() - - change = get_github_PR(args.change_url) - sys.exit(is_wip(change, args.keywords.split(), args.labels.split())) - - -if __name__ == "__main__": - main() diff --git a/roles/check-github-pr-is-wip/tasks/main.yaml b/roles/check-github-pr-is-wip/tasks/main.yaml deleted file mode 100644 index 64f75d4..0000000 --- a/roles/check-github-pr-is-wip/tasks/main.yaml +++ /dev/null @@ -1,3 +0,0 @@ ---- -- name: Check for WIP labels or WIP title keywords on a GitHub PR - script: github_wip.py {{ github_pr }} '{{ wip_keywords }}' '{{ wip_labels }}' diff --git a/test-requirements.txt b/test-requirements.txt deleted file mode 100644 index 1f6bc71..0000000 --- a/test-requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -ansible>=2.5.1,<2.6 # https://review.openstack.org/567007 -ansible-lint<4 -stestr>=1.0.0 # Apache-2.0 diff --git a/tox.ini b/tox.ini deleted file mode 100644 index 085c8d3..0000000 --- a/tox.ini +++ /dev/null @@ -1,42 +0,0 @@ -[tox] -minversion = 1.6 -skipsdist = True -envlist = linters - -[testenv] -basepython = python3 -install_command = pip install {opts} {packages} -deps = -r{toxinidir}/test-requirements.txt -commands = stestr run {posargs} - stestr slowest - -[testenv:bindep] -# Do not install any requirements. We want this to be fast and work even if -# system dependencies are missing, since it's used to tell you what system -# dependencies are missing! This also means that bindep must be installed -# separately, outside of the requirements files. -deps = bindep -commands = bindep test - -[testenv:linters] -passenv = - # NOTE(pabelanger): if you'd like to run tox -elinters locally, you'll need - # to export ANSIBLE_ROLES_PATH pointing to the currect repos. - # see openstack-zuul-jobs-linters job for more information. - ANSIBLE_ROLES_PATH -setenv = - ANSIBLE_LIBRARY= {envsitepackagesdir}/zuul/ansible/library -whitelist_externals = bash -commands = - # Ansible lint - # [ANSIBLE0012] Commands should not change things if nothing needs doing - bash -c "find playbooks -type f -regex '.*.ya?ml' -print0 | \ - xargs -t -n1 -0 ansible-lint -xANSIBLE0012" - bash -c 'find roles -maxdepth 1 -mindepth 1 -type d -printf "%p/\n" | \ - xargs -t -n1 ansible-lint -xANSIBLE0012' - # Ansible Syntax Check - bash -c "find playbooks -type f -regex '.*.ya?ml' -exec \ - ansible-playbook --syntax-check -i {toxinidir}/tests/inventory \{\} + > /dev/null" - -[testenv:venv] -commands = {posargs} diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml deleted file mode 100644 index 5567d53..0000000 --- a/zuul.d/jobs.yaml +++ /dev/null @@ -1,46 +0,0 @@ ---- -# Shared zuul config specific to Kata Containers Zuul tenant -# Contains definitions of trusted jobs - -- job: - name: kata-zuul-jobs-linters - parent: tox - description: | - This job runs against kata's zuul-config and zuul-jobs - so we can properly lint our ansible playbooks / roles - required-projects: - - kata-containers/zuul-config - - zuul/zuul-jobs - vars: - tox_envlist: linters - tox_environment: - ANSIBLE_ROLES_PATH: >- - ~/src/opendev.org/zuul/zuul-jobs/roles:~/src/opendev.org/kata-containers/zuul-config/roles - -- job: - name: kata-github-wip - description: | - This job calls the github-wip playbook with a Kata-curated set of - WIP labels and WIP title keywords - run: playbooks/github-wip/run.yaml - nodeset: - nodes: [] - vars: - wip_labels: 'do-not-merge wip rfc' - wip_keywords: 'WIP RFC' - -- job: - name: QA-check-Ubuntu-16.04 - description: | - This job calls the QA-check playbook - pre-run: playbooks/CI-setup/presetup.yaml - run: playbooks/QA-check/run.yaml - post-run: playbooks/CI-setup/postrun.yaml - # Our CI jobs can take >1h00m to complete - but should be done within - # 2h00m (7200s) - timeout: 7200 - nodeset: - # Ensure we get a Kata capable Ubuntu 16.04 server - nodes: - - name: ubuntu-xenial - label: ubuntu-xenial-vexxhost diff --git a/zuul.d/pipelines.yaml b/zuul.d/pipelines.yaml deleted file mode 100644 index b3fcb94..0000000 --- a/zuul.d/pipelines.yaml +++ /dev/null @@ -1,192 +0,0 @@ ---- -# Shared zuul config specific to the Kata Containers Zuul tenant -# Contains definitions of pipelines - -- pipeline: - name: gerrit-check - description: | - Newly uploaded Gerrit patchsets enter this pipeline to receive an - initial +/-1 Verified vote. - success-message: Build succeeded (check pipeline). - failure-message: | - Build failed (check pipeline). For information on how to proceed, see - http://docs.openstack.org/infra/manual/developers.html#automated-testing - manager: independent - precedence: low - require: - gerrit: - open: true - current-patchset: true - trigger: - gerrit: - - event: patchset-created - - event: change-restored - - event: comment-added - comment: (?i)^(Patch Set [0-9]+:)?( [\w\\+-]*)*(\n\n)?\s*recheck - success: - gerrit: - # Note that gerrit keywords are case-sensitive. - Verified: 1 - mysql: - failure: - gerrit: - Verified: -1 - mysql: - -- pipeline: - name: gerrit-gate - description: | - Gerrit changes that have been approved by core reviewers are enqueued - in order in this pipeline, and if they pass tests, will be merged. - success-message: Build succeeded (gate pipeline). - failure-message: | - Build failed (gate pipeline). For information on how to proceed, see - http://docs.openstack.org/infra/manual/developers.html#automated-testing - manager: dependent - precedence: normal - post-review: true - require: - gerrit: - open: true - current-patchset: true - trigger: - gerrit: - - event: comment-added - approval: - - Workflow: 1 - - event: comment-added - comment: (?i)^(Patch Set [0-9]+:)?( [\w\\+-]*)*(\n\n)?\s*reverify - start: - gerrit: - Verified: 0 - success: - gerrit: - Verified: 2 - submit: true - mysql: - failure: - gerrit: - Verified: -2 - mysql: - window-floor: 20 - window-increase-factor: 2 - -- pipeline: - name: SoB-check - description: | - New and modified GitHub PRs enter this pipeline to be tested. - success-message: DCO (Signed-Off-By) is present. - failure-message: Missing DCO (Signed-Off-By) in commit message. - manager: independent - precedence: low - trigger: - github: - - event: pull_request - action: - - opened - - changed - - reopened - - event: pull_request - action: comment - comment: (?i)^\s*/zuul-recheck\s*$ - start: - github: - status: pending - comment: false - success: - github: - status: 'success' - comment: false - status-url: | - https://github.com/kata-containers/community/wiki/The-SoB-check - mysql: - failure: - github: - status: 'failure' - comment: false - status-url: | - https://github.com/kata-containers/community/wiki/The-SoB-check - mysql: - # Don't report merge-failures to github - merge-failure: - mysql: - -- pipeline: - name: WIP-check - description: | - New, modified and re-labelled GitHub PRs enter this pipeline to - have their merge-readiness status reevaluated. - success-message: PR is ready to merge. - failure-message: PR merging is blocked by a WIP label or title keyword. - manager: independent - precedence: low - trigger: - github: - - event: pull_request - action: - - opened - - changed - - reopened - - labeled - - unlabeled - start: - github: - status: pending - comment: false - success: - github: - status: 'success' - comment: false - status-url: | - https://github.com/kata-containers/community/wiki/The-WIP-check - mysql: - failure: - github: - status: 'failure' - comment: false - status-url: | - https://github.com/kata-containers/community/wiki/The-WIP-check - mysql: - # Don't report merge-failures to github - merge-failure: - mysql: - -- pipeline: - name: PR-check - description: | - New and modified GitHub PRs enter this pipeline to be tested. - success-message: PR checks OK. - failure-message: PR checks failed. - manager: independent - precedence: low - trigger: - github: - - event: pull_request - action: - - opened - - changed - - reopened - - event: pull_request - action: comment - comment: (?i)^\s*/zuul-recheck\s*$ - start: - github: - status: pending - comment: false - success: - github: - status: 'success' - comment: false - status-url: | - https://github.com/kata-containers/community/wiki/Zuul-PR-checks - mysql: - failure: - github: - status: 'failure' - comment: false - status-url: | - https://github.com/kata-containers/community/wiki/Zuul-PR-checks - mysql: - # Don't report merge-failures to github - merge-failure: - mysql: diff --git a/zuul.d/project-templates.yaml b/zuul.d/project-templates.yaml deleted file mode 100644 index d8905f6..0000000 --- a/zuul.d/project-templates.yaml +++ /dev/null @@ -1,12 +0,0 @@ ---- -- project-template: - name: kata-pre-checks - description: | - This template contains pre-check tests for Kata containers - repositories. - SoB-check: - jobs: - - dco-license - WIP-check: - jobs: - - kata-github-wip diff --git a/zuul.d/projects.yaml b/zuul.d/projects.yaml deleted file mode 100644 index f840d31..0000000 --- a/zuul.d/projects.yaml +++ /dev/null @@ -1,12 +0,0 @@ ---- -# Shared zuul config specific to the Kata Containers Zuul tenant -# Contains job pipeline definitions for each project - -- project: - name: kata-containers/zuul-config - gerrit-check: - jobs: - - noop - gerrit-gate: - jobs: - - noop