stages: - build:srpm - build:rpm - test:install - analysis:check - analysis:report 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 retry: 1 image: centos:7 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: 2 days paths: - build_srpm/RPM/SRPMS/ cta_rpm: except: - tags stage: build:rpm retry: 1 image: centos:7 script: - yum install -y yum-utils epel-release - yum install -y centos-release-openstack-train - cp continuousintegration/docker/ctafrontend/cc7/etc/yum.repos.d/eos-citrine-depend.repo /etc/yum.repos.d/. - rpm -import https://storage-ci.web.cern.ch/storage-ci/storageci.key # CTA uses a fixed version of CEPH #- yum install -y https://download.ceph.com/rpm-nautilus/el7/noarch/ceph-release-1-1.el7.noarch.rpm #- yum install -y librados-devel librados2 libradosstriper-devel libradosstriper1 libradospp-devel - yum localinstall -y https://download.ceph.com/rpm-nautilus/el7/x86_64/librados-devel-14.2.20-0.el7.x86_64.rpm https://download.ceph.com/rpm-nautilus/el7/x86_64/librados2-14.2.20-0.el7.x86_64.rpm https://download.ceph.com/rpm-nautilus/el7/x86_64/libradosstriper-devel-14.2.20-0.el7.x86_64.rpm https://download.ceph.com/rpm-nautilus/el7/x86_64/libradosstriper1-14.2.20-0.el7.x86_64.rpm https://download.ceph.com/rpm-nautilus/el7/x86_64/libradospp-devel-14.2.20-0.el7.x86_64.rpm # oracle libs - rpm -import https://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol7 - yum-config-manager --add-repo=http://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64 - yum install -y oracle-instantclient19.3-devel oracle-instantclient19.3-sqlplus oracle-instantclient19.3-basic # essential build tools - 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 install -y git - git submodule update --init --recursive - 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: 2 days paths: - build_rpm/RPM/RPMS test_install: except: - tags stage: test:install retry: 1 image: centos:7 script: - yum install -y wget - yum install -y yum-utils epel-release - yum install -y centos-release-openstack-train - cp continuousintegration/docker/ctafrontend/cc7/etc/yum.repos.d/eos-citrine-depend.repo /etc/yum.repos.d/. - cp continuousintegration/docker/ctafrontend/cc7/etc/yum.repos.d-public/eos-citrine.repo /etc/yum.repos.d/. - rpm -import https://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol7 - yum-config-manager --add-repo=http://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64 - yum install -y oracle-instantclient19.3-devel oracle-instantclient19.3-sqlplus oracle-instantclient19.3-bas - yum -y install yum-plugin-priorities yum-plugin-versionlock - yum -y install -x cta-migration\* build_rpm/RPM/RPMS/x86_64/cta-* cppcheck: stage: analysis:check image: name: neszt/cppcheck-docker entrypoint: ["/usr/bin/env"] script: - cppcheck --xml --enable=warning,style,performance . 2> cppcheck_out.xml artifacts: expire_in: 2 days paths: - cppcheck_out.xml # based on https://gitlab.com/ahogen/cppcheck-codequality cppcheck_report: stage: analysis:report image: centos:7 script: - yum -y install python3-pip - python3 -m pip install -U cppcheck_codequality - cppcheck-codequality --input-file=cppcheck_out.xml --output-file=cppcheck.json artifacts: reports: codequality: cppcheck.json