Skip to content

Commit

Permalink
DRAFT: Prepare CI for tang operator
Browse files Browse the repository at this point in the history
  • Loading branch information
Koncpa committed Oct 9, 2023
1 parent d7a37e1 commit 3810146
Show file tree
Hide file tree
Showing 11 changed files with 294 additions and 451 deletions.
13 changes: 13 additions & 0 deletions .packit.yaml
Original file line number Diff line number Diff line change
@@ -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"

38 changes: 0 additions & 38 deletions Sanity/runnotest.sh

This file was deleted.

14 changes: 7 additions & 7 deletions Sanity/runtest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -612,9 +612,9 @@ bundleStart() {
fi
if [ "${V}" == "1" ] || [ "${VERBOSE}" == "1" ];
then
operator-sdk run bundle --timeout ${TO_BUNDLE} ${IMAGE_VERSION} ${RUN_BUNDLE_PARAMS} --namespace ${OPERATOR_NAMESPACE}
operator-sdk_linux_amd64 run bundle --timeout ${TO_BUNDLE} ${IMAGE_VERSION} ${RUN_BUNDLE_PARAMS} --namespace ${OPERATOR_NAMESPACE}
else
operator-sdk run bundle --timeout ${TO_BUNDLE} ${IMAGE_VERSION} ${RUN_BUNDLE_PARAMS} --namespace ${OPERATOR_NAMESPACE} 2>/dev/null
operator-sdk_linux_amd64 run bundle --timeout ${TO_BUNDLE} ${IMAGE_VERSION} ${RUN_BUNDLE_PARAMS} --namespace ${OPERATOR_NAMESPACE} 2>/dev/null
fi
return $?
}
Expand All @@ -626,9 +626,9 @@ bundleStop() {
fi
if [ "${V}" == "1" ] || [ "${VERBOSE}" == "1" ];
then
operator-sdk cleanup tang-operator --namespace ${OPERATOR_NAMESPACE}
operator-sdk_linux_amd64 cleanup tang-operator --namespace ${OPERATOR_NAMESPACE}
else
operator-sdk cleanup tang-operator --namespace ${OPERATOR_NAMESPACE} 2>/dev/null
operator-sdk_linux_amd64 cleanup tang-operator --namespace ${OPERATOR_NAMESPACE} 2>/dev/null
fi
if [ $? -eq 0 ];
then
Expand Down Expand Up @@ -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}]"
Expand All @@ -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"
}

Expand All @@ -775,7 +775,7 @@ rlJournalStart
rlPhaseStartSetup
rlRun "tmpdir=\$(mktemp -d)" 0 "Creating tmp directory"
rlRun "dumpOpenShiftClientStatus" 0 "Checking OpenshiftClient installation"
rlRun "operator-sdk version > /dev/null" 0 "Checking operator-sdk installation"
rlRun "operator-sdk_linux_amd64 version > /dev/null" 0 "Checking operator-sdk installation"
rlRun "checkClusterStatus" 0 "Checking cluster status"
# In case previous execution was abruptelly stopped:
rlRun "bundleStop" 0 "Cleaning already installed tang-operator (if any)"
Expand Down
File renamed without changes.
File renamed without changes.
49 changes: 0 additions & 49 deletions Sanity/tang_operator_test.sh

This file was deleted.

Loading

0 comments on commit 3810146

Please sign in to comment.