diff --git a/.packit.yaml b/.packit.yaml new file mode 100644 index 0000000..ae5e370 --- /dev/null +++ b/.packit.yaml @@ -0,0 +1,13 @@ +jobs: +- job: tests + trigger: pull_request + branch: main + targets: + - fedora-all + skip_build: true + tf_extra_params: + environments: + - tmt: + context: + target_PR_branch: "main" + diff --git a/Sanity/main.fmf b/Sanity/main.fmf index d27f386..7279c72 100644 --- a/Sanity/main.fmf +++ b/Sanity/main.fmf @@ -1,4 +1,4 @@ -summary: Deployment and basic functionality of the tang operator +summary: Basic functionality of the tang operator description: '' contact: Martin Zelený component: @@ -7,6 +7,8 @@ test: ./runtest.sh recommend: - tang - clevis +require: + - jq duration: 30m enabled: true tag: diff --git a/Sanity/runnotest.sh b/Sanity/runnotest.sh deleted file mode 100755 index 2de9243..0000000 --- a/Sanity/runnotest.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /CoreOS/tang-operator/Sanity -# Description: Deployment and basic functionality of the tang operator -# Author: Martin Zeleny -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2021 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include Beaker environment -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -UNSUPPORTED_RELEASE=$(awk -F "release" '{print $2}' < /etc/redhat-release\ - | sed -e 's/^[ /t]*//g' | awk '{print $1}' | awk -F '.' '{print $1}') - -rlJournalStart - rlPhaseStartTest "Check tang-operator controller is running" - rlRun "true" 0 "No test is executed (unsupported release:${UNSUPPORTED_RELEASE})" - rlPhaseEnd -rlJournalEnd diff --git a/Sanity/runtest.sh b/Sanity/runtest.sh index 3f30af9..e2be3d5 100755 --- a/Sanity/runtest.sh +++ b/Sanity/runtest.sh @@ -750,7 +750,7 @@ getVersion() { analyzeVersion() { dumpVerbose "DETECTING MALWARE ON VERSION:[${1}]" "${CONTAINER_MGR}" pull "${1}" - dir_mount=$("${CONTAINER_MGR}" unshare ./mount_image.sh -v "${1}" -c "${CONTAINER_MGR}") + dir_mount=$("${CONTAINER_MGR}" unshare ./scripts/mount_image.sh -v "${1}" -c "${CONTAINER_MGR}") rlAssertEquals "Checking image could be mounted appropriately" "$?" "0" analyzed_dir=$(echo "${dir_mount}" | sed -e 's@/merged@@g') dumpVerbose "Analyzing directory:[${analyzed_dir}]" @@ -763,7 +763,7 @@ analyzeVersion() { rlLogWarning "${infected_files} Infected Files Detected!" rlLogWarning "Please, review Malware Detection log file: ${tmpdir}/${prefix}_malware.log" fi - "${CONTAINER_MGR}" unshare ./umount_image.sh -v "${1}" -c "${CONTAINER_MGR}" + "${CONTAINER_MGR}" unshare ./scripts/umount_image.sh -v "${1}" -c "${CONTAINER_MGR}" rlAssertEquals "Checking image could be umounted appropriately" "$?" "0" } diff --git a/Sanity/mount_image.sh b/Sanity/scripts/mount_image.sh similarity index 100% rename from Sanity/mount_image.sh rename to Sanity/scripts/mount_image.sh diff --git a/Sanity/umount_image.sh b/Sanity/scripts/umount_image.sh similarity index 100% rename from Sanity/umount_image.sh rename to Sanity/scripts/umount_image.sh diff --git a/Sanity/tang_operator_test.sh b/Sanity/tang_operator_test.sh deleted file mode 100755 index 4e590f2..0000000 --- a/Sanity/tang_operator_test.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/bash -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2021 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -echo "================ INFO ================" -echo "DATE:$(date)" -echo "HOSTNAME:$(hostname)" -echo "================ /INFO ===============" - -result=1 -./tools/dependency_install.sh -dep_res=$? -echo "Dependency installation result:${dep_res}" -echo "======= DIRECTORY:$(pwd) ========" - -if [ ${dep_res} -eq 255 ]; -then - # Architecture unsupported, just let it go in this arch - echo "Architecture execution bypassed" - ./runnotest.sh - result=$? -elif [ ${dep_res} -eq 0 ]; -then - chown minikube.minikube -R "$(pwd)" - # Ugly, but the way paths are managed (root dir not directory where running): - chown minikube.minikube -R "$(pwd)/../../../../../.." - # User minikube should have been installed, execute test as minikube user - su minikube -c '. ~/.bashrc && ./runtest.sh' - run_result=$? - echo "TEST EXECUTION RESULT:[${run_result}]" - result=${run_result} -fi -echo "RESULT:[${result}]" -exit "${result}" diff --git a/Sanity/tools/dependency_install.sh b/Sanity/tools/dependency_install.sh deleted file mode 100755 index d1510c6..0000000 --- a/Sanity/tools/dependency_install.sh +++ /dev/null @@ -1,357 +0,0 @@ -#!/bin/bash -# Copyright 2021. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# Uncomment next line to dump verbose information in script execution: -# set -x - -SM="subscription-manager" -OC_PATH=http://download.eng.bos.redhat.com/brewroot/vol/rhel-8/packages/openshift-clients/4.9.0/202109020218.p0.git.96e95ce.assembly.stream.el8/x86_64 -OC_FILE=openshift-clients-4.9.0-202109020218.p0.git.96e95ce.assembly.stream.el8.x86_64.rpm -OC_OUTPUT_FILE=openshift-clients-4.9.0.rpm -TMPDIR=$(mktemp -d) -TMPDIR_NON_TMPFS="${TMPDIR//\/tmp/}" -OC_INSTALL_FILE="${TMPDIR}/${OC_OUTPUT_FILE}" -CRC_PATH=https://developers.redhat.com/content-gateway/rest/mirror/pub/openshift-v4/clients/crc/latest -CRC_FILE=crc-linux-amd64.tar.xz -CRC_OUTPUT_FILE=crc-linux-amd64.tar.xz -CRC_INSTALL_FILE="${TMPDIR_NON_TMPFS}/${CRC_OUTPUT_FILE}" -CRC_PREFIX="crc-linux-[0-9]" -CRC_EXEC="crc" -CRC_VIRSH_DOMAIN="crc" -HOME_BASHRC="${HOME}/.bashrc" -CRC_USER="crc" -CRC_PASSWORD="crc1234crc5678" -CRC_HOME="/home/${CRC_USER}" -CRC_HOME_BIN="${CRC_HOME}/bin" -CRC_HOME_BASHRC="${CRC_HOME}/.bashrc" -CRC_EXEC_PATH="${CRC_HOME_BIN}/${CRC_EXEC}" -PULL_SECRET_PATH="$(dirname $(readlink -f $0))" -PULL_SECRET_FILENAME="public_pull_secret.txt" -PULL_SECRET_FILE="${PULL_SECRET_PATH}/${PULL_SECRET_FILENAME}" -PULL_SECRET_INSTALL_FILE="${TMPDIR}/${PULL_SECRET_FILENAME}" -MINIKUBE_URL="https://storage.googleapis.com/minikube/releases/latest" -MINIKUBE_FILE="minikube-latest.x86_64.rpm" -MINIKUBE_URL_FILE="${MINIKUBE_URL}/${MINIKUBE_FILE}" -RH_INSTALL=0 -RELEASE_K8S_URL="https://dl.k8s.io/release/" -STABLE_K8S_URL_FILE="https://dl.k8s.io/release/stable.txt" -BIN_LINUX_PATH="bin/linux/amd64" -MINIKUBE_USER="minikube" -MINIKUBE_HOME="/home/${MINIKUBE_USER}" -MINIKUBE_HOME_BIN="${MINIKUBE_HOME}/bin" -MINIKUBE_HOME_BASHRC="${MINIKUBE_HOME}/.bashrc" -MINIKUBE_CLIENT="kubectl" -OLM_INSTALL_TIMEOUT="5m" - -usage() { - echo "" - echo "Usage: $1 [-r redhat_installation (oc, crc)]" - echo "" - echo " -r: install RedHat tools (CRC, oc) instead of Minikube and kubectl" - echo "" - exit "$2" -} - -#### OC Installation -get_oc_rpm_adding_repo() { - POOL_ID=$("${SM}" list --available --matches 'Red Hat OpenShift Container Platform' | grep -i 'Pool ID' | awk -F ':' '{print $2}' | tr -d ' ' | head -1) - for pool_id in $("${SM}" list --available --matches 'Red Hat OpenShift Container Platform' | grep -i 'Pool ID' | awk -F ':' '{print $2}' | tr -d ' ') - do - "${SM}" attach --pool="${pool_id}" - echo "POOL_ID=${pool_id}" - for repo in $(subscription-manager repos --list | grep 'Repo ID:' | awk -F ':' '{print $2}'); - do - "${SM}" repos --enable="${repo}" - #"${SM}" repos --enable="rhocp-4.7-for-rhel-8-x86_64-rpms" - yum update - yum install openshift-clients - done - done - # - "${SM}" attach --pool="${POOL_ID}" - "${SM}" repos --enable="rhocp-4.8-for-rhel-8-x86_64-rpms" - yum install openshift-clients -} - -get_oc_rpm_with_wget() { - type oc && return 0 - wget "${OC_PATH}/${OC_FILE}" -O "${OC_INSTALL_FILE}" -} - -get_crc_tgz_with_wget() { - mkdir "${TMPDIR_NON_TMPFS}" - wget "${CRC_PATH}/${CRC_FILE}" -O "${CRC_INSTALL_FILE}" -} - -install_podman() { - type podman && return 0 - yum install -y podman -} - -install_jq() { - type jq && return 0 - yum install -y jq -} - -install_wget() { - type wget && return 0 - yum install -y wget -} - -install_network_manager() { - yum install -y NetworkManager - systemctl enable --now NetworkManager -} - -install_libvirtd() { - yum install -y libvirt-daemon - yum install -y libvirt-client -# yum install -y dbus-x11 - systemctl enable --now libvirt-daemon -} - -install_oc() { - type oc && return 0 - yum install -y "${OC_INSTALL_FILE}" -} - -install_crc() { - sudo -u "${CRC_USER}" /home/crc/bin/crc status && return 0 - test -f "${CRC_HOME_BIN}/${CRC_EXEC}" && return 0 - get_crc_tgz_with_wget - pushd "${TMPDIR_NON_TMPFS}" || exit - tar Jxvf "${CRC_OUTPUT_FILE}" - CRC_DIR=$(ls -d ${CRC_PREFIX}*) - pushd "${CRC_DIR}" || exit - rm -fr "${CRC_USER}"/.crc "${CRC_USER}"/.kube - virsh destroy "${CRC_VIRSH_DOMAIN}" - virsh undefine "${CRC_VIRSH_DOMAIN}" - cp "${CRC_EXEC}" "${CRC_HOME_BIN}" - cp "${HOME_BASHRC}" "${CRC_HOME_BASHRC}" - cat<>"${CRC_HOME_BASHRC}" - -# CRC installation PATH update -EOF - printf 'export PATH="${PATH}:' >> "${CRC_HOME_BASHRC}" - printf "%s\"\n" "${CRC_HOME_BIN}" >> "${CRC_HOME_BASHRC}" - popd || exit - popd || exit - # AVOID issues with systemctl and network manager - sudo loginctl enable-linger - sudo -u "${CRC_USER}" "${CRC_EXEC_PATH}" config set skip-check-daemon-systemd-unit true - sudo -u "${CRC_USER}" "${CRC_EXEC_PATH}" config set skip-check-daemon-systemd-sockets true - sudo -u "${CRC_USER}" "${CRC_EXEC_PATH}" config set skip-check-network-manager-running true - sudo -u "${CRC_USER}" "${CRC_EXEC_PATH}" config set skip-check-network-manager-installed true - sudo -u "${CRC_USER}" "${CRC_EXEC_PATH}" config set skip-check-network-manager-config true - - - ### 34 2021-09-07 12:41:44 sudo -u crc XDG_RUNTIME_DIR=/run/user/$(id -u $otherUser) systemctl --user - sudo -u "${CRC_USER}" XDG_RUNTIME_DIR="/run/user/$(id -u ${CRC_USER})" "${CRC_EXEC_PATH}" setup</dev/null || useradd "${CRC_USER}" - passwd "${CRC_USER}"<>/etc/sudoers - -### Add crc user to sudoers -"${CRC_USER}" ALL=(ALL) NOPASSWD:ALL -EOF - fi - test -d "${CRC_HOME_BIN}" || mkdir -p "${CRC_HOME_BIN}" - chown -R "${CRC_USER}.${CRC_USER}" "${CRC_HOME}" -} - -create_minikube_user() { - sudo -u "${MINIKUBE_USER}" true 2>/dev/null || useradd "${MINIKUBE_USER}" - mkdir -p "${MINIKUBE_HOME_BIN}" - chown -R "${MINIKUBE_USER}.${MINIKUBE_USER}" "${MINIKUBE_HOME}" - cp "${HOME_BASHRC}" "${MINIKUBE_HOME_BASHRC}" - printf 'export XDG_RUNTIME_DIR="' >> "${MINIKUBE_HOME_BASHRC}" - printf "%s\"\n\n" "/run/user/$(id -u ${MINIKUBE_USER})" >> "${MINIKUBE_HOME_BASHRC}" - grep -R "Add minikube user to sudoers" /etc/sudoers - if [ $? -ne 0 ]; - then - cat<>/etc/sudoers - -### Add minikube user to sudoers -"${MINIKUBE_USER}" ALL=(ALL) NOPASSWD:ALL -EOF - fi -} - -install_operator_sdk() { - ARCH=$(case $(uname -m) in x86_64) echo -n amd64 ;; aarch64) echo -n arm64 ;; *) echo -n "$(uname -m)" ;; esac) - OS=$(uname | awk '{print tolower($0)}') - OPERATOR_SDK_DL_URL=https://github.com/operator-framework/operator-sdk/releases/download/v1.12.0 - curl -LO "${OPERATOR_SDK_DL_URL}/operator-sdk_${OS}_${ARCH}" - if [ ${RH_INSTALL} -eq 1 ]; - then - chmod +x "operator-sdk_${OS}_${ARCH}" && sudo mv "operator-sdk_${OS}_${ARCH}" "${CRC_HOME_BIN}/operator-sdk" - else - chmod +x "operator-sdk_${OS}_${ARCH}" && sudo mv "operator-sdk_${OS}_${ARCH}" "${MINIKUBE_HOME_BIN}/operator-sdk" - fi -} - -setup_crc() { - sudo -u "${CRC_USER}" oc adm policy add-scc-to-group anyuid system:authenticated -} - -install_minikube() { - curl -LO "${MINIKUBE_URL_FILE}" - rpm -Uvh "${MINIKUBE_FILE}" - rm "${MINIKUBE_FILE}" -} - -setup_minikube() { - minikube_user_id=$(id "${MINIKUBE_USER}" | awk {'print $1'} | egrep -E "[0-9]{1,}" -o) - loginctl enable-linger ${minikube_user_id} - pushd /tmp - sudo -u "${MINIKUBE_USER}" XDG_RUNTIME_DIR="/run/user/$(id -u ${MINIKUBE_USER})" podman ps - sudo -u "${MINIKUBE_USER}" XDG_RUNTIME_DIR="/run/user/$(id -u ${MINIKUBE_USER})" minikube start - sudo -u "${MINIKUBE_USER}" XDG_RUNTIME_DIR="/run/user/$(id -u ${MINIKUBE_USER})" podman ps - sudo -u "${MINIKUBE_USER}" XDG_RUNTIME_DIR="/run/user/$(id -u ${MINIKUBE_USER})" "${MINIKUBE_HOME_BIN}"/operator-sdk --timeout ${OLM_INSTALL_TIMEOUT} olm install - popd -} - -install_kubectl() { - ARCH=$(uname -m) - if [ "${ARCH}" != "x86_64" ]; - then - echo "WARNING: ARCHITECTURE NOT SUPPORTED:${ARCH}" - return 1 - fi - curl -LO "${RELEASE_K8S_URL}/$(curl -L -s ${STABLE_K8S_URL_FILE})/${BIN_LINUX_PATH}/${MINIKUBE_CLIENT}" - curl -LO "${RELEASE_K8S_URL}/$(curl -L -s ${STABLE_K8S_URL_FILE})/${BIN_LINUX_PATH}/${MINIKUBE_CLIENT}.sha256" - echo "$(>"${MINIKUBE_HOME_BASHRC}" - -# Minikube installation PATH update -EOF - printf 'export PATH="${PATH}:' >> "${MINIKUBE_HOME_BASHRC}" - printf "%s\"\n" "${MINIKUBE_HOME_BIN}" >> "${MINIKUBE_HOME_BASHRC}" -} - -check_pull_secret() { - test -f "${PULL_SECRET_FILE}" - if [ $? -eq 0 ]; - then - echo "FILE SECRET:${PULL_SECRET_FILE} FOUND" - chmod 777 "${TMPDIR}" - cp "${PULL_SECRET_FILE}" "${PULL_SECRET_INSTALL_FILE}" - chmod 777 "${PULL_SECRET_INSTALL_FILE}" - else - echo "FILE SECRET:${PULL_SECRET_FILE} NOT FOUND" - fi -} - -set_minikube_permission() { - chown "${MINIKUBE_USER}.${MINIKUBE_USER}" ${MINIKUBE_HOME}/* - chmod 755 ${MINIKUBE_HOME_BIN}/* -} - -dump_tools() { - echo "================== Tools installed =================" - if [ ${RH_INSTALL} -eq 1 ]; - then - ls "${CRC_HOME_BIN}"/* - rpm -q openshift-clients - oc status - "${CRC_HOME_BIN}"/crc status - else - ls "${MINIKUBE_HOME_BIN}"/* - rpm -q minikube - minikube status - "${MINIKUBE_HOME_BIN}"/kubectl version - fi - echo "================== /Tools installed ================" -} - -# TODO: A parse pararams function could be added for this -while getopts "rh" arg -do - case "${arg}" in - r) RH_INSTALL=1 - ;; - h) usage "$0" 0 - ;; - *) usage "$0" 0 - ;; - esac -done - -rh_release=$(cat /etc/redhat-release | awk -F "release" {'print $2'} | sed -e 's/^[ /t]*//g' | awk {'print $1'} | awk -F '.' {'print $1'}) -if [ $rh_release -lt 38 ]; -then - let result=255 - echo "Red Hat release unsupported:[$rh_release],return:[${result}]" - exit ${result} -fi - -if [ ${RH_INSTALL} -eq 0 ]; -then - create_minikube_user -else - create_crc_user -fi - -install_operator_sdk -install_podman -install_jq -install_wget -if [ ${RH_INSTALL} -eq 1 ]; -then - #sm_register - install_libvirtd - install_network_manager - get_oc_rpm_with_wget - install_oc - install_crc - setup_crc -else - install_minikube - setup_minikube - install_kubectl - set_minikube_permission -fi -clean -dump_tools -echo "Installation correct" -exit 0 diff --git a/Setup/setup_local_cluster/main.fmf b/Setup/setup_local_cluster/main.fmf new file mode 100644 index 0000000..6f2c9c2 --- /dev/null +++ b/Setup/setup_local_cluster/main.fmf @@ -0,0 +1,17 @@ +summary: Install and configure minikube and addons. +description: | + Install minikube, libvirt, kubectl and require addons. +contact: Patrik Koncity +component: + - tang +test: ./runtest.sh +framework: beakerlib +tag: + - CI-Tier-1 +require: + - libvirt-daemon + - podman +duration: 5m +enabled: true + + diff --git a/Setup/setup_local_cluster/runtest.sh b/Setup/setup_local_cluster/runtest.sh new file mode 100755 index 0000000..946b021 --- /dev/null +++ b/Setup/setup_local_cluster/runtest.sh @@ -0,0 +1,52 @@ +#!/bin/bash +# Copyright 2023. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +MINIKUBE_URL="https://storage.googleapis.com/minikube/releases/latest" +MINIKUBE_FILE="minikube-latest.x86_64.rpm" +MINIKUBE_URL_FILE="${MINIKUBE_URL}/${MINIKUBE_FILE}" +OLM_INSTALL_TIMEOUT="5m" +OPERATOR_SDK_DL_URL="https://github.com/operator-framework/operator-sdk/releases/download/v1.12.0" + +rlJournalStart + + rlPhaseStartTest "Main test" + #install operator sdk + ARCH=$(case $(uname -m) in x86_64) echo -n amd64 ;; aarch64) echo -n arm64 ;; *) echo -n "$(uname -m)" ;; esac) + OS=$(uname | awk '{print tolower($0)}') + OPERATOR_SDK_DL_URL=https://github.com/operator-framework/operator-sdk/releases/download/v1.12.0 + rlRun "curl -LO '${OPERATOR_SDK_DL_URL}/operator-sdk_${OS}_${ARCH}'" + rlRun "chmod +x operator-sdk_${OS}_${ARCH} && mv operator-sdk_${OS}_${ARCH} /usr/local/bin/operator-sdk" + + #setup of libvirt + rlRun "systemctl enable --now libvirtd" + rlRun "systemctl restart libvirtd.service" + + #installation of minikube + rlRun "curl -LO '${MINIKUBE_URL_FILE}'" + rlRun "rpm -Uvh '${MINIKUBE_FILE}' || true" + rlRun "curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl" + rlRun "chmod +x kubectl" + rlRun "mv kubectl /usr/local/bin/" + rlRun "kubectl version --client -o json" + rlRun "minikube start --force" + rlRun "operator-sdk --timeout ${OLM_INSTALL_TIMEOUT} olm install" + rlRun "minikube status" + rlRun "kubectl config view" + rlPhaseEnd + + +rlJournalEnd \ No newline at end of file diff --git a/packit-ci.fmf b/packit-ci.fmf new file mode 100644 index 0000000..4abb941 --- /dev/null +++ b/packit-ci.fmf @@ -0,0 +1,21 @@ +summary: common test plan for CI + + +prepare: + - how: shell + script: + - systemctl disable --now dnf-makecache.service || true + - systemctl disable --now dnf-makecache.timer || true + - dnf makecache + +#environment: +# VAR: + +discover: + how: fmf + test: + - /Setup/setup_local_cluster + - "/Sanity/.*" + +execute: + how: tmt