-
Notifications
You must be signed in to change notification settings - Fork 190
ci: add Testing Farm test via tmt for Konflux CI #4515
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
7242565
6e65dfe
4fc6c7f
e192cef
41a0a43
ed8ea3e
7c98cfb
dde891c
f2ff904
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 1 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| apiVersion: appstudio.redhat.com/v1beta2 | ||
| kind: IntegrationTestScenario | ||
| metadata: | ||
| labels: | ||
| test.appstudio.openshift.io/optional: "true" | ||
| name: coreos-assembler-testing-x86-64 | ||
| spec: | ||
| application: coreos-assembler-main | ||
| contexts: | ||
| - name: component_coreos-assembler-main | ||
| params: | ||
| - name: ARCH | ||
| value: x86_64 | ||
| - name: IMAGE_TAG | ||
| value: v3.16 | ||
| - name: GIT_URL | ||
| value: https://github.com/Roshan-R/coreos-assembler | ||
| - name: GIT_REF | ||
| value: tmt-testing | ||
| - name: TMT_PLAN | ||
| value: tmt | ||
| resolverRef: | ||
| params: | ||
| - name: url | ||
| value: https://gitlab.com/testing-farm/integrations-konflux | ||
| - name: revision | ||
| value: v3.16 | ||
| - name: pathInRepo | ||
| value: pipeline/tmt-via-testing-farm/tmt-via-testing-farm.yaml | ||
| resolver: git | ||
|
|
||
| apiVersion: appstudio.redhat.com/v1beta2 | ||
| kind: IntegrationTestScenario | ||
| metadata: | ||
| labels: | ||
| test.appstudio.openshift.io/optional: "true" | ||
| name: coreos-assembler-testing-aarch64 | ||
| spec: | ||
| application: coreos-assembler-main | ||
| contexts: | ||
| - name: component_coreos-assembler-main | ||
| params: | ||
| - name: ARCH | ||
| value: aarch64 | ||
| - name: IMAGE_TAG | ||
| value: v3.16 | ||
| - name: GIT_URL | ||
| value: https://github.com/Roshan-R/coreos-assembler | ||
| - name: GIT_REF | ||
| value: tmt-testing | ||
| - name: TMT_PLAN | ||
| value: tmt | ||
| resolverRef: | ||
| params: | ||
| - name: url | ||
| value: https://gitlab.com/testing-farm/integrations-konflux | ||
| - name: revision | ||
| value: v3.16 | ||
| - name: pathInRepo | ||
| value: pipeline/tmt-via-testing-farm/tmt-via-testing-farm.yaml | ||
| resolver: git | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| discover: | ||
| how: fmf | ||
|
|
||
| adjust+: | ||
| - when: arch == x86_64 or arch == aarch64 | ||
| provision: | ||
| hardware: | ||
| cpu: | ||
| processors: ">= 4" | ||
| memory: ">= 8 GB" | ||
| disk: | ||
| - size: ">= 10 GB" | ||
| virtualization: | ||
| is-supported: true | ||
|
|
||
| prepare: | ||
| - how: install | ||
| package: | ||
| - libvirt | ||
| - qemu-kvm | ||
| - qemu-img | ||
| - virt-install | ||
| - wget | ||
| - jq | ||
| - git | ||
|
Comment on lines
+23
to
+25
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The packages |
||
| - podman | ||
| execute: | ||
| how: tmt | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| test: ./test.sh | ||
| duration: 2h |
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,18 @@ | ||||||||
| #!/bin/bash | ||||||||
| set -euo pipefail | ||||||||
|
|
||||||||
| # IMAGE_URL is the coreos-assembler image that is built by konflux for each run. | ||||||||
| export COREOS_ASSEMBLER_CONTAINER="$IMAGE_URL" | ||||||||
| export COSA_DIR=$HOME/workspace/build | ||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is recommended to ensure that the
Suggested change
|
||||||||
| cosa () | ||||||||
| { | ||||||||
| set -x | ||||||||
| podman run --rm --security-opt=label=disable --privileged \ | ||||||||
| -v="${COSA_DIR}":/srv/ --device=/dev/kvm \ | ||||||||
| --device=/dev/fuse --tmpfs=/tmp -v=/var/tmp:/var/tmp --name=cosa "${COREOS_ASSEMBLER_CONTAINER}" "$@"; | ||||||||
| } | ||||||||
|
|
||||||||
| mkdir -p "$COSA_DIR" | ||||||||
| cosa init --force https://github.com/coreos/fedora-coreos-config --branch testing-devel | ||||||||
| # Test if the newly built container can build the fcos image | ||||||||
| cosa build | ||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
GIT_URLandGIT_REFparameters are currently hardcoded to a personal fork and a specific branch (Roshan-R/coreos-assemblerandtmt-testing). For integration into the main repository, these should be updated to point to the official repository or use dynamic Tekton parameters to ensure the tests are executed against the correct source code.