From d2a5572a457acd82f111bcac3efff42d36da535a Mon Sep 17 00:00:00 2001 From: Brian Stinson Date: May 18 2018 15:01:56 +0000 Subject: start on a pipeline Originally written by Brian Stinson, modified by Stephen Gallagher Signed-off-by: Stephen Gallagher --- diff --git a/.cico.pipeline b/.cico.pipeline new file mode 100644 index 0000000..0f836e0 --- /dev/null +++ b/.cico.pipeline @@ -0,0 +1,27 @@ +node('fedora27') { + + properties([ + parameters([ + string(defaultValue: "", description: "", name: "REPO"), + string(defaultValue: "", description: "", name: "BRANCH"), + ]) + ]) + + try { + stage('Clone Test Suite') { + sh "git clone --single-branch --depth 1 https://pagure.io/releng/fedora-module-defaults.git" + } + + stage('Run Test Suite') { + timeout(time: 6, unit: 'HOURS') { + sh 'cd fedora-module-defaults && sh ./run_tests.sh' + } + } + + } catch (e) { + currentBuild.result = "FAILURE" + throw e + } finally { + + } +} diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..9e7f759 --- /dev/null +++ b/Makefile @@ -0,0 +1,2 @@ +check: + /usr/bin/true diff --git a/run_tests.sh b/run_tests.sh new file mode 100644 index 0000000..25c8a97 --- /dev/null +++ b/run_tests.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +if [ -n "$REPO" -a -n "$BRANCH" ]; then +git remote rm proposed || true +git gc --auto +git remote add proposed "$REPO" +git fetch proposed +git checkout origin/master +git config --global user.email "noreply@ci.centos.org" +git config --global user.name "CentOS CI" +git merge --no-ff "proposed/$BRANCH" -m "Merge PR" + +echo "Running tests for branch $BRANCH of repo $REPO" +echo "Last commits:" +git log -2 +fi + +make check