Skip to content

Commit

Permalink
Add packit config for Fedora copr builds
Browse files Browse the repository at this point in the history
Builds are triggered by commits to master branch and by pull requests
  • Loading branch information
vojtechsokol authored and pirat89 committed Sep 9, 2021
1 parent c835dba commit 54e70b0
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/pr-welcome-msg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
If you want to re-run tests or request review, you can use following commands as a comment:
- **leapp-ci build** to run copr build and e2e tests in **OAMG CI**
- **review please** to notify leapp developers of review request
- **/packit copr-build** to submit a public copr build using packit
Please [open ticket](https://url.corp.redhat.com/oamg-ci-issue) in case you experience technical problem with the CI. (RH internal only)
Expand Down
42 changes: 42 additions & 0 deletions .packit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
specfile_path: packaging/leapp.spec

upstream_project_url: https://github.com/oamg/leapp

jobs:
- job: copr_build
trigger: pull_request
metadata:
owner: "@oamg"
project: leapp
targets:
- epel-7-ppc64le
- epel-7-x86_64
- epel-8-x86_64
- fedora-all-aarch64
- fedora-all-x86_64
actions:
post-upstream-clone:
# builds from PRs should have lower NVR than those from master branch
- sed -i "s/1%{?dist}/0%{?dist}/g" packaging/leapp.spec
get-current-version:
# get version from spec file instead from git tag
- bash -c "grep -m1 '^Version:' packaging/leapp.spec | grep -om1 '[0-9].[0-9.]**'"
- job: copr_build
trigger: commit
metadata:
branch: master
owner: "@oamg"
project: leapp
targets:
- epel-7-ppc64le
- epel-7-x86_64
- epel-8-x86_64
- fedora-all-aarch64
- fedora-all-x86_64
actions:
post-upstream-clone:
# builds from master branch should have the highest NVR
- sed -i "s/1%{?dist}/100%{?dist}/g" packaging/leapp.spec
get-current-version:
# get version from spec file instead from git tag
- bash -c "grep -m1 '^Version:' packaging/leapp.spec | grep -om1 '[0-9].[0-9.]**'"

0 comments on commit 54e70b0

Please sign in to comment.