Skip to content

Commit

Permalink
chore: use the new Makefile targets in packit
Browse files Browse the repository at this point in the history
Use the new Makefile targets in packit actions.

Signed-off-by: Miguel Martín <[email protected]>
  • Loading branch information
mmartinv committed Nov 28, 2024
1 parent 829681a commit 8276420
Showing 1 changed file with 36 additions and 25 deletions.
61 changes: 36 additions & 25 deletions .packit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
specfile_path: fido-device-onboard.spec

files_to_sync:
- src:
- patches/0001-Revert-chore-use-git-fork-for-aws-nitro-enclaves-cos.patch
- .packit.yaml
- fido-device-onboard.spec
- "fido-device-onboard-rs-*-vendor-patched.tar.xz"
dest: .
- ".packit.yaml"
- "fido-device-onboard.spec"

upstream_package_name: fido-device-onboard
downstream_package_name: fido-device-onboard

actions: &common_actions
fix-spec-file:
- bash -c "make VERSION=${PACKIT_PROJECT_VERSION} packit-fix-spec-file"

upstream_tag_template: v{version}
copy_upstream_release_description: true

Expand All @@ -25,28 +25,38 @@ packages:
fido-device-onboard-fedora:
downstream_package_name: fido-device-onboard
upstream_package_name: fido-device-onboard
actions:
<<: *common_actions
pre-sync:
- bash -c "make VERSION=${PACKIT_PROJECT_VERSION} packit-fix-spec-file"
create-archive:
- bash -c "make VERSION=${PACKIT_PROJECT_VERSION} packit-create-archive"
- bash -c "ls -1 fido-device-onboard-rs-${PACKIT_PROJECT_VERSION}.tar.gz"

fido-device-onboard-centos:
downstream_package_name: fido-device-onboard
upstream_package_name: fido-device-onboard
files_to_sync:
- ".packit.yaml"
- "fido-device-onboard.spec"
- src: "rpmbuild/SOURCES/fido-device-onboard-rs-*-vendor.tar.xz"
dest: .
pkg_tool: centpkg

actions:
pre-sync:
- bash -c "./make-vendored-tarfile.sh ${PACKIT_PROJECT_VERSION}"
- bash -c "git restore Cargo.lock"
create-archive:
- bash -c "cp ./patches/0001-Revert-chore-use-git-fork-for-aws-nitro-enclaves-cos.patch ."
- bash -c "git archive --prefix=fido-device-onboard-rs-${PACKIT_PROJECT_VERSION}/ --format=tar HEAD > fido-device-onboard-rs-${PACKIT_PROJECT_VERSION}.tar"
- bash -c "./make-vendored-tarfile.sh ${PACKIT_PROJECT_VERSION}"
- bash -c "tar -xvf fido-device-onboard-rs-${PACKIT_PROJECT_VERSION}.tar"
- bash -c "ls -1 ./fido-device-onboard-rs-${PACKIT_PROJECT_VERSION}.tar"
actions:
<<: *common_actions
pre-sync:
- bash -c "make VERSION=${PACKIT_PROJECT_VERSION} packit-fix-spec-file packit-create-vendor"
create-archive:
- bash -c "make VERSION=${PACKIT_PROJECT_VERSION} packit-create-archive packit-create-vendor"
- bash -c "ls -1 fido-device-onboard-rs-${PACKIT_PROJECT_VERSION}.tar.gz"

jobs:
- &fdo_copr_build
job: copr_build
trigger: pull_request
targets:
centos-stream-9: {}
centos-stream-10: {}
fedora-latest-stable: {}
fedora-latest: {}
fedora-rawhide: {}
Expand All @@ -58,6 +68,7 @@ jobs:
tmt_plan: plans/onboarding
targets:
centos-stream-9: {}
centos-stream-10: {}
fedora-latest-stable: {}
fedora-latest: {}
fedora-rawhide: {}
Expand All @@ -69,29 +80,29 @@ jobs:
trigger: release
packages: [fido-device-onboard-fedora]
dist_git_branches:
- fedora-development
- fedora-latest-stable
- fedora-development
- fedora-latest-stable

- job: propose_downstream
trigger: release
packages: [fido-device-onboard-centos]
dist_git_branches:
- c10s
- c9s
- c10s
- c9s

- job: koji_build
trigger: commit
allowed_pr_authors: [all_committers]
dist_git_branches:
- fedora-development
- fedora-latest-stable
- fedora-development
- fedora-latest-stable

- job: bodhi_update
trigger: commit
allowed_builders: [all_committers]
dist_git_branches:
- fedora-development
- fedora-latest-stable
- fedora-development
- fedora-latest-stable

- <<: *fdo_copr_build
trigger: commit
Expand Down

0 comments on commit 8276420

Please sign in to comment.