Skip to content

Commit

Permalink
Fix .cico.pipeline file
Browse files Browse the repository at this point in the history
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
  • Loading branch information
abompard committed Apr 29, 2020
1 parent a7a24e3 commit 8b64c43
Showing 1 changed file with 66 additions and 1 deletion.
67 changes: 66 additions & 1 deletion .cico.pipeline
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
}

0 comments on commit 8b64c43

Please sign in to comment.