Skip to content
Merged
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM quay.io/centos-bootc/centos-bootc:stream10

# Build arguments
ARG USHIFT_RPM_REPO_NAME=microshift-local
ARG USHIFT_RPM_REPO_PATH=/tmp/$USHIFT_RPM_REPO_NAME

# Copy the MicroShift repository contents
COPY ./rpm-repos/$USHIFT_RPM_REPO_NAME $USHIFT_RPM_REPO_PATH

# Copy repository configuration
COPY ./bootc-images/$USHIFT_RPM_REPO_NAME.repo /etc/yum.repos.d/

# Print repository configuration contents.
# Install test agent and cleanup.
RUN dnf repoinfo --enabled && \
dnf install -y microshift-test-agent && \
systemctl enable microshift-test-agent && \
rm -vf /etc/yum.repos.d/microshift-*.repo && \
rm -rvf $USHIFT_RPM_REPO_PATH && \
dnf clean all
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM quay.io/centos-bootc/centos-bootc:stream9

# Build arguments
ARG USHIFT_RPM_REPO_NAME=microshift-local
ARG USHIFT_RPM_REPO_PATH=/tmp/$USHIFT_RPM_REPO_NAME

# Copy the MicroShift repository contents
COPY ./rpm-repos/$USHIFT_RPM_REPO_NAME $USHIFT_RPM_REPO_PATH

# Copy repository configuration
COPY ./bootc-images/$USHIFT_RPM_REPO_NAME.repo /etc/yum.repos.d/

# Print repository configuration contents.
# Install test agent and cleanup.
RUN dnf repoinfo --enabled && \
dnf install -y microshift-test-agent && \
systemctl enable microshift-test-agent && \
rm -vf /etc/yum.repos.d/microshift-*.repo && \
rm -rvf $USHIFT_RPM_REPO_PATH && \
dnf clean all
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM quay.io/centos-bootc/centos-bootc:stream10
FROM localhost/cos10-test-agent:latest

# Build arguments
ARG USHIFT_RPM_REPO_NAME=microshift-local
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM quay.io/centos-bootc/centos-bootc:stream9
FROM localhost/cos9-test-agent:latest

# Build arguments
ARG USHIFT_RPM_REPO_NAME=microshift-local
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM localhost/cos10-bootc-source:latest

# Embed images based on contents of release-info RPMs
COPY --chmod=755 ./bootc-images/microshift-copy-images.sh /usr/bin/microshift-copy-images
RUN --mount=type=secret,id=pullsecret,dst=/run/secrets/pull-secret.json \
images="$(jq -r ".images[]" /usr/share/microshift/release/release-"$(uname -m)".json)" ; \
images="${images} quay.io/microshift/busybox:1.36" ; \
IMAGE_PULL_LIST="${images}" /usr/bin/microshift-copy-images pull

# Install a systemd drop-in unit to address the problem with image upgrades
# overwriting the container images in additional store. The workaround is to
# copy the images from the pre-loaded to the main container storage directory.
# In this case, it is not necessary to update /etc/containers/storage.conf with
# the additional store path.
# See https://issues.redhat.com/browse/RHEL-75827
RUN mkdir -p /usr/lib/systemd/system/microshift.service.d
COPY --chmod=644 ./bootc-images/microshift-copy-images.conf /usr/lib/systemd/system/microshift.service.d/microshift-copy-images.conf
16 changes: 16 additions & 0 deletions test/scenarios-bootc/upstream/cos10-src@greenboot.sh.disabled
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

# Sourced from scenario.sh and uses functions defined there.

scenario_create_vms() {
prepare_kickstart host1 kickstart-bootc.ks.template cos10-bootc-source
launch_vm --boot_blueprint centos10-bootc
}

scenario_remove_vms() {
remove_vm host1
}

scenario_run_tests() {
run_tests host1 suites/greenboot/
}
22 changes: 22 additions & 0 deletions test/scenarios-bootc/upstream/cos10-src@isolated-net.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

# Sourced from scenario.sh and uses functions defined there.

# Redefine network-related settings to use the isolated network bridge
VM_BRIDGE_IP="$(get_vm_bridge_ip "${VM_ISOLATED_NETWORK}")"
# shellcheck disable=SC2034 # used elsewhere
MIRROR_REGISTRY_URL="${VM_BRIDGE_IP}:${MIRROR_REGISTRY_PORT}/microshift"

scenario_create_vms() {
prepare_kickstart host1 kickstart-bootc-isolated.ks.template cos10-bootc-source-isolated
# Use the isolated network when creating a VM
launch_vm --boot_blueprint centos10-bootc --network "${VM_ISOLATED_NETWORK}"
}

scenario_remove_vms() {
remove_vm host1
}

scenario_run_tests() {
run_tests host1 suites/network/isolated-network.robot
}
24 changes: 24 additions & 0 deletions test/scenarios-bootc/upstream/cos10-src@multi-nic.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

# Sourced from scenario.sh and uses functions defined there.

scenario_create_vms() {
prepare_kickstart host1 kickstart-bootc.ks.template cos10-bootc-source
# Using multus as secondary network to have 2 nics in different networks.
launch_vm --boot_blueprint centos10-bootc --network default,"${VM_MULTUS_NETWORK}"
}

scenario_remove_vms() {
remove_vm host1
}

scenario_run_tests() {
local -r vmname=$(full_vm_name host1)
local -r vm_ip1=$("${ROOTDIR}/scripts/devenv-builder/manage-vm.sh" ip -n "${vmname}" | head -1)
local -r vm_ip2=$("${ROOTDIR}/scripts/devenv-builder/manage-vm.sh" ip -n "${vmname}" | tail -1)

run_tests host1 \
--variable "USHIFT_HOST_IP1:${vm_ip1}" \
--variable "USHIFT_HOST_IP2:${vm_ip2}" \
suites/network/multi-nic.robot
}