-
Julien Leduc authored
and 1 hour by default. Previously when cta frontend coredumped, all the files appeared to have been successfully deleted when it was not the case. I am now making sure cta client returned with no error to correctly detect failures.
Julien Leduc authoredand 1 hour by default. Previously when cta frontend coredumped, all the files appeared to have been successfully deleted when it was not the case. I am now making sure cta client returned with no error to correctly detect failures.
.gitlab-ci.yml 5.18 KiB
stages:
- build:srpm
- build:rpm
- build:dockerimage
- rename:dockerimage
- test
- publish_rpm
before_script:
- export CTA_BUILD_ID=${CI_PIPELINE_ID}git${CI_COMMIT_SHA:0:8}
- echo "Exporting CTA_BUILD_ID=${CTA_BUILD_ID}"
- test -n "${CI_COMMIT_TAG}" && export TAG_VERSION=$(echo ${CI_COMMIT_TAG} | sed -e 's/^v//;s/-.*$//')
- test -n "${CI_COMMIT_TAG}" && export TAG_RELEASE=$(echo ${CI_COMMIT_TAG} | sed -e 's/^[^-]*-//')
cta_srpm:
stage: build:srpm
image: gitlab-registry.cern.ch/linuxsupport/cc7-base
script:
- yum install -y gcc-c++ cmake make rpm-build
- mkdir build_srpm
- cd build_srpm
- cmake -DPackageOnly:Bool=true -DVCS_VERSION=${CTA_BUILD_ID} ..
- make cta_srpm
artifacts:
expire_in: 30 days
paths:
- build_srpm/RPM/SRPMS/
tags:
- docker
cta_rpm:
stage: build:rpm
image: gitlab-registry.cern.ch/linuxsupport/cc7-base
script:
- cp -f continuousintegration/docker/ctafrontend/cc7/etc/yum.repos.d/*.repo /etc/yum.repos.d/
- yum install -y gcc-c++ cmake make rpm-build
- yum -y install yum-plugin-priorities yum-plugin-versionlock
- cp -f continuousintegration/docker/ctafrontend/cc7/etc/yum/pluginconf.d/versionlock.list /etc/yum/pluginconf.d/
- yum-builddep --nogpgcheck -y build_srpm/RPM/SRPMS/*
- mkdir build_rpm
- cd build_rpm
- cmake -DVCS_VERSION=${CTA_BUILD_ID} ..
- make cta_rpm
artifacts:
expire_in: 30 days
paths:
- build_rpm/RPM/RPMS
tags:
- docker
cta_tagged_rpm:
only:
- tags
stage: build:rpm
image: gitlab-registry.cern.ch/linuxsupport/cc7-base
script:
- if [ -z "${CI_COMMIT_TAG}" ]; then echo "This is not a tagged commit, exiting"; exit 0; fi
- echo "Building package for tag ${CI_COMMIT_TAG}. CTA_VERSION=${TAG_VERSION} - CTA_RELEASE=${TAG_RELEASE}"
- cp -f continuousintegration/docker/ctafrontend/cc7/etc/yum.repos.d/*.repo /etc/yum.repos.d/
- yum install -y gcc-c++ cmake make rpm-build
- yum -y install yum-plugin-priorities yum-plugin-versionlock
- cp -f continuousintegration/docker/ctafrontend/cc7/etc/yum/pluginconf.d/versionlock.list /etc/yum/pluginconf.d/
- yum-builddep --nogpgcheck -y build_srpm/RPM/SRPMS/*
- mkdir build_tagged_rpm
- cd build_tagged_rpm
- CTA_VERSION=${TAG_VERSION} cmake -DVCS_VERSION=${TAG_RELEASE} ..