From 0c2b3e93987b2783b7b8cfe36b5364f401e55f54 Mon Sep 17 00:00:00 2001 From: Frantisek Lachman Date: Fri, 23 Jun 2023 08:24:48 +0200 Subject: [PATCH 1/3] Try running TMT test in container Signed-off-by: Frantisek Lachman --- .packit.yaml | 20 ++++++-------------- plans/test.fmf | 14 +++++++++----- 2 files changed, 15 insertions(+), 19 deletions(-) diff --git a/.packit.yaml b/.packit.yaml index dce8acc3..459a7eb7 100644 --- a/.packit.yaml +++ b/.packit.yaml @@ -10,13 +10,8 @@ downstream_package_name: hello # post-upstream-clone: "python3 setup.py sdist --dist-dir ." # current_version_command: ["python3", "setup.py", "--version"] # create_tarball_command: ["python3", "setup.py", "sdist", "--dist-dir", "."] -jobs: -- job: copr_build - trigger: pull_request - targets: - - fedora-stable-x86_64 - - fedora-rawhide-x86_64 +jobs: - job: copr_build trigger: release targets: @@ -31,11 +26,8 @@ jobs: - job: tests trigger: pull_request targets: - - fedora-stable-x86_64 - - fedora-rawhide-x86_64 - -- job: propose_downstream - trigger: release - packit_instances: ["stg"] - dist_git_branches: - - fedora-all + - fedora-38 + skip_build: true + tf_extra_params: + environments: + - os: null diff --git a/plans/test.fmf b/plans/test.fmf index 0e6b5e26..4cd49927 100644 --- a/plans/test.fmf +++ b/plans/test.fmf @@ -2,12 +2,16 @@ prepare: how: install package: - - curl - - httpd + - packit execute: how: tmt script: - - systemctl start httpd - - echo foo > /var/www/html/index.html - - curl http://localhost/ | grep foo + - env + - sh -c "echo $container" + - packit status https://github.com/packit/packit.git + +provision: + how: container + image: fedora:latest + From 6f33bcd7ef20832a0a834d6648804072336d23a1 Mon Sep 17 00:00:00 2001 From: Frantisek Lachman Date: Fri, 23 Jun 2023 09:31:35 +0200 Subject: [PATCH 2/3] Try more Fedora versions Signed-off-by: Frantisek Lachman --- .packit.yaml | 13 +++++++++++++ plans/test.fmf | 3 +-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.packit.yaml b/.packit.yaml index 459a7eb7..df305255 100644 --- a/.packit.yaml +++ b/.packit.yaml @@ -23,6 +23,17 @@ jobs: targets: - fedora-stable +- job: tests + trigger: pull_request + targets: + - fedora-37 + skip_build: true + tf_extra_params: + environments: + - os: null + variables: + IMAGE: fedora:37 + - job: tests trigger: pull_request targets: @@ -31,3 +42,5 @@ jobs: tf_extra_params: environments: - os: null + variables: + IMAGE: fedora:38 diff --git a/plans/test.fmf b/plans/test.fmf index 4cd49927..d4962da9 100644 --- a/plans/test.fmf +++ b/plans/test.fmf @@ -13,5 +13,4 @@ execute: provision: how: container - image: fedora:latest - + image: $IMAGE \ No newline at end of file From 019cb0666ad282e94f1b59315b31c82225ed519e Mon Sep 17 00:00:00 2001 From: Frantisek Lachman Date: Fri, 23 Jun 2023 12:56:30 +0200 Subject: [PATCH 3/3] Try build before test Signed-off-by: Frantisek Lachman --- .packit.yaml | 7 ++++++- plans/test.fmf | 5 +++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.packit.yaml b/.packit.yaml index df305255..d23e759f 100644 --- a/.packit.yaml +++ b/.packit.yaml @@ -23,11 +23,16 @@ jobs: targets: - fedora-stable +- job: copr_build + trigger: pull_request + targets: + - fedora-37 + - fedora-38 + - job: tests trigger: pull_request targets: - fedora-37 - skip_build: true tf_extra_params: environments: - os: null diff --git a/plans/test.fmf b/plans/test.fmf index d4962da9..de37449e 100644 --- a/plans/test.fmf +++ b/plans/test.fmf @@ -2,14 +2,15 @@ prepare: how: install package: - - packit + - git execute: how: tmt script: - env - sh -c "echo $container" - - packit status https://github.com/packit/packit.git + - rpm -qv hello + - hello world! provision: how: container