Skip to content

Commit 379e231

Browse files
committed
Add upstream CI for test PR's to main branch
Packit CI, can run test suite against incoming code changes to repository. CI can catch mistakes and failures in new code. Signed-off-by: Patrik Koncity <[email protected]>
1 parent b88f824 commit 379e231

File tree

3 files changed

+61
-0
lines changed

3 files changed

+61
-0
lines changed

.fmf/version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1

.packit.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
jobs:
3+
- job: tests
4+
trigger: pull_request
5+
branch: main
6+
targets:
7+
- fedora-rawhide
8+
skip_build: true
9+
tf_extra_params:
10+
environments:
11+
- tmt:
12+
context:
13+
target_PR_branch: main

plans/packit-ci.fmf

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
summary: common test plan for CI
2+
3+
4+
prepare:
5+
- how: shell
6+
script:
7+
- ln -s $(pwd) /var/tmp/attestation-operator_sources || true
8+
- systemctl disable --now dnf-makecache.service || true
9+
- systemctl disable --now dnf-makecache.timer || true
10+
- dnf makecache
11+
12+
environment:
13+
OPERATOR_NAME: "keylime"
14+
OPERATOR_NAMESPACE: "attestation-operator"
15+
UPSTREAM_OPERATOR: "true"
16+
REPO_CLONE: "attestation"
17+
18+
19+
discover:
20+
- name: Configure_test_system
21+
how: fmf
22+
url: https://github.com/RedHat-SP-Security/common-cloud-orchestration
23+
ref: main
24+
test:
25+
- /Setup/setup_local_cluster
26+
- /Setup/install_upstream_operator
27+
#need to run bundle task, for now unstable
28+
- name: Run_tests
29+
how: fmf
30+
url: https://github.com/RedHat-SP-Security/attestation-operator-tests
31+
ref: main
32+
test:
33+
- /Setup/install_operator
34+
- /Sanity
35+
- /Setup/clean_cluster
36+
37+
adjust:
38+
- when: distro == rhel-9 or distro == centos-stream-9
39+
prepare+:
40+
- how: shell
41+
script:
42+
- dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm https://dl.fedoraproject.org/pub/epel/epel-next-release-latest-9.noarch.rpm
43+
44+
45+
execute:
46+
how: tmt
47+

0 commit comments

Comments
 (0)