Skip to content

Commit 71bbcb0

Browse files
author
dabercro
committed
Add docker instances for sl6 and sl7
1 parent fa2d974 commit 71bbcb0

5 files changed

Lines changed: 47 additions & 15 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
*~
33
build/*
44
test/*/*
5+
!test/sl?/Dockerfile
56
test/*.cache.json
67
dist/*
78
cmstoolbox.egg-info/*

Jenkinsfile

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,32 @@
1-
pipeline {
2-
agent {
3-
docker {
4-
image 'python:2.7-slim'
5-
args '-u root:root'
6-
}
7-
}
1+
def run(os) {
2+
return {
3+
4+
docker.build("opsspace-${os}:${env.BUILD_ID}", "test/${os}").inside('-u root:root') {
85

9-
stages {
10-
stage ('Installation') {
11-
steps {
12-
sh 'python setup.py install'
6+
stage("${os}: Copy Source") {
7+
sh """
8+
test ! -d ${os} || rm -rf ${os}
9+
mkdir ${os}
10+
cp --parents `git ls-files` ${os}
11+
"""
12+
}
13+
14+
stage("${os}: Installation") {
15+
sh "cd ${os}; python setup.py install"
1316
}
14-
}
1517

16-
stage ('Unit Tests') {
17-
steps {
18-
sh 'opsspace-test'
18+
stage("${os}: Unit Tests") {
19+
sh "cd ${os}; opsspace-test"
1920
}
2021
}
2122
}
2223
}
24+
25+
def osList = ['sl6', 'sl7']
26+
27+
node {
28+
checkout scm
29+
parallel osList.collectEntries{
30+
["${it}": run(it)]
31+
}
32+
}

test/requirements26.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
astroid<1.3
22
pylint<1.4
33
testfixtures<6
4+
setuptools==36.8.0

test/sl6/Dockerfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
FROM sl:6
2+
3+
RUN yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
4+
5+
RUN yum -y install \
6+
python-pip \
7+
python-devel \
8+
git perl
9+
10+
RUN pip install -U 'pip==9.0.1'

test/sl7/Dockerfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
FROM sl:7
2+
3+
RUN yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
4+
5+
RUN yum -y install \
6+
python-pip \
7+
python-devel \
8+
git perl
9+
10+
RUN pip install -U 'pip==18.0'

0 commit comments

Comments
 (0)