From b53de35b0aebd52b38b979d491731aa589548b03 Mon Sep 17 00:00:00 2001 From: Major Hayden Date: Wed, 8 Apr 2020 12:19:34 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=8F=20Add=20a=20little=20bit=20more=20?= =?UTF-8?q?testing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Test a deployment of osbuild along with osbuild-composer for each PR. More testing could be stacked on top. Signed-off-by: Major Hayden --- jenkins/run_tests.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 jenkins/run_tests.sh diff --git a/jenkins/run_tests.sh b/jenkins/run_tests.sh new file mode 100644 index 00000000..ee8c30cb --- /dev/null +++ b/jenkins/run_tests.sh @@ -0,0 +1,21 @@ +#!/bin/bash +set -euxo pipefail + +# Ensure Ansible is installed. +sudo dnf -y install ansible + +# Clone the latest version of ansible-osbuild. +git clone https://github.com/osbuild/ansible-osbuild.git ansible-osbuild + +# Get the current SHA of osbuild. +OSBUILD_VERSION=$(git rev-parse HEAD) + +# Run the deployment. +pushd ansible-osbuild + echo -e "[test_instances]\nlocalhost ansible_connection=local" > hosts.ini + ansible-playbook \ + -i hosts.ini \ + -e osbuild_repo=${WORKSPACE} \ + -e osbuild_version=${OSBUILD_VERSION} \ + playbook.yml +popd