cta-build.yml 2.76 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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
16
  image: scientificlinux/sl:7
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
  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
35
  image: scientificlinux/sl:7
36
  script:
Tigran Mkrtchyan's avatar
Tigran Mkrtchyan committed
37
    - yum install -y yum-utils epel-release
Tigran Mkrtchyan's avatar
Tigran Mkrtchyan committed
38
    - cp continuousintegration/docker/ctafrontend/cc7/etc/yum.repos.d/eos-citrine-depend.repo /etc/yum.repos.d/.
Tigran Mkrtchyan's avatar
Tigran Mkrtchyan committed
39
    - rpm -import https://storage-ci.web.cern.ch/storage-ci/storageci.key
40
41
42
    #- 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.8-0.el7.x86_64.rpm https://download.ceph.com/rpm-nautilus/el7/x86_64/librados2-14.2.8-0.el7.x86_64.rpm https://download.ceph.com/rpm-nautilus/el7/x86_64/libradosstriper-devel-14.2.8-0.el7.x86_64.rpm https://download.ceph.com/rpm-nautilus/el7/x86_64/libradosstriper1-14.2.8-0.el7.x86_64.rpm https://download.ceph.com/rpm-nautilus/el7/x86_64/libradospp-devel-14.2.8-0.el7.x86_64.rpm
Tigran Mkrtchyan's avatar
Tigran Mkrtchyan committed
43
    - yum localinstall -y https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient19.3-devel-19.3.0.0.0-1.x86_64.rpm https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient19.3-sqlplus-19.3.0.0.0-1.x86_64.rpm https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient19.3-basic-19.3.0.0.0-1.x86_64.rpm
44
45
    - yum install -y gcc-c++ cmake make rpm-build
    - yum -y install yum-plugin-priorities yum-plugin-versionlock
Tigran Mkrtchyan's avatar
Tigran Mkrtchyan committed
46
    - cp -f continuousintegration/docker/ctafrontend/cc7/etc/yum/pluginconf.d/versionlock.list /etc/yum/pluginconf.d/
47
48
49
50
51
52
53
54
55
56
57
58
    - 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: 30 days
    paths:
    - build_rpm/RPM/RPMS