Commit 8d33daee authored by Tigran Mkrtchyan's avatar Tigran Mkrtchyan
Browse files

cta: add build pipeline to build CTA outside of CERN infrastructure

parent f52f5b5a
stages:
- build:srpm
- build: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/^[^-]*-//')
- echo "Removing protectbase from all repos (same as Puppet)"
- sed -i '/^protect=/d' /etc/yum.repos.d/*
cta_srpm:
stage: build:srpm
retry: 1
image: centos7
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/
cta_rpm:
except:
- tags
stage: build:rpm
retry: 1
image: centos7
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
- yum install -y git
- git submodule update --init --recursive
- cd xrootd-ssi-protobuf-interface && export XROOTD_SSI_PROTOBUF_INTERFACE_VERSION=$(git describe --abbrev=0) && cd ..
- 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
Markdown is supported
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