Commit 727a3609 authored by Ben Couturier's avatar Ben Couturier
Browse files

Added gitlab-ci config

parent da2f0a06
stages:
- test
- deploy
centos7:
except:
- tags
image: cern/cc7-base:latest
script:
- yum install -y python-setuptools gcc python-devel git
- python --version
- python setup.py nosetests --cover-package LbPlatformUtils
- mkdir -p cover_report && mv -f cover cover_report/$CI_JOB_NAME
- python setup.py install && lb-describe-platform
artifacts:
paths:
- cover_report
when: always
expire_in: 1 week
slc6:
except:
- tags
image: cern/slc6-base:latest
script:
- yum install -y python-setuptools gcc python-devel git
- python --version
- python setup.py nosetests
- mkdir -p cover_report && mv -f cover cover_report/$CI_JOB_NAME
- python setup.py install && lb-describe-platform
artifacts:
paths:
- cover_report
when: always
expire_in: 1 week
slc5:
except:
- tags
image: cern/slc5-base:latest
script:
- ( yum install -y curl gcc make openssl-devel zilb-devel xz git &&
curl https://www.python.org/ftp/python/2.7.14/Python-2.7.14.tar.xz |
tar --use-compress-program=xz -x -f - &&
cd Python-2.7.14 && ./configure && make && make install &&
python -m ensurepip --default-pip )
- python --version
- python setup.py nosetests --cover-package LbPlatformUtils
- mkdir -p cover_report && mv -f cover cover_report/$CI_JOB_NAME
- python setup.py install && lb-describe-platform
artifacts:
paths:
- cover_report
when: always
expire_in: 1 week
python2.7:
image: python:2.7-slim
script:
- ( apt update && apt install -y curl git &&
cd /usr/local/share/ca-certificates &&
curl -O https://cafiles.cern.ch/cafiles/certificates/CERN%20Certification%20Authority.crt
-O https://cafiles.cern.ch/cafiles/certificates/CERN%20Grid%20Certification%20Authority.crt
-o crca2.der https://cafiles.cern.ch/cafiles/certificates/CERN%20Root%20Certification%20Authority%202.crt &&
openssl x509 -inform der -in crca2.der -outform pem -out crca2.crt && rm -f crca2.der &&
update-ca-certificates )
- python --version
- python setup.py nosetests --cover-package LbPlatformUtils
- mkdir -p cover_report && mv -f cover cover_report/$CI_JOB_NAME
- python setup.py install && lb-describe-platform
- python setup.py bdist_wheel --dist-dir public/lbplatformutils
artifacts:
paths:
- cover_report
- public
when: always
expire_in: 1 week
python3.5:
except:
- tags
image: python:3.5-slim
script:
- ( apt update && apt install -y curl git &&
cd /usr/local/share/ca-certificates &&
curl -O https://cafiles.cern.ch/cafiles/certificates/CERN%20Certification%20Authority.crt
-O https://cafiles.cern.ch/cafiles/certificates/CERN%20Grid%20Certification%20Authority.crt
-o crca2.der https://cafiles.cern.ch/cafiles/certificates/CERN%20Root%20Certification%20Authority%202.crt &&
openssl x509 -inform der -in crca2.der -outform pem -out crca2.crt && rm -f crca2.der &&
update-ca-certificates )
- python --version
- python setup.py nosetests
- mkdir -p cover_report && mv -f build/lib/cover cover_report/$CI_JOB_NAME
- python setup.py install && lb-describe-platform
artifacts:
paths:
- cover_report
when: always
expire_in: 1 week
python3.6:
image: python:3.6-slim
script:
- ( apt update && apt install -y curl git &&
cd /usr/local/share/ca-certificates &&
curl -O https://cafiles.cern.ch/cafiles/certificates/CERN%20Certification%20Authority.crt
-O https://cafiles.cern.ch/cafiles/certificates/CERN%20Grid%20Certification%20Authority.crt
-o crca2.der https://cafiles.cern.ch/cafiles/certificates/CERN%20Root%20Certification%20Authority%202.crt &&
openssl x509 -inform der -in crca2.der -outform pem -out crca2.crt && rm -f crca2.der &&
update-ca-certificates )
- python --version
- python setup.py nosetests
- mkdir -p cover_report && mv -f build/lib/cover cover_report/$CI_JOB_NAME
- python setup.py install && lb-describe-platform
- python setup.py sdist --dist-dir public/lbplatformutils
- python setup.py bdist_wheel --dist-dir public/lbplatformutils
artifacts:
paths:
- cover_report
- public
when: always
expire_in: 1 week
# see https://gitlab.cern.ch/gitlabci-examples/deploy_eos for the details
# of the configuration
deploy-packages:
stage: deploy
only:
- tags
image: gitlab-registry.cern.ch/ci-tools/ci-web-deployer:latest
script:
- test -z "$EOS_ACCOUNT_USERNAME" -o -z "$EOS_ACCOUNT_PASSWORD" -o -z "$EOS_PATH" && exit 0 || true
# Script that performs the deploy to EOS. Makes use of the variables defined in the project
# It will copy the generated content to the folder in EOS
- deploy-eos
# do not run any globally defined before_script or after_script for this step
before_script: []
after_script: []
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment