Skip to content
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

schutzbot: enable F33 testing #1014

Merged
merged 5 commits into from Nov 11, 2020
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
63 changes: 63 additions & 0 deletions schutzbot/Jenkinsfile
Expand Up @@ -165,6 +165,69 @@ pipeline {
}
}
}
stage('F33 Base') {
agent { label "f33cloudbase && x86_64 && aws" }
environment { TEST_TYPE = "base" }
steps {
unstash 'fedora33'
run_tests('base')
}
post {
always {
preserve_logs('fedora33-base')
}
}
}
stage('F33 Image') {
agent { label "f33cloudbase && psi && x86_64" }
environment {
TEST_TYPE = "image"
AWS_CREDS = credentials('aws-credentials-osbuildci')
AWS_IMAGE_TEST_CREDS = credentials('aws-credentials-osbuild-image-test')
AZURE_CREDS = credentials('azure')
OPENSTACK_CREDS = credentials("psi-openstack-creds")
VCENTER_CREDS = credentials('vmware-vcenter-credentials')
DISTRO_CODE = "fedora33"
}
steps {
unstash 'fedora33'
run_tests('image')
}
post {
always {
preserve_logs('fedora33-image')
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
preserve_logs('fedora33-image')
preserve_logs('fedora33-image')
sh (
label: "Run cloud cleaner just in case something failed",
script: "schutzbot/run_cloud_cleaner.sh"
)

Copy link
Member Author

Choose a reason for hiding this comment

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

Indeed, thanks! I added those lines before the cloud cleaner was introduced.

}
}
}
stage('F33 Integration') {
agent { label "f33cloudbase && x86_64 && aws" }
environment {
TEST_TYPE = "integration"
AWS_CREDS = credentials('aws-credentials-osbuildci')
AWS_IMAGE_TEST_CREDS = credentials('aws-credentials-osbuild-image-test')
}
steps {
unstash 'fedora33'
run_tests('integration')
}
post {
always {
preserve_logs('fedora33-integration')
}
}
}
stage('F33 OSTree') {
agent { label "f33cloudbase && psi && x86_64" }
steps {
unstash 'fedora33'
run_tests('ostree')
}
post {
always {
preserve_logs('fedora33-ostree')
}
}
}
stage('EL8 Base') {
agent { label "rhel8cloudbase && x86_64 && aws" }
environment {
Expand Down
9 changes: 8 additions & 1 deletion test/cases/ostree.sh
Expand Up @@ -17,14 +17,21 @@ case "${ID}-${VERSION_ID}" in
OSTREE_REF="fedora/32/${ARCH}/iot"
OS_VARIANT="fedora32"
BOOT_LOCATION="https://mirrors.rit.edu/fedora/fedora/linux/releases/32/Everything/x86_64/os/";;
"fedora-33")
IMAGE_TYPE=fedora-iot-commit
OSTREE_REF="fedora/33/${ARCH}/iot"
OS_VARIANT="fedora33"
BOOT_LOCATION="https://mirrors.rit.edu/fedora/fedora/linux/releases/33/Everything/x86_64/os/";;
"rhel-8.3")
IMAGE_TYPE=rhel-edge-commit
OSTREE_REF="rhel/8/${ARCH}/edge"
OS_VARIANT="rhel8.3"
# When 8.3 was released, it wasn't available on all RH internal
# mirrors, therefore the Boston mirror is hardcoded.
BOOT_LOCATION="http://download.eng.bos.redhat.com/released/rhel-8/RHEL-8/8.3.0/BaseOS/x86_64/os/";;
*) ;;
*)
echo "unsupported distro: ${ID}-${VERSION_ID}"
exit 1;;
esac


Expand Down
16 changes: 12 additions & 4 deletions test/cases/qemu.sh
Expand Up @@ -205,10 +205,18 @@ sudo kill ${WORKER_JOURNAL_PID}

# Download the image.
greenprint "📥 Downloading the image"
sudo composer-cli compose image "${COMPOSE_ID}" > /dev/null
IMAGE_FILENAME=$(basename "$(find . -maxdepth 1 -type f -name "*.${IMAGE_EXTENSION}")")
LIBVIRT_IMAGE_PATH=/var/lib/libvirt/images/${IMAGE_KEY}.${IMAGE_EXTENSION}
sudo mv "$IMAGE_FILENAME" "$LIBVIRT_IMAGE_PATH"

# Current $PWD is inside /tmp, there may not be enough space for an image.
# Let's use a bigger temporary directory for this operation.
BIG_TEMP_DIR=/var/lib/osbuild-composer-tests
sudo rm -rf "${BIG_TEMP_DIR}" || true
Copy link
Contributor

Choose a reason for hiding this comment

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

Why the || true part? Shouldn't it be fine with non-existing or empty directory because of -f?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, right, didn't know about this -f's behavior.

sudo mkdir "${BIG_TEMP_DIR}"
pushd "${BIG_TEMP_DIR}"
sudo composer-cli compose image "${COMPOSE_ID}" > /dev/null
IMAGE_FILENAME=$(basename "$(find . -maxdepth 1 -type f -name "*.${IMAGE_EXTENSION}")")
LIBVIRT_IMAGE_PATH=/var/lib/libvirt/images/${IMAGE_KEY}.${IMAGE_EXTENSION}
sudo mv "$IMAGE_FILENAME" "$LIBVIRT_IMAGE_PATH"
popd

# Prepare cloud-init data.
CLOUD_INIT_DIR=$(mktemp -d)
Expand Down