Skip to content

Commit

Permalink
Add packit config (#707)
Browse files Browse the repository at this point in the history
Co-authored-by: Evgeni Golov <[email protected]>
  • Loading branch information
adamruzicka and evgeni authored Feb 22, 2023
1 parent 5d5f0be commit a773406
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
39 changes: 39 additions & 0 deletions .packit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# See the documentation for more information:
# https://packit.dev/docs/configuration/

specfile_path: rubygem-foreman-tasks.spec

# add or remove files that should be synced
files_to_sync:
- rubygem-foreman-tasks.spec
- foreman-tasks.logrotate
- .packit.yaml

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

actions:
post-upstream-clone:
- "wget https://raw.githubusercontent.com/theforeman/foreman-packaging/rpm/develop/packages/plugins/rubygem-foreman-tasks/rubygem-foreman-tasks.spec -O rubygem-foreman-tasks.spec"
- "wget https://raw.githubusercontent.com/theforeman/foreman-packaging/rpm/develop/packages/plugins/rubygem-foreman-tasks/foreman-tasks.logrotate -O foreman-tasks.logrotate"
get-current-version: "ruby -I lib/ -r foreman_tasks/version -e 'puts ForemanTasks::VERSION'"
create-archive:
- gem build foreman-tasks.gemspec
- bash -c "ls -1t ./foreman-tasks-*.gem | head -n 1"

jobs:
- job: copr_build
trigger: pull_request
targets:
centos-stream-8:
additional_modules: "foreman:el8,ruby:2.7,nodejs:12"
additional_repos:
- http://koji.katello.org/releases/yum/foreman-nightly/el8/x86_64/
- http://yum.theforeman.org/plugins/nightly/el8/x86_64/
module_hotfixes: true

srpm_build_deps:
- wget
- rubygems
2 changes: 1 addition & 1 deletion foreman-tasks.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ same resource. It also optionally provides Dynflow infrastructure for using it f
DESC

s.files = `git ls-files`.split("\n").reject do |file|
file.end_with?("test.rake")
file.end_with?("test.rake") || file == '.packit.yaml'
end

s.test_files = `git ls-files test`.split("\n")
Expand Down

0 comments on commit a773406

Please sign in to comment.