|
| 1 | +# See the documentation for more information: |
| 2 | +# https://packit.dev/docs/configuration/ |
| 3 | + |
| 4 | +specfile_path: {{ cookiecutter.slug }}.spec |
| 5 | +issue_repository: {{ cookiecutter.github_url }} |
| 6 | + |
| 7 | +# add or remove files that should be synced |
| 8 | +files_to_sync: |
| 9 | + - {{ cookiecutter.slug }}.spec |
| 10 | + - .packit.yaml |
| 11 | + |
| 12 | +# name in upstream package repository/registry (e.g. in PyPI) |
| 13 | +upstream_package_name: {{ cookiecutter.slug }} |
| 14 | +# downstream (Fedora) RPM package name |
| 15 | +downstream_package_name: {{ cookiecutter.slug }} |
| 16 | +# tag template if not just the version |
| 17 | +upstream_tag_template: v{version} |
| 18 | + |
| 19 | +targets: |
| 20 | + - fedora-latest-stable |
| 21 | + - fedora-development |
| 22 | + - epel-9 |
| 23 | + - epel-10 |
| 24 | + |
| 25 | +actions: |
| 26 | + post-upstream-clone: |
| 27 | + # fetch specfile from src.fp.o |
| 28 | + # - "curl https://src.fedoraproject.org/rpms/{{ cookiecutter.slug }}/raw/main/{{ cookiecutter.slug[0] }}/{{ cookiecutter.slug }}.spec -o {{ cookiecutter.slug }}.spec" |
| 29 | + - "sh -c 'curl -sSL https://install.python-poetry.org | python3 -'" |
| 30 | + - "sh -c '$HOME/.local/bin/poetry --version'" |
| 31 | + create-archive: |
| 32 | + - "sh -c '$HOME/.local/bin/poetry build -f sdist'" |
| 33 | + - "sh -c 'echo dist/{{ cookiecutter.pkg_name }}-$($HOME/.local/bin/poetry version -s).tar.gz'" |
| 34 | + get-current-version: |
| 35 | + # fetch the version number of the package |
| 36 | + - "sh -c '$HOME/.local/bin/poetry version -s'" |
| 37 | + |
| 38 | +jobs: |
| 39 | + # upon upstream PRs, perform COPR builds |
| 40 | + - job: copr_build |
| 41 | + trigger: pull_request |
| 42 | + |
| 43 | + # upon upstream PRs, test builds |
| 44 | + - job: tests |
| 45 | + trigger: pull_request |
| 46 | + |
| 47 | + # upon upstream releases, perform COPR builds |
| 48 | + - job: copr_build |
| 49 | + trigger: release |
| 50 | + |
| 51 | + # upon upstream releases, test builds |
| 52 | + - job: tests |
| 53 | + trigger: release |
| 54 | + |
| 55 | + # land upstream release in fedora dist-git - no builds |
| 56 | + # https://packit.dev/docs/configuration/upstream/propose_downstream |
| 57 | + - job: propose_downstream |
| 58 | + trigger: release |
| 59 | + dist_git_branches: |
| 60 | + - main: |
| 61 | + fast_forward_merge_into: |
| 62 | + - fedora-latest-stable |
| 63 | + - epel-9: {} |
| 64 | + - epel-10: {} |
| 65 | + |
| 66 | + # create an srpm from upstream and submit a scratch build to koji |
| 67 | + - job: upstream_koji_build |
| 68 | + trigger: release |
| 69 | + |
| 70 | + # downstream automation |
| 71 | + |
| 72 | + # upon downstream changes, create a PR upstream with sync'd files from above |
| 73 | + - job: sync_from_downstream |
| 74 | + trigger: commit |
| 75 | + |
| 76 | + # trigger a build in koji for a new dist-git commit |
| 77 | + - job: koji_build |
| 78 | + trigger: commit |
| 79 | + |
| 80 | + # create a new update in bodhi for a successful koji build. directly related to `koji_build` |
| 81 | + # https://packit.dev/docs/configuration/downstream/bodhi_update |
| 82 | + - job: bodhi_update |
| 83 | + trigger: commit |
| 84 | + dist_git_branches: |
| 85 | + # Don't create an update on Rawhide. |
| 86 | + - fedora-latest-stable |
| 87 | + - epel-9 |
| 88 | + - epel-10 |
| 89 | + |
0 commit comments