From 8b64c431cbb1473b3d6480ac9c93055046fef692 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Bompard?= Date: Wed, 29 Apr 2020 14:44:05 +0200 Subject: [PATCH] Fix .cico.pipeline file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Aurélien Bompard --- .cico.pipeline | 67 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 66 insertions(+), 1 deletion(-) diff --git a/.cico.pipeline b/.cico.pipeline index 1d2e76d7..0b07da4b 100644 --- a/.cico.pipeline +++ b/.cico.pipeline @@ -11,4 +11,69 @@ * https://github.com/centosci/cico-shared-library/blob/master/vars/fedoraInfraTox.groovy */ -fedoraInfraTox() +// fedoraInfraTox{} + +/** + * Distros we want to test on + */ +//def ACTIVE_DISTROS = ["f31", "f32", "epel7", "rawhide"] +def ACTIVE_DISTROS = ["f31", "f32", "latest"] + + + + +def stages = [:] +def fedora_containers = [ + containerTemplate(name: 'jnlp', + image: "docker-registry.default.svc:5000/openshift/cico-workspace:latest", + ttyEnabled: false, + args: '${computer.jnlpmac} ${computer.name}', + workingDir: "/workdir") +] + +ACTIVE_DISTROS.each { fedora -> + stages["tox-${fedora}"] = { + stage("tox-${fedora}"){ + container("${fedora}"){ + sh "poetry --version" + sh "mkdir -p /workdir/home/${fedora}" + withEnv(["HOME=/workdir/home/${fedora}"]) { + sh "cp -al ./ ../${fedora}/" + dir( "../${fedora}" ){ + sh "rm -rf .tox" + try { + sh "tox --skip-missing-interpreters" + githubNotify context: "CI on ${fedora}", status: 'SUCCESS' + } catch(error) { + githubNotify context: "CI on ${fedora}", status: 'FAILURE' + throw error + } + } + } + } + } + } + + fedora_containers.add(containerTemplate(name: "${fedora}", + image: "quay.io/centosci/python-tox:${fedora}", + ttyEnabled: true, + alwaysPullImage: true, + command: "cat", + workingDir: '/workdir')) +} + +podTemplate(name: 'fedora-tox', + label: 'fedora-tox', + cloud: 'openshift', + containers: fedora_containers +){ + node('fedora-tox'){ + ansiColor('xterm'){ + stage ('checkout'){ + checkout scm + } + + parallel stages + } + } +}