From 5620d5080a7872ca65cd6670d4ce75e8a62bf886 Mon Sep 17 00:00:00 2001 From: Major Hayden Date: Wed, 13 May 2020 16:23:01 -0500 Subject: [PATCH] CI: Remove old jenkins.osbuild.org configuation Signed-off-by: Major Hayden --- jenkins/Jenkinsfile | 51 ------------------------------------- jenkins/run_tests.sh | 60 -------------------------------------------- 2 files changed, 111 deletions(-) delete mode 100644 jenkins/Jenkinsfile delete mode 100755 jenkins/run_tests.sh diff --git a/jenkins/Jenkinsfile b/jenkins/Jenkinsfile deleted file mode 100644 index 0a6979ec..00000000 --- a/jenkins/Jenkinsfile +++ /dev/null @@ -1,51 +0,0 @@ -pipeline { - agent none - - options { - timestamps() - ansiColor('xterm') - } - - stages { - stage("Functional Testing") { - parallel { - stage('Fedora 31 image') { - agent { - label "fedora31" - } - environment { - TEST_TYPE = "image" - } - steps { - sh "jenkins/run_tests.sh" - } - } - stage('Fedora 32 image') { - agent { - label "fedora32" - } - environment { - TEST_TYPE = "image" - } - steps { - sh "jenkins/run_tests.sh" - } - } - // Disable RHEL 8.3 image testing for now until we work out the - // QEMU issues there. - // - // stage('RHEL 8.2 image') { - // agent { - // label "rhel82" - // } - // environment { - // TEST_TYPE = "image" - // } - // steps { - // sh "jenkins/run_tests.sh" - // } - // } - } - } - } -} diff --git a/jenkins/run_tests.sh b/jenkins/run_tests.sh deleted file mode 100755 index ff05f693..00000000 --- a/jenkins/run_tests.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/bash -set -euxo pipefail - -# Read variables about the OS. -source /etc/os-release - -# Create temporary directories for Ansible. -sudo mkdir -vp /opt/ansible_{local,remote} -sudo chmod -R 777 /opt/ansible_{local,remote} - -# Restart systemd to work around some Fedora issues in cloud images. -sudo systemctl restart systemd-journald - -# Get the current journald cursor. -export JOURNALD_CURSOR=$(sudo journalctl --quiet -n 1 --show-cursor | tail -n 1 | grep -oP 's\=.*$') - -# Add a function to preserve the system journal if something goes wrong. -preserve_journal() { - sudo journalctl --after-cursor=${JOURNALD_CURSOR} > systemd-journald.log - exit 1 -} -trap "preserve_journal" ERR - -# Ensure Ansible is installed. -if ! rpm -q ansible; then - sudo dnf -y install ansible -fi - -# Write a simple hosts file for Ansible. -echo -e "[test_instances]\nlocalhost ansible_connection=local" > hosts.ini - -# Set Ansible's config file location. -export ANSIBLE_CONFIG=ansible-osbuild/ansible.cfg - -# Clone the latest version of ansible-osbuild. - -# Get the current SHA of osbuild. -OSBUILD_VERSION=$(git rev-parse HEAD) - -# Deploy the software. -git clone https://github.com/osbuild/ansible-osbuild.git ansible-osbuild -ansible-playbook \ - -i hosts.ini \ - -e osbuild_repo=${WORKSPACE} \ - -e osbuild_version=$(git rev-parse HEAD) \ - -e cleanup_composer_directories=yes \ - ansible-osbuild/playbook.yml - -# Run the tests only on Fedora 31 for now. -if [[ $NAME == "Fedora" ]] && [[ $VERSION_ID == "31" ]]; then - ansible-playbook \ - -e workspace=${WORKSPACE} \ - -e journald_cursor="${JOURNALD_CURSOR}" \ - -e test_type=${TEST_TYPE:-image} \ - -i hosts.ini \ - ansible-osbuild/repos/osbuild-composer/jenkins/test.yml -fi - -# Collect the systemd journal anyway if we made it all the way to the end. -sudo journalctl --after-cursor=${JOURNALD_CURSOR} > systemd-journald.log