Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Identifiers issue [just for demonstrating the issue - do not merge] #258

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
141 changes: 75 additions & 66 deletions .packit.yaml
Original file line number Diff line number Diff line change
@@ -1,81 +1,112 @@
---
# We want to use both instances for all upstream jobs including the `propose-downstream` one.
# For downstream, we need to pick just one instance (`stg` in our case)
# and redefine it for the `koji_build` and `bodhi_update` jobs.
packit_instances: ["prod", "stg"]

specfile_path: fedora/python-specfile.spec

# add or remove files that should be synced
files_to_sync:
- fedora/python-specfile.spec
- .packit.yaml
- src: plans/
dest: plans/
- src: .fmf/
dest: .fmf/

# name in upstream package repository or registry (e.g. in PyPI)
upstream_package_name: specfile
# downstream (Fedora) RPM package name
downstream_package_name: python-specfile

copy_upstream_release_description: true

upstream_project_url: https://github.com/packit/specfile
issue_repository: https://github.com/packit/specfile

copy_upstream_release_description: true

actions:
# we need this b/c `git archive` doesn't put all the metadata in the tarball:
# LookupError: setuptools-scm was unable to detect version for '/builddir/build/BUILD/ogr-0.11.1'.
# Make sure you're either building from a fully intact git repository or PyPI tarballs.
create-archive:
- python3 -m build --sdist --outdir ./fedora/
- bash -c "ls -1t ./fedora/*.tar.gz | head -n 1"
get-current-version: python3 -m setuptools_scm
pre-sync:
# FMF has to be installed on system where you are calling this tool.
- python3 plans/git_reference.py

packages:
specfile:
specfile_path: &specfile_path fedora/python-specfile.spec
files_to_sync:
- *specfile_path
- .packit.yaml
- src: plans/
dest: plans/
- src: .fmf/
dest: .fmf/
srpm_build_deps:
- python3-build
- python3-setuptools_scm
actions:
create-archive:
- python3 -m build --sdist --outdir ./fedora/
- bash -c "ls -1t ./fedora/*.tar.gz | head -n 1"
get-current-version: python3 -m setuptools_scm
srpm_build_deps:
- python3-build
- python3-setuptools_scm

specfile-epel8:
specfile_path: &specfile_path_epel8 epel8/python-specfile.spec
jobs:
- job: propose_downstream
trigger: release
dist_git_branches:
- fedora-all
- epel-9
- job: propose_downstream
trigger: release
specfile_path: epel8/python-specfile.spec
files_to_sync:
- *specfile_path_epel8
- epel8/python-specfile.spec
- .packit.yaml
- src: plans/
dest: plans/
- src: .fmf/
dest: .fmf/
srpm_build_deps:
- python3-setuptools_scm
dist_git_branches:
- epel-8

- job: copr_build
trigger: pull_request
identifier: fedora-and-epel
targets:
- fedora-all
- epel-9
- &copr_build_pr_epel8
job: copr_build
trigger: pull_request
specfile_path: epel8/python-specfile.spec
identifier: epel8
actions:
create-archive:
- python3 setup.py sdist --dist-dir ./epel8/
- bash -c "ls -1t ./epel8/*.tar.gz | head -n 1"
get-current-version: python3 setup.py --version
pre-sync:
# FMF has to be installed on system where you are calling this tool.
- python3 plans/git_reference.py
targets:
- epel-8

jobs:
- job: copr_build
- job: tests
trigger: pull_request
packages: [specfile]
identifier: fedora-and-epel
targets:
- fedora-all
- epel-9
- job: copr_build

- job: tests
trigger: pull_request
packages: [specfile-epel8]
identifier: epel8
targets:
- epel-8

- job: copr_build
trigger: commit
branch: main
packages: [specfile]
targets:
- fedora-all
- epel-9
project: packit-dev
list_on_homepage: True
preserve_project: True
- job: copr_build
- <<: *copr_build_pr_epel8
trigger: commit
branch: main
packages: [specfile-epel8]
targets:
- epel-8
project: packit-dev
Expand All @@ -85,17 +116,15 @@ jobs:
- job: copr_build
trigger: commit
branch: stable
packages: [specfile]
targets:
- fedora-stable
- epel-9
project: packit-stable
list_on_homepage: True
preserve_project: True
- job: copr_build
- <<: *copr_build_pr_epel8
trigger: commit
branch: stable
packages: [specfile-epel8]
targets:
- epel-8
project: packit-stable
Expand All @@ -104,58 +133,39 @@ jobs:

- job: copr_build
trigger: release
packages: [specfile]
targets:
- fedora-all
- epel-9
project: packit-releases
list_on_homepage: True
preserve_project: True
- job: copr_build
- <<: *copr_build_pr_epel8
trigger: release
packages: [specfile-epel8]
targets:
- epel-8
project: packit-releases
list_on_homepage: True
preserve_project: True

- job: tests
trigger: pull_request
packages: [specfile]
targets:
- fedora-all
- epel-9
- job: tests
trigger: pull_request
packages: [specfile-epel8]
targets:
- epel-8

- job: propose_downstream
trigger: release
packages: [specfile]
dist_git_branches:
- fedora-all
- epel-9
- job: propose_downstream
trigger: release
packages: [specfile-epel8]
dist_git_branches:
- epel-8

- job: pull_from_upstream
trigger: release
packages: [specfile]
dist_git_branches:
- fedora-all
- epel-9
- job: pull_from_upstream
trigger: release
packages: [specfile-epel8]
specfile_path: epel8/python-specfile.spec
files_to_sync:
- epel8/python-specfile.spec
- .packit.yaml
- src: plans/
dest: plans/
- src: .fmf/
dest: .fmf/
dist_git_branches:
- epel-8

# downstream automation:
- job: koji_build
trigger: commit
packit_instances: ["stg"]
Expand All @@ -164,7 +174,6 @@ jobs:
- fedora-all
- epel-9
- epel-8

- job: bodhi_update
trigger: commit
packit_instances: ["stg"]
Expand Down