Packit 7a13c81
# See the documentation for more information:
Packit 7a13c81
# https://packit.dev/docs/configuration/
Packit 7a13c81
Packit 7a13c81
specfile_path: fedora-messaging.spec
Packit 7a13c81
issue_repository: https://github.com/fedora-infra/fedora-messaging
Packit 7a13c81
Packit 7a13c81
# add or remove files that should be synced
Packit 7a13c81
files_to_sync:
Packit 7a13c81
    - fedora-messaging.spec
Packit 7a13c81
    - .packit.yaml
Packit 7a13c81
Packit 7a13c81
# name in upstream package repository or registry (e.g. in PyPI)
Packit 7a13c81
upstream_package_name: fedora-messaging
Packit 7a13c81
# downstream (Fedora) RPM package name
Packit 7a13c81
downstream_package_name: fedora-messaging
Packit e205f33
upstream_tag_template: v{version}
Packit 7a13c81
Packit 7a13c81
# dependencies needed to prepare for and build the source RPM
Packit 7a13c81
srpm_build_deps:
Packit 7a13c81
  - wget
Packit 7a13c81
Packit 7a13c81
actions:
Packit 7a13c81
  post-upstream-clone:
Packit 7a13c81
    # fetch specfile from src.fp.o
Packit 7a13c81
    - "wget https://src.fedoraproject.org/rpms/fedora-messaging/raw/main/f/fedora-messaging.spec -O fedora-messaging.spec"
Packit 7a13c81
  get-current-version:
Packit 7a13c81
    # fetch the version number of the package from the setup.py file
Packit 7a13c81
    - "python3 setup.py --version"
Packit 7a13c81
Packit 7a13c81
jobs:
Packit 7a13c81
  # upon upstream PRs, perform COPR builds
Packit 7a13c81
  - job: copr_build
Packit 7a13c81
    trigger: pull_request
Packit 7a13c81
    metadata:
Packit 7a13c81
      targets:
Packit 7a13c81
        - fedora-latest-stable
Packit 7a13c81
        - fedora-development
Packit 7a13c81
Packit 7a13c81
  # upon upstream PRs, test builds
Packit 7a13c81
  - job: tests
Packit 7a13c81
    trigger: pull_request
Packit 7a13c81
    metadata:
Packit 7a13c81
      targets:
Packit 7a13c81
        - fedora-latest-stable
Packit 7a13c81
        - fedora-development
Packit 7a13c81
Packit 7a13c81
  # upon upstream releases, perform COPR builds
Packit 7a13c81
  - job: copr_build
Packit 7a13c81
    trigger: release
Packit 7a13c81
    metadata:
Packit 7a13c81
      targets:
Packit 7a13c81
        - fedora-latest-stable
Packit 7a13c81
        - fedora-development
Packit 7a13c81
Packit 7a13c81
  # upon upstream releases, test builds
Packit 7a13c81
  - job: tests
Packit 7a13c81
    trigger: release
Packit 7a13c81
    metadata:
Packit 7a13c81
      targets:
Packit 7a13c81
        - fedora-latest-stable
Packit 7a13c81
        - fedora-development
Packit 7a13c81
Packit 7a13c81
  # upon downstream changes, create a PR upstream with sync'd files from above
Packit 7a13c81
  - job: sync_from_downstream
Packit 7a13c81
    trigger: commit
Packit 7a13c81
Packit 7a13c81
  # land upstream release in fedora dist-git - no builds
Packit 7a13c81
  - job: propose_downstream
Packit 7a13c81
    trigger: release
Packit 7a13c81
    metadata:
Packit 7a13c81
      dist_git_branches:
Packit 7a13c81
        - fedora-latest-stable
Packit 7a13c81
        - fedora-development
Packit 7a13c81
Packit 7a13c81
  # create an srpm from upstream and submit a scratch build to koji
Packit 7a13c81
  - job: production_build
Packit 7a13c81
    trigger: release
Packit 7a13c81
    metadata:
Packit 7a13c81
      targets:
Packit 7a13c81
        - fedora-latest-stable
Packit 7a13c81
        - fedora-development
Packit 7a13c81
Packit 7a13c81
  # downstream automation
Packit 7a13c81
Packit 7a13c81
  # trigger a build in koji for a new dist-git commit
Packit 7a13c81
  - job: koji_build
Packit 7a13c81
    trigger: commit
Packit 7a13c81
    metadata:
Packit 7a13c81
      dist_git_branches:
Packit 7a13c81
        - fedora-latest-stable
Packit 7a13c81
        - fedora-development
Packit 7a13c81
Packit 7a13c81
  # create a new update in bodhi for a successful koji build. directly related to `koji_build`
Packit 7a13c81
  - job: bodhi_update
Packit 7a13c81
    trigger: commit
Packit 7a13c81
    metadata:
Packit 7a13c81
      dist_git_branches:
Packit 7a13c81
        - fedora-latest-stable
Packit 7a13c81
        - fedora-development