Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .fmf/version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1
11 changes: 10 additions & 1 deletion .tekton/coreos-assembler-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ spec:
pipelineRef:
params:
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/pipeline-docker-build-multi-platform-oci-ta@sha256:39a1abd4657035029db5e1e215333aba0cf094c3984df58e12cb157f4cb62207
value: quay.io/konflux-ci/tekton-catalog/pipeline-docker-build-multi-platform-oci-ta@sha256:3b40c829ea489ac866149094157e3b8532896b9f150a4f15b5aaba9d0e2e6be2
- name: name
value: docker-build-multi-platform-oci-ta
- name: kind
Expand All @@ -57,4 +57,13 @@ spec:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'
taskRunSpecs:
- pipelineTaskName: build-images
stepSpecs:
- name: prepare-sboms
computeResources:
requests:
memory: 2Gi
limits:
memory: 2Gi
status: {}
61 changes: 61 additions & 0 deletions .tekton/testing-farm.yaml
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
Comment on lines +17 to +19
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The GIT_URL and GIT_REF parameters are currently hardcoded to a personal fork and a specific branch (Roshan-R/coreos-assembler and tmt-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.

- 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
29 changes: 29 additions & 0 deletions tmt/plans/main.fmf
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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The packages wget, jq, and git are being installed in the test environment but do not appear to be used by the host-side test.sh script. The git command used in the test is executed inside the coreos-assembler container. Conversely, the script relies on podman, which should be explicitly listed if it is not guaranteed to be present in the base image.

      - podman

- podman
execute:
how: tmt

2 changes: 2 additions & 0 deletions tmt/tests/kola.fmf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
test: ./test.sh
duration: 2h
18 changes: 18 additions & 0 deletions tmt/tests/test.sh
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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

It is recommended to ensure that the $COSA_DIR directory exists before it is mounted as a volume. If the directory is missing, podman might create it with root ownership, which can lead to permission issues for the builder user inside the container. Additionally, quoting the path is a best practice to handle potential spaces.

Suggested change
export COSA_DIR=$HOME/workspace/build
export COSA_DIR="$HOME/workspace/build"
mkdir -p "$COSA_DIR"

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