mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-04-05 03:38:12 +08:00
Transition CentOS CI to using Docker for running its tests
This commit is contained in:
15
Jenkinsfile
vendored
15
Jenkinsfile
vendored
@@ -25,23 +25,20 @@ node('factory2'){
|
||||
try{
|
||||
stage('Pre Setup Node'){
|
||||
// Install EPEL and the SCLs repo
|
||||
onmyduffynode 'yum -y install epel-release yum-config-manager centos-release-scl && yum-config-manager --enable rhel-server-rhscl-7-rpms'
|
||||
onmyduffynode 'yum -y install python27 python-devel rh-python36 @development krb5-devel openssl-devel libffi-devel swig createrepo_c cairo-gobject-devel gobject-introspection-devel'
|
||||
// Remove this once it's available in the official repos
|
||||
onmyduffynode 'yum -y install https://kojipkgs.fedoraproject.org//packages/libmodulemd/1.0.4/1.fc26/x86_64/libmodulemd-1.0.4-1.fc26.x86_64.rpm'
|
||||
// Update pip and setuptools and install tox in the SCL environment
|
||||
onmyduffynode 'scl enable python27 \'pip install --upgrade pip setuptools tox\''
|
||||
onmyduffynode 'scl enable rh-python36 \'pip install --upgrade pip setuptools tox\''
|
||||
onmyduffynode 'yum -y install git docker && systemctl start docker'
|
||||
}
|
||||
|
||||
stage('Clone Test Suite') {
|
||||
onmyduffynode "git clone -b \"${env.BRANCH_NAME}\" --single-branch --depth 1 https://pagure.io/fm-orchestrator"
|
||||
}
|
||||
|
||||
stage('Build Docker Image') {
|
||||
onmyduffynode 'cd fm-orchestrator && docker build -t mbs/test -f Dockerfile-tests .'
|
||||
}
|
||||
|
||||
stage('Run Test Suite') {
|
||||
timeout(20) {
|
||||
// Run tox in the SCL environment
|
||||
onmyduffynode 'cd fm-orchestrator && scl enable rh-python36 \'tox -r\''
|
||||
onmyduffynode 'cd fm-orchestrator && docker run mbs/test'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user