Skip to content

Commit

Permalink
Logic rework of fmf files and add dnf4 build steps
Browse files Browse the repository at this point in the history
  • Loading branch information
inknos committed Jan 9, 2024
1 parent e4bec00 commit 6e55ed3
Show file tree
Hide file tree
Showing 7 changed files with 69 additions and 25 deletions.
File renamed without changes.
36 changes: 36 additions & 0 deletions plans/dnf4/main.fmf
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
summary: Prepare CI DNF Stack

tag: integration

prepare:
- name: Install packages to build fedora container
how: install
package: [git, podman]

- name: Download latest ci-dnf-stack from PR
how: shell
script:
- git clone https://github.com/rpm-software-management/ci-dnf-stack $TMT_PLANS_DATA/ci-dnf-stack

- name: Checkout dnf4 branch
how: shell
script:
- git -C $TMT_PLANS_DATA/ci-dnf-stack checkout dnf-4-stack

- name: Checkout PR branch if packit call is from ci-dnf-stack
how: shell
script: |
if [ "$PACKIT_UPSTREAM_NAME" == "ci-dnf-stack" ]; then
git -C $TMT_PLANS_DATA/ci-dnf-stack remote add pull-request $PACKIT_SOURCE_URL
git -C $TMT_PLANS_DATA/ci-dnf-stack fetch pull-request
git -C $TMT_PLANS_DATA/ci-dnf-stack checkout --track pull-request/$PACKIT_SOURCE_BRANCH
git -C $TMT_PLANS_DATA/ci-dnf-stack rebase $PACKIT_TARGET_BRANCH
fi

- name: Build testing container
how: shell
script: |
$TMT_PLANS_DATA/ci-dnf-stack/container-test build \
--base $( echo "$@distro" | tr '-' ':') \
--container-arg="--env=COPR=$PACKIT_COPR_PROJECT" \
--container-arg="--env=COPR_RPMS=$PACKIT_COPR_RPMS"
File renamed without changes.
File renamed without changes.
File renamed without changes.
31 changes: 31 additions & 0 deletions plans/dnf5/main.fmf
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
summary: Prepare CI DNF Stack

tag: integration

prepare:
- name: Install packages to build fedora container
how: install
package: [git, podman]

- name: Download latest ci-dnf-stack from PR
how: shell
script:
- git clone https://github.com/rpm-software-management/ci-dnf-stack $TMT_PLANS_DATA/ci-dnf-stack

- name: Checkout PR branch if packit call is from ci-dnf-stack
how: shell
script: |
if [ "$PACKIT_UPSTREAM_NAME" == "ci-dnf-stack" ]; then
git -C $TMT_PLANS_DATA/ci-dnf-stack remote add pull-request $PACKIT_SOURCE_URL
git -C $TMT_PLANS_DATA/ci-dnf-stack fetch pull-request
git -C $TMT_PLANS_DATA/ci-dnf-stack checkout --track pull-request/$PACKIT_SOURCE_BRANCH
git -C $TMT_PLANS_DATA/ci-dnf-stack rebase $PACKIT_TARGET_BRANCH
fi

- name: Build testing container
how: shell
script: |
$TMT_PLANS_DATA/ci-dnf-stack/container-test build \
--base $( echo "$@distro" | tr '-' ':') \
--container-arg="--env=COPR=$PACKIT_COPR_PROJECT" \
--container-arg="--env=COPR_RPMS=$PACKIT_COPR_RPMS"
27 changes: 2 additions & 25 deletions plans/main.fmf
Original file line number Diff line number Diff line change
@@ -1,31 +1,8 @@
summary: Prepare CI DNF Stack
summary: Prepare Tests

tag: integration
tag: all

prepare:
- name: Install packages to build fedora container
how: install
package: [git, podman]

- name: Download latest ci-dnf-stack from PR
how: shell
script:
- git clone https://github.com/rpm-software-management/ci-dnf-stack $TMT_PLANS_DATA/ci-dnf-stack

- name: Checkout PR branch if packit call is from ci-dnf-stack
how: shell
script: |
if [ "$PACKIT_UPSTREAM_NAME" == "ci-dnf-stack" ]; then
git -C $TMT_PLANS_DATA/ci-dnf-stack remote add pull-request $PACKIT_SOURCE_URL
git -C $TMT_PLANS_DATA/ci-dnf-stack fetch pull-request
git -C $TMT_PLANS_DATA/ci-dnf-stack checkout --track pull-request/$PACKIT_SOURCE_BRANCH
git -C $TMT_PLANS_DATA/ci-dnf-stack rebase $PACKIT_TARGET_BRANCH
fi

- name: Build testing container
how: shell
script: |
$TMT_PLANS_DATA/ci-dnf-stack/container-test build \
--base $( echo "$@distro" | tr '-' ':') \
--container-arg="--env=COPR=$PACKIT_COPR_PROJECT" \
--container-arg="--env=COPR_RPMS=$PACKIT_COPR_RPMS"

0 comments on commit 6e55ed3

Please sign in to comment.