tests: move some integration tests to gitlab CI

This also includes several modifications to tests scripts to
enable them running in gitlab CI.
This commit is contained in:
Jakub Rusz 2021-05-04 18:15:09 +02:00 committed by Alexander Todorov
parent e613b2456b
commit 8dcf859473
7 changed files with 84 additions and 36 deletions

60
schutzbot/Jenkinsfile vendored
View file

@ -815,34 +815,41 @@ void run_tests(test_type) {
if (test_type == 'integration') {
// Run Koji tests.
sh (
label: "Koji tests",
script: "/usr/libexec/tests/osbuild-composer/koji.sh"
)
if (env.BUILD_CAUSE == 'cron') {
sh (
label: "Koji tests",
script: "/usr/libexec/tests/osbuild-composer/koji.sh"
)
// Run the libvirt test.
sh (
label: "Integration test: libvirt",
script: "/usr/libexec/tests/osbuild-composer/libvirt.sh"
)
// Run the libvirt test.
sh (
label: "Integration test: libvirt",
script: "/usr/libexec/tests/osbuild-composer/libvirt.sh"
)
// Run the AWS test.
sh (
label: "Integration test: AWS",
script: "/usr/libexec/tests/osbuild-composer/aws.sh"
)
// Run the AWS test.
sh (
label: "Integration test: AWS",
script: "/usr/libexec/tests/osbuild-composer/aws.sh"
)
// Run the Azure test.
sh (
label: "Integration test: AZURE",
script: "/usr/libexec/tests/osbuild-composer/azure.sh"
)
// Run the Azure test.
sh (
label: "Integration test: AZURE",
script: "/usr/libexec/tests/osbuild-composer/azure.sh"
)
// Run the API test with AWS.
sh (
label: "Integration test: API (AWS)",
script: "/usr/libexec/tests/osbuild-composer/api.sh aws"
)
// Run the API test with AWS.
sh (
label: "Integration test: API (AWS)",
script: "/usr/libexec/tests/osbuild-composer/api.sh aws"
)
sh (
label: "Integration test: API (Azure)",
script: "/usr/libexec/tests/osbuild-composer/api.sh azure"
)
}
if (env.GOOGLE_APPLICATION_CREDENTIALS) {
// Run the API test with GCP.
@ -852,11 +859,6 @@ void run_tests(test_type) {
)
}
sh (
label: "Integration test: API (Azure)",
script: "/usr/libexec/tests/osbuild-composer/api.sh azure"
)
if (env.VCENTER_CREDS) {
// Run the VMWare test.
sh (

View file

@ -3,6 +3,8 @@ set -euo pipefail
source /etc/os-release
DISTRO_CODE="${DISTRO_CODE:-${ID}_${VERSION_ID//./}}"
BRANCH_NAME="${BRANCH_NAME:-${CI_COMMIT_BRANCH}}"
BUILD_ID="${BUILD_ID:-${CI_PIPELINE_ID}}"
CLEANER_CMD="env $(cat "${AZURE_CREDS:-/dev/null}") BRANCH_NAME=$BRANCH_NAME BUILD_ID=$BUILD_ID DISTRO_CODE=$DISTRO_CODE /usr/libexec/osbuild-composer-test/cloud-cleaner"