# See the documentation for more information:
# https://packit.dev/docs/configuration/

specfile_path: beaker.spec

# add or remove files that should be synced
files_to_sync:
  - beaker.spec
  - .packit.yaml

notifications:
  pull_request:
    successful_build: false

jobs:
  - &copr_rhel_9_10
    job: copr_build
    trigger: pull_request
    targets:
      - epel-9-x86_64
      - epel-10-x86_64
    identifier: rhel_9_10

  - &copr_fedora
    job: copr_build
    trigger: pull_request
    targets:
      - epel-10-x86_64
    identifier: rhel_10
    actions:
      post-upstream-clone:
        # disable broken unit tests
        - sed -i '/make check/d' beaker.spec

  - job: copr_build
    trigger: pull_request
    targets:
      - fedora-all-x86_64
    identifier: fedora

  - &copr_rhel_7
    job: copr_build
    trigger: pull_request
    targets:
      epel-7-x86_64:
        additional_repos:
          - https://beaker-project.org/yum/server/RedHatEnterpriseLinux7/
          - https://vault.centos.org/centos/7/extras/x86_64/
    identifier: rhel_7
    actions:
      post-upstream-clone:
        # Use gevent from base repositories during packit builds
        # gevent112 is our custom build with some backports to improve socket management
        - sed -i 's/python2-gevent112/python-gevent/g' beaker.spec
  - <<: *copr_rhel_9_10
    trigger: commit
    branch: python-3

  - <<: *copr_fedora
    trigger: commit
    branch: python-3

  - <<: *copr_rhel_7
    trigger: commit
    branch: python-3

