From cb00e0c13450a8265f7dc7c376071b3d2a93bb20 Mon Sep 17 00:00:00 2001 From: Fabien Boucher Date: Aug 20 2019 15:48:28 +0000 Subject: Add zuul-extra.d and reduced/cleaned default jobs Also add test-rpm-lint as an initial test for the default job rpm-lint. --- diff --git a/README b/README index aa8eb36..5e1f8fc 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ # distro jobs toolbox -This project contains job and roles to manage RPM build and publication +This project contains jobs and roles to manage RPM build and publication with Zuul. diff --git a/playbooks/rpm/mock-build.yaml b/playbooks/rpm/mock-build.yaml new file mode 100644 index 0000000..fc70db3 --- /dev/null +++ b/playbooks/rpm/mock-build.yaml @@ -0,0 +1,4 @@ +- hosts: mock-host + roles: + - mock-srpm-build + - mock-build diff --git a/playbooks/rpm/repo-fetch.yaml b/playbooks/rpm/repo-fetch.yaml new file mode 100644 index 0000000..3272196 --- /dev/null +++ b/playbooks/rpm/repo-fetch.yaml @@ -0,0 +1,3 @@ +- hosts: mock-host + roles: + - repo-fetch diff --git a/zuul-extra.d/jobs.yaml b/zuul-extra.d/jobs.yaml new file mode 100644 index 0000000..1d5a845 --- /dev/null +++ b/zuul-extra.d/jobs.yaml @@ -0,0 +1,15 @@ +--- +- job: + name: test-rpm-lint + parent: rpm-lint + match-on-config-updates: true + files: + - ^playbooks/rpm/lint.yaml + - ^roles/rpm-lint.*$ + vars: + rpms: + - https://kojipkgs.fedoraproject.org//packages/python-bcrypt/3.1.7/1.fc32/x86_64/python2-bcrypt-3.1.7-1.fc32.x86_64.rpm + nodeset: + nodes: + - name: fedora-node + label: cloud-fedora diff --git a/zuul-extra.d/project.yaml b/zuul-extra.d/project.yaml new file mode 100644 index 0000000..748c19b --- /dev/null +++ b/zuul-extra.d/project.yaml @@ -0,0 +1,26 @@ +--- +- project: + check: + jobs: + - test-rpm-lint + - linters: + vars: + linters: + - ansible-lint + - yamllint + nodeset: + nodes: + - name: centos-container + label: runc-centos + gate: + jobs: + - test-rpm-lint + - linters: + vars: + linters: + - ansible-lint + - yamllint + nodeset: + nodes: + - name: centos-container + label: runc-centos diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml index 5893ced..bb684d3 100644 --- a/zuul.d/jobs.yaml +++ b/zuul.d/jobs.yaml @@ -1,116 +1,45 @@ --- - job: - name: dlrn-rpm-build - abstract: true + name: rpm-mock-build description: | - Base job to build rpm(s) from package with DLRN + Base job to build rpm(s) in a mock from a distgit repository. Responds to these variables: - .. zuul:jobvar:: dlrn_project - - Name of the packaging project. - - .. zuul:jobvar:: dlrn_config_dir - - Path in the Zuul executor where to find mock cfg files - - .. zuul:jobvar:: dlrn_info_type - :default: local + .. zuul:jobvar:: mock_config + : default: fedora-rawhide-x86_64 - Can be be rdoinfo or local + Mock config from /etc/mock/. - provides: dlrn-repo - requires: dlrn-repo - run: playbooks/dlrn/build.yaml - post-run: playbooks/dlrn/fetch.yaml - -- job: - name: dlrn-mock-rpm-build - description: Build rpm(s) in a mock - parent: dlrn-rpm-build - abstract: true - vars: - dlrn_builder_type: mock + provides: repo + requires: repo + run: playbooks/rpm/mock-build.yaml + post-run: playbooks/rpm/repo-fetch.yaml - job: - name: dlrn-koji-rpm-build + name: rpm-lint description: | - Build rpm(s) in Koji + Base job to run rpm-lint on rpms Responds to these variables: - .. zuul:jobvar:: krb_principal - - The Kerberos principal. - - .. zuul:jobvar:: krb_keytab_path - - The path to principal's keytab. - - parent: dlrn-rpm-build - abstract: true + .. zuul:jobvar:: rpms + : default: [] + run: playbooks/rpm/lint.yaml vars: - dlrn_builder_type: koji - koji_build_target: rawhide + rpms: [] - job: - name: dlrn-copr-rpm-build + name: repo-rpm-lint description: | - Build rpm(s) in Copr - - Responds to these variables: - - .. zuul:jobvar:: copr_id - - The Kerberos principal. - - parent: dlrn-rpm-build - abstract: true - vars: - dlrn_builder_type: copr + Job to run rpm-lint on rpms from a repo artifact + requires: repo + run: playbooks/rpm/artifact-lint.yaml -- job: - name: rpm-lint - description: Run rpm-lint on rpms url - run: playbooks/rpm/lint.yaml - vars: - rpms: [] +### legacy ### - job: name: base-artifact-rpm-lint description: Run rpm-lint on rpms the repo artifacts abstract: true run: playbooks/rpm/artifact-lint.yaml - -# Below are some job examples -# - job: -# name: example-rpm-mock-build -# description: Build rpm(s) for Fedora rawhide -# parent: dlrn-mock-rpm-build -# required-projects: -# - fedora-zuul-packaging-jobs -# nodeset: -# nodes: -# - name: mock-node -# label: cloud-fedora -# vars: -# dlrn_project: fedora-rawhide-x86_64 -# dlrn_config_dir: pagure.io/fedora-zuul-packaging-jobs/mocks - -# - job: -# name: example-rpm-mock-build -# description: Build rpm(s) for Fedora rawhide -# parent: dlrn-mock-rpm-build -# required-projects: -# - fedora-zuul-packaging-jobs -# nodeset: -# nodes: -# - name: mock-node -# label: cloud-fedora -# vars: -# dlrn_project: fedora-rawhide-x86_64 -# dlrn_config_dir: pagure.io/fedora-zuul-packaging-jobs/mocks -# krb_principal: jdoe@FEDORAPROJECT.ORG -# krb_keytab_path: "{{ ansible_user_dir }}/jdoe.keytab" - diff --git a/zuul.d/project.yaml b/zuul.d/project.yaml deleted file mode 100644 index a8d62d8..0000000 --- a/zuul.d/project.yaml +++ /dev/null @@ -1,24 +0,0 @@ ---- -- project: - check: - jobs: - - linters: - vars: - linters: - - ansible-lint - - yamllint - nodeset: - nodes: - - name: centos-container - label: runc-centos - gate: - jobs: - - linters: - vars: - linters: - - ansible-lint - - yamllint - nodeset: - nodes: - - name: centos-container - label: runc-centos