{"id":21452257,"url":"https://github.com/packit/packit-service-zuul","last_synced_at":"2025-07-14T22:30:51.514Z","repository":{"id":37265883,"uuid":"203348683","full_name":"packit/packit-service-zuul","owner":"packit","description":"Configuration for packit-service tenant in Zuul","archived":false,"fork":false,"pushed_at":"2024-11-18T23:10:48.000Z","size":201,"stargazers_count":0,"open_issues_count":2,"forks_count":9,"subscribers_count":9,"default_branch":"main","last_synced_at":"2024-11-19T00:20:25.987Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/packit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-08-20T09:56:12.000Z","updated_at":"2023-04-18T06:59:26.000Z","dependencies_parsed_at":"2023-10-03T18:54:14.588Z","dependency_job_id":"2c5872d4-5e61-490d-95e5-1841f218c6e9","html_url":"https://github.com/packit/packit-service-zuul","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/packit%2Fpackit-service-zuul","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/packit%2Fpackit-service-zuul/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/packit%2Fpackit-service-zuul/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/packit%2Fpackit-service-zuul/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/packit","download_url":"https://codeload.github.com/packit/packit-service-zuul/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226001560,"owners_count":17558004,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-23T04:28:32.130Z","updated_at":"2024-11-23T04:28:32.751Z","avatar_url":"https://github.com/packit.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# packit-service-zuul\n\n## About Zuul CI - softwarefactory-project.io\n\n[Zuul](https://zuul-ci.org) is a CI system invented in the OpenStack community.\n[Softwarefactory](https://softwarefactory-project.io) (SF) is project which is hosting services (Zuul being one of them) to ease development of open source projects.\n\n## How it works in our case\n\nWe have [softwarefactory-project-zuul](https://github.com/apps/softwarefactory-project-zuul)\nGitHub App [installed to all packit-service repos](https://github.com/organizations/packit-service/settings/installations).\nWe have a separate [packit-service tenant in Zuul](https://softwarefactory-project.io/zuul/t/packit-service/status).\nIt uses the configuration from this repository, see especially\n[jobs.yaml](https://github.com/packit-service/packit-service-zuul/blob/main/zuul.d/jobs.yaml)\nand [pipelines.yaml](https://github.com/packit-service/packit-service-zuul/blob/main/zuul.d/pipelines.yaml)\nin [zuul.d/](https://github.com/packit-service/packit-service-zuul/tree/main/zuul.d).\nWe can easily use those pipelines \u0026 jobs from other repositories so if you have\na job which could be used by more repositories, you can add it to\n[jobs.yaml](https://github.com/packit-service/packit-service-zuul/blob/main/zuul.d/jobs.yaml).\n\nTo enable Zuul in another repository, add it to\n[our tenant config](https://softwarefactory-project.io/cgit/config/tree/resources/tenant-packit-service.yaml)\nby following [The Config repository](https://softwarefactory-project.io/docs/user/config_repo.html)\nand [Contribute to a project](https://softwarefactory-project.io/docs/user/index.html), specifically:\n\n- Add your ssh key to https://softwarefactory-project.io/r/settings/#SSHKeys if it's not already there.\n  (Last time, my [3072b RSA key didn't work](https://dev.to/bowmanjd/upgrade-ssh-client-keys-and-remote-servers-after-fedora-33-s-new-crypto-policy-47ag),\n  so I had to generate a ED25519 key.)\n- `git clone https://softwarefactory-project.io/r/config`\n- Edit `resources/tenant-packit-service.yaml` and commit\n- `dnf install git-review` \u0026 `git review`\n  (Last time I had to do `git review -R`, install suggested hook and amend)\n- Follow the review ticket and once it's approved and merged the configuration will be updated.\n\nThen create a `.zuul.yaml` and define `noop` job inside to test the connection,\nsee [example](https://github.com/packit-service/packit-service-zuul/pull/8/files).\nOnce the testing is done, there is a new comment posted in the PR with links to each job.\nIf it looks OK, add any other jobs you want and remove the `noop` one.\n\nYour locally cloned repo is: `project_dir: \"{{ ansible_user_dir }}/{{ zuul.project.src_dir }}\"`\n\n## More useful links\n\n- [Zuul Documentation](https://zuul-ci.org/docs), esp. [Job](https://zuul-ci.org/docs/zuul/reference/job_def.html) \u0026 [Job Content](https://zuul-ci.org/docs/zuul/reference/jobs.html) in [User Reference](https://zuul-ci.org/docs/zuul/reference/user.html)\n- [zuul/zuul-jobs](https://opendev.org/zuul/zuul-jobs) - Ansible job definitions for Zuul. [Roles](https://opendev.org/zuul/zuul-jobs/src/branch/master/roles) are [used](https://zuul-ci.org/docs/zuul/reference/job_def.html#attr-job.roles) by the [base job](https://github.com/packit-service/packit-service-zuul/blob/main/zuul.d/jobs.yaml#L10).\n- [OpenStack's repo](https://opendev.org/zuul/zuul-jobs/src/branch/master) with existing jobs, playbooks and roles and [repositories which use it](https://opendev.org/openstack).\n- [Available nodes](https://softwarefactory-project.io/cgit/config/tree/nodepool/diskimages/package.dhall).\n- Zuul/Gerrit questions \u0026 issues:\n  - Slack channel #rhos-ops\n  - softwarefactory-operations-team@redhat.com\n\n## Debug locally in a Zuul VM\n\nTo debug issues related with the _Zuul VM_ you can follow this steps:\n\n- Install some _virt tools_ and Ansible:\n\n```\n$ sudo dnf install libvirt /usr/bin/virt-customize virt-manager ansible\n```\n\n- Clone `https://softwarefactory-project.io/r/config` and `cd` into it.\n\n- Add ansible, if you need to run a playbook inside the VM, to the list of installed packages\n\n```patch\ndiff --git a/nodepool/virt_images/cloud-fedora-35.yaml b/nodepool/virt_images/cloud-fedora-35.yaml\nindex b00d4b2e..385b955c 100644\n--- a/nodepool/virt_images/cloud-fedora-35.yaml\n+++ b/nodepool/virt_images/cloud-fedora-35.yaml\n@@ -43,6 +43,7 @@\n       - python3-pyyaml\n       # For add-build-sshkey\n       - python3-libselinux\n+      - ansible\n   tasks:\n     - block:\n         - import_role:\n```\n\n- Provide your public key to be able to SSH into the VM later, following this patch example\n\n```patch\ndiff --git a/nodepool/virt_images/roles/zuul-user/tasks/main.yaml b/nodepool/virt_images/roles/zuul-user/tasks/main.yaml\nindex e771c27d..9eb8cd3e 100644\n--- a/nodepool/virt_images/roles/zuul-user/tasks/main.yaml\n+++ b/nodepool/virt_images/roles/zuul-user/tasks/main.yaml\n@@ -8,7 +8,7 @@\n\n - name: Prepare the authorized_keys file\n   copy:\n-    src: /var/lib/nodepool/.ssh/zuul_rsa.pub\n+    src: /home/maja/.ssh/id_rsa.pub\n     dest: \"{{ image_tmp_dir }}/authorized_keys\"\n     remote_src: true\n```\n\n- Build the _Zuul VM qcow2 image_; changing the `image_output` variable to a suitable location.\n\n```\n$ ansible-playbook -vvv -c local -i localhost, -e qcow2_type=true -e image_output=/home/maja/softwarefactory.io/zuul -bK nodepool/virt_images/cloud-fedora-35.yaml\n```\n\n- Use the _Virtual Machine Manager_ to create a new VM:\n\n  - File -\u003e New Virtual Machine\n  - Choose Import existing disk image\n  - Browse -\u003e Browse Local to the `image_output` dir and select _zuul.qcow2_\n  - Type _Fedora XX_ as your operating system type\n  - Create the new VM with the other wizard default settings\n\n- ssh into the VM like in the example; once the VM is started its **IP** is _displayed above the login prompt_\n\n```\n$ ssh zuul-worker@192.168.122.253\n```\n\n- If you need to debug the hardly CI, as an example, copy the hardly project into the VM and enter the VM again:\n\n```\n$ scp -r /home/maja/PycharmProjects/hardly/ zuul-worker@192.168.122.253:/home/zuul-worker\n$ ssh zuul-worker@192.168.122.253\n```\n\n- Start the ansible playbook for the CI with something like the following\n\n```\n$ cd hardly\n$ ansible-playbook -vvv -c local -i localhost, -e '{\"zuul\": {\"branch\": \"main\", \"project\": {\"src_dir\": \"/home/zuul-worker/hardly\"}}}' files/zuul-tests.yaml\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpackit%2Fpackit-service-zuul","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpackit%2Fpackit-service-zuul","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpackit%2Fpackit-service-zuul/lists"}