Skip to content
Snippets Groups Projects
.gitlab-ci.yml 29.9 KiB
Newer Older
stages:
    - build
Andrea Michelotti's avatar
Andrea Michelotti committed
    - test
    - deploy
    - docker
Andrea Michelotti's avatar
Andrea Michelotti committed
    - publish
Andrea Michelotti's avatar
Andrea Michelotti committed
before_script:
  - export NOW=$(date +"%Y%m%d-%H%M%S")
  - export TAR_NAME_POSTFIX=$NOW
  - export SYS=`uname -s`
  - if [ "$SYS" == "Linux" ];then export NPROC=`nproc`;else export NPROC=4;fi
  - echo "[$CI_RUNNER_DESCRIPTION] $SYS $CI_JOB_NAME Working directory:$PWD tag $CI_COMMIT_REF_NAME CPUS:$NPROC"
Andrea Michelotti's avatar
Andrea Michelotti committed
  - export ARCH=`uname -m`
  - eval export `cat /etc/*-release|grep -e "^VERSION_ID="|tr -d "\" "`
  - eval export `cat /etc/*-release|grep -e "^ID="|tr -d "\" "`
Andrea Michelotti's avatar
Andrea Michelotti committed
  - export REV_POSTFIX=$CI_COMMIT_REF_NAME-$ID-$VERSION_ID-$ARCH
Andrea Michelotti's avatar
Andrea Michelotti committed
  - export DISTRIB_NAME=chaos-distrib-$REV_POSTFIX
  - export DISTRIB_PREFIX=/usr/local/chaos/chaos-distrib
  - export INSTALL_DIR=$DISTRIB_PREFIX
  - export CHAOS_MDS=localhost:5000
Andrea Michelotti's avatar
Andrea Michelotti committed
  - export CHAOS_INTERFACE=lo
Andrea Michelotti's avatar
Andrea Michelotti committed
  - export CHAOS_LIVE_SERVERS=couchbase
  - export CHAOS_DB_SERVERS=mongo
Andrea Michelotti's avatar
Andrea Michelotti committed
  - export PATH=/usr/local/chaos/qt-56/bin:$PATH
  - echo "Running on $ID $VERSION_ID $ARCH (distrib name '$DISTRIB_NAME')"
Andrea Michelotti's avatar
Andrea Michelotti committed
  - git config --global user.email andrea.michelotti@lnf.infn.it
  - git config --global user.name amichelo
  - git config --global color.ui true
macosx_x86_64:
Andrea Michelotti's avatar
Andrea Michelotti committed
   tags:
     - macosx
   stage: build
   services:
   - name: couchbase/server:community-3.1.3
     alias: couchbase
   - name: baltig.infn.it:4567/chaos-lnf-control/chaos_bundle_compilation/mongo:3.4
     alias: mongo
Andrea Michelotti's avatar
Andrea Michelotti committed

Andrea Michelotti's avatar
Andrea Michelotti committed
   script:
Andrea Michelotti's avatar
Andrea Michelotti committed
     - export CHAOS_LIVE_SERVERS=localhost
     - export CHAOS_DB_SERVERS=localhost
Andrea Michelotti's avatar
Andrea Michelotti committed
     - curl http://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
     - chmod +x ~/bin/repo
Andrea Michelotti's avatar
Andrea Michelotti committed
     -  ~/bin/repo init -q --no-clone-bundle -u git@baltig.infn.it:chaos-lnf-control/chaos_repo_bundle.git -b $CI_COMMIT_REF_NAME
Andrea Michelotti's avatar
Andrea Michelotti committed
     - mkdir chaos-osx10-distrib
     - ~/bin/repo sync
     - ./tools/dbinit.sh localhost localhost
     - cd chaosframework;export CHAOS_LIB_HASH=`git log -n 1 --pretty="%h"`;cd -;
     - cmake -DCHAOS_ARCHITECTURE_TEST=ON -DCHAOS_VME=OFF -DCHAOS_VERSION_MAJOR="$CI_COMMIT_REF_NAME.$CHAOS_LIB_HASH" -DCHAOS_VERSION_MINOR="$CI_JOB_STAGE.$CI_COMMIT_SHA" -DCHAOS_WAN=ON . -DCHAOS_BUILD_ID=${CI_PIPELINE_ID} -DCMAKE_INSTALL_PREFIX=$PWD/chaos-osx10-distrib
     - make -j 8 install
     - export CHAOS_LIVE_SERVERS=localhost;export CHAOS_DB_SERVERS=localhost
#     - cd $PWD/chaos-osx10-distrib
#     - source chaos_env.sh
#     - ./tools/dbinit.sh localhost localhost
#     - ./tools/chaos_test.sh .
#     - ./tools/chaos_services.sh stop
Andrea Michelotti's avatar
Andrea Michelotti committed
     - tar cfz chaos-osx10-distrib.tar.gz chaos-osx10-distrib
   allow_failure: true
   artifacts:
         name: "chaos-osx10-distrib.tar.gz"
         paths:
Andrea Michelotti's avatar
Andrea Michelotti committed
            - ./*.tar.gz
Andrea Michelotti's avatar
Andrea Michelotti committed
         expire_in: 1 day
         when: always

build_i686_static_linux26:
  stage: build
  tags:
Andrea Michelotti's avatar
Andrea Michelotti committed
    - shared
  image: baltig.infn.it:4567/chaos-lnf-control/chaos_bundle_compilation:lite
  script:
    - repo init -q --no-clone-bundle -u git@baltig.infn.it:chaos-lnf-control/chaos_repo_bundle.git -b $CI_COMMIT_REF_NAME
    - repo sync
    - export PATH=/usr/local/chaos/i686-nptl-linux-gnu/bin/:$PATH
    - export DISTRIB_NAME=chaos-distrib-$CI_COMMIT_REF_NAME-$CI_JOB_NAME
    - export INSTALL_DIR=/builds/amichelo/chaos_bundle_compilation/distrib/$DISTRIB_NAME
    - mkdir -p $INSTALL_DIR
    - cd chaosframework;export CHAOS_LIB_HASH=`git log -n 1 --pretty="%h"`;cd -;
Andrea Michelotti's avatar
Andrea Michelotti committed
    - cmake -DCHAOS_VERSION_MAJOR="$CI_COMMIT_REF_NAME.$CHAOS_LIB_HASH" -DCHAOS_VERSION_MINOR="CI_JOB_STAGE.$CI_COMMIT_SHA" . -DCHAOS_STATIC=ON -DCHAOS_BUILD_ID=${CI_PIPELINE_ID}  -DCHAOS_TARGET=i686-linux26 -DCHAOS_CDS=OFF -DCHAOS_MDS=OFF -DCHAOS_WAN=OFF -DCHAOS_EXAMPLES=OFF -DCHAOS_ENABLE_C11=OFF -DCMAKE_BUILD_WITH_INSTALL_RPATH=1 -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR |& tee $INSTALL_DIR/bundle.configuration.log
Andrea Michelotti's avatar
Andrea Michelotti committed
    - if ! make  -j 4 install |& tee $INSTALL_DIR/bundle.compilation.log;then tar cfz compilation.tar.gz $INSTALL_DIR/bundle.compilation.log;exit 1;fi
    - if [ $CI_COMMIT_REF_NAME == "master" ];then i686-nptl-linux-gnu-strip `find $INSTALL_DIR/bin/ -type f`;fi
    - i686-nptl-linux-gnu-strip `find $INSTALL_DIR/lib/ -name "*.a" -type f`
    - tar cfz $DISTRIB_NAME.tar.gz -C $INSTALL_DIR/..  $DISTRIB_NAME
Andrea Michelotti's avatar
Andrea Michelotti committed
#    - scp $DISTRIB_NAME.tar.gz chaosweb@opensource.lnf.infn.it:/var/www/html/binary/chaos/$CI_COMMIT_REF_NAME/i686/stage_$DISTRIB_NAME.tar.gz
  artifacts:
    name: "$DISTRIB_NAME.tar.gz"
    paths:
      - ./*.tar.gz
Andrea Michelotti's avatar
Andrea Michelotti committed
    expire_in: 2 day
    when: always


build_i686_dynamic_linux26:
  stage: build
  image: baltig.infn.it:4567/chaos-lnf-control/chaos_bundle_compilation:lite
  script:
    - export DISTRIB_NAME=chaos-distrib-$CI_COMMIT_REF_NAME-$CI_JOB_NAME
    - export INSTALL_DIR=/builds/amichelo/chaos_bundle_compilation/distrib/$DISTRIB_NAME
    - mkdir -p $INSTALL_DIR
    - repo init -q --no-clone-bundle -u git@baltig.infn.it:chaos-lnf-control/chaos_repo_bundle.git -b $CI_COMMIT_REF_NAME
    - repo sync
    - export PATH=/usr/local/chaos/i686-nptl-linux-gnu/bin/:$PATH
    - cd chaosframework;export CHAOS_LIB_HASH=`git log -n 1 --pretty="%h"`;cd -;
Andrea Michelotti's avatar
Andrea Michelotti committed
    - cmake . -DCHAOS_VERSION_MAJOR="$CI_COMMIT_REF_NAME.$CHAOS_LIB_HASH" -DCHAOS_VERSION_MINOR="CI_JOB_STAGE.$CI_COMMIT_SHA" -DCMAKE_BUILD_WITH_INSTALL_RPATH=1 -DCHAOS_TARGET=i686-linux26 -DCHAOS_BUILD_ID=${CI_PIPELINE_ID} -DCHAOS_CDS=OFF -DCHAOS_MDS=OFF -DCHAOS_WAN=OFF -DCHAOS_EXAMPLES=OFF -DCHAOS_ENABLE_C11=OFF -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR |& tee $INSTALL_DIR/bundle.configuration.log
Andrea Michelotti's avatar
Andrea Michelotti committed
    - if ! make  -j 4 install |& tee $INSTALL_DIR/bundle.compilation.log;then tar cfz compilation.tar.gz $INSTALL_DIR/bundle.compilation.log;exit 1;fi
    - cp /usr/local/chaos/i686-nptl-linux-gnu/i686-nptl-linux-gnu/sysroot/lib/libstdc++.so.6 $INSTALL_DIR/lib
    - tar cfz $DISTRIB_NAME.tar.gz -C $INSTALL_DIR/..  $DISTRIB_NAME
  artifacts:
    name: "$DISTRIB_NAME.tar.gz"
    paths:
      - ./*.tar.gz
Andrea Michelotti's avatar
Andrea Michelotti committed
    expire_in: 2 day
    when: always
ubuntu1604_x86_64:
  stage: build
Andrea Michelotti's avatar
Andrea Michelotti committed
  tags:
    - shared
  image: baltig.infn.it:4567/chaos-lnf-control/chaos_bundle_compilation:1604
Andrea Michelotti's avatar
Andrea Michelotti committed
  script:
Andrea Michelotti's avatar
Andrea Michelotti committed
    - mkdir -p $INSTALL_DIR
Andrea Michelotti's avatar
Andrea Michelotti committed
    - repo init -q --no-clone-bundle -u git@baltig.infn.it:chaos-lnf-control/chaos_repo_bundle.git -b $CI_COMMIT_REF_NAME
Andrea Michelotti's avatar
Andrea Michelotti committed
    - repo sync
    - cd chaosframework;export CHAOS_LIB_HASH=`git log -n 1 --pretty="%h"`;cd -;
    - if ! cmake -DCHAOS_ARCHITECTURE_TEST=ON -DCHAOS_VERSION_MAJOR="$CI_COMMIT_REF_NAME.$CHAOS_LIB_HASH" -DCHAOS_VERSION_MINOR="$CI_JOB_STAGE.$CI_COMMIT_SHA" -DCHAOS_WAN=ON -DOPENCV=$INSTALL_DIR -DIDS=ON -DENABLE_MEMCACHE=ON -DCHAOS_CCS=ON -DCHAOS_BUILD_ID=${CI_PIPELINE_ID} -DCERN_ROOT=$INSTALL_DIR -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR . |& tee $DISTRIB_PREFIX/bundle.configuration.log;then cat /tmp/cmake.log;fi
Andrea Michelotti's avatar
Andrea Michelotti committed
    - if ! make  -j 4 install |& tee $INSTALL_DIR/bundle.compilation.log;then tar cfz compilation.tar.gz $INSTALL_DIR/bundle.compilation.log;exit 1;fi    
Andrea Michelotti's avatar
Andrea Michelotti committed
    - git clone git@baltig.infn.it:chaos-lnf-control/luminometer.git
    - cd luminometer ;git checkout $CI_COMMIT_REF_NAME
    - cd chaos/src;cmake -DCMAKE_MODULE_PATH=$INSTALL_DIR -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR .
Andrea Michelotti's avatar
Andrea Michelotti committed
    - make -j 4 install
    - cd ../../../
Andrea Michelotti's avatar
Andrea Michelotti committed
    - scripts/strip_symbols.sh $INSTALL_DIR
Andrea Michelotti's avatar
Andrea Michelotti committed
    - tar cfz $DISTRIB_NAME.tar.gz -C /usr/local/chaos chaos-distrib
  artifacts:
    name: "$DISTRIB_NAME.tar.gz"
    paths:
      - ./*.tar.gz
Andrea Michelotti's avatar
Andrea Michelotti committed
    expire_in: 2 day
    when: always
    
ubuntu1804_x86_64:
  stage: build
  tags:
    - shared
  image: baltig.infn.it:4567/chaos-lnf-control/chaos_bundle_compilation:1804
  script:
    - mkdir -p $INSTALL_DIR
    - repo init -q --no-clone-bundle -u git@baltig.infn.it:chaos-lnf-control/chaos_repo_bundle.git -b $CI_COMMIT_REF_NAME
    - repo sync
    - cd chaosframework;export CHAOS_LIB_HASH=`git log -n 1 --pretty="%h"`;cd -;
    - if ! cmake -DCHAOS_ARCHITECTURE_TEST=ON -DCHAOS_VERSION_MAJOR="$CI_COMMIT_REF_NAME.$CHAOS_LIB_HASH" -DCHAOS_VERSION_MINOR="$CI_JOB_STAGE.$CI_COMMIT_SHA" -DCHAOS_WAN=ON -DOPENCV=$INSTALL_DIR -DIDS=ON -DENABLE_MEMCACHE=ON -DCHAOS_CCS=ON -DCHAOS_BUILD_ID=${CI_PIPELINE_ID} -DCERN_ROOT=$INSTALL_DIR -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR . |& tee $DISTRIB_PREFIX/bundle.configuration.log;then cat /tmp/cmake.log;fi
    - if ! make  -j 4 install |& tee $INSTALL_DIR/bundle.compilation.log;then tar cfz compilation.tar.gz $INSTALL_DIR/bundle.compilation.log;exit 1;fi    
    - git clone git@baltig.infn.it:chaos-lnf-control/luminometer.git
    - cd luminometer ;git checkout $CI_COMMIT_REF_NAME
    - cd chaos/src;cmake -DCMAKE_MODULE_PATH=$INSTALL_DIR -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR .
    - make -j 4 install
    - cd ../../../
    - scripts/strip_symbols.sh $INSTALL_DIR
    - tar cfz $DISTRIB_NAME.tar.gz -C /usr/local/chaos chaos-distrib
  artifacts:
    name: "$DISTRIB_NAME.tar.gz"
    paths:
      - ./*.tar.gz
    expire_in: 2 day
    when: always
    

Andrea Michelotti's avatar
Andrea Michelotti committed
centos7_x86_64:
  stage: build
  tags:
    - shared
  image: baltig.infn.it:4567/chaos-lnf-control/chaos_bundle_compilation:centos7
  script:
    - mkdir -p $INSTALL_DIR
    - repo init -q --no-clone-bundle -u git@baltig.infn.it:chaos-lnf-control/chaos_repo_bundle.git -b $CI_COMMIT_REF_NAME
    - repo sync
    - cd chaosframework;export CHAOS_LIB_HASH=`git log -n 1 --pretty="%h"`;cd -;
    - if ! cmake -DCHAOS_ARCHITECTURE_TEST=ON -DCHAOS_VERSION_MAJOR="$CI_COMMIT_REF_NAME.$CHAOS_LIB_HASH" -DCHAOS_VERSION_MINOR="$CI_JOB_STAGE.$CI_COMMIT_SHA" -DCHAOS_WAN=ON -DOPENCV=$INSTALL_DIR -DIDS=ON -DENABLE_MEMCACHE=ON -DCHAOS_CCS=ON -DCHAOS_BUILD_ID=${CI_PIPELINE_ID} -DCERN_ROOT=$INSTALL_DIR -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR . |& tee $DISTRIB_PREFIX/bundle.configuration.log;then cat /tmp/cmake.log;fi
Andrea Michelotti's avatar
Andrea Michelotti committed
    - make  -j 4 install
    - git clone git@baltig.infn.it:chaos-lnf-control/luminometer.git
    - cd luminometer ;git checkout $CI_COMMIT_REF_NAME
    - cd chaos/src;cmake -DCMAKE_MODULE_PATH=$INSTALL_DIR -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR .
Andrea Michelotti's avatar
Andrea Michelotti committed
    - if ! make  -j 4 install |& tee $INSTALL_DIR/bundle.compilation.log;then tar cfz compilation.tar.gz $INSTALL_DIR/bundle.compilation.log;exit 1;fi
Andrea Michelotti's avatar
Andrea Michelotti committed
    - cd ../../../
    - scripts/strip_symbols.sh $INSTALL_DIR
    - tar cfz $DISTRIB_NAME.tar.gz -C /usr/local/chaos chaos-distrib
  artifacts:
    name: "$DISTRIB_NAME.tar.gz"
    paths:
      - ./*.tar.gz
Andrea Michelotti's avatar
Andrea Michelotti committed
    expire_in: 2 day
    when: always
# ubuntu1604_legacy_x86_64:
#   stage: build
#   image: baltig.infn.it:4567/chaos-lnf-control/chaos_bundle_compilation:1604
#   script:
#     - mkdir -p $INSTALL_DIR
Andrea Michelotti's avatar
Andrea Michelotti committed
#     - repo init -q --no-clone-bundle -u git@baltig.infn.it:chaos-lnf-control/chaos_repo_bundle.git -b $CI_COMMIT_REF_NAME
#     - repo sync
#     - cmake -DCHAOS_VERSION_MAJOR="$CI_COMMIT_REF_NAME" -DCHAOS_VERSION_MINOR="$CI_JOB_STAGE.$CI_COMMIT_SHA" -DCHAOS_BOOST_VERSION=56 -DCHAOS_CC_COMPILER=g++-4.8 -DCHAOS_C_COMPILER=gcc-4.8 -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR .
#     - make  -j 4 install |& tee $DISTRIB_PREFIX/bundle.compilation.log
# #    - source $INSTALL_DIR/chaos_env.sh
# #    - cd chaosframework/ccs;qmake;echo "* compiling CCS";make -j 4 >& $DISTRIB_PREFIX/log/ccs.compilation.log ;cp ccs $INSTALL_DIR/bin;
# #    - cd ../../
#     - scripts/strip_symbols.sh $INSTALL_DIR
#     - tar cfz $DISTRIB_NAME.legacy.tar.gz -C /usr/local/chaos chaos-distrib
#   artifacts:
#         name: "$DISTRIB_NAME.legacy.tar.gz"
#         paths:
#           - ./*.tar.gz
#         expire_in: 1 day
ubuntu1404_x86_64:
  stage: build
Andrea Michelotti's avatar
Andrea Michelotti committed
  tags:
    - shared
  image: baltig.infn.it:4567/chaos-lnf-control/chaos_bundle_compilation:1404
Andrea Michelotti's avatar
Andrea Michelotti committed

  script:
Andrea Michelotti's avatar
Andrea Michelotti committed
    - mkdir -p $INSTALL_DIR
Andrea Michelotti's avatar
Andrea Michelotti committed
    - repo init -q --no-clone-bundle -u git@baltig.infn.it:chaos-lnf-control/chaos_repo_bundle.git -b $CI_COMMIT_REF_NAME
Andrea Michelotti's avatar
Andrea Michelotti committed
    - repo sync
    - cd chaosframework;export CHAOS_LIB_HASH=`git log -n 1 --pretty="%h"`;cd -;
    - if ! cmake -DCHAOS_ARCHITECTURE_TEST=ON -DCHAOS_VERSION_MAJOR="$CI_COMMIT_REF_NAME.$CHAOS_LIB_HASH" -DCHAOS_VERSION_MINOR="$CI_JOB_STAGE.$CI_COMMIT_SHA" -DOPENCV=$INSTALL_DIR -DIDS=ON  -DCHAOS_WAN=ON -DENABLE_MEMCACHE=ON -DCHAOS_BUILD_ID=${CI_PIPELINE_ID} -DCHAOS_CCS=ON -DCERN_ROOT=$INSTALL_DIR -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR . ;then cat /tmp/cmake.log;fi
Andrea Michelotti's avatar
Andrea Michelotti committed
    - if ! make  -j 4 install |& tee $INSTALL_DIR/bundle.compilation.log;then tar cfz compilation.tar.gz $INSTALL_DIR/bundle.compilation.log;exit 1;fi
Andrea Michelotti's avatar
Andrea Michelotti committed
    - source $INSTALL_DIR/chaos_env.sh
    - cd chaosframework/ccs;qmake;echo "* compiling CCS";
    - if make -j 4 >& $DISTRIB_PREFIX/log/ccs.compilation.log;then cp ccs $INSTALL_DIR/bin;else cat $DISTRIB_PREFIX/log/ccs.compilation.log;fi
Andrea Michelotti's avatar
Andrea Michelotti committed
    - cd ../../
Andrea Michelotti's avatar
Andrea Michelotti committed
    - git clone git@baltig.infn.it:chaos-lnf-control/luminometer.git
    - cd luminometer ;git checkout $CI_COMMIT_REF_NAME
    - cd chaos/src;cmake -DCMAKE_MODULE_PATH=$INSTALL_DIR -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR .
Andrea Michelotti's avatar
Andrea Michelotti committed
    - make -j 4 install
    - cd ../../../
Andrea Michelotti's avatar
Andrea Michelotti committed
    - scripts/strip_symbols.sh $INSTALL_DIR    
    - tar cfz $DISTRIB_NAME.tar.gz -C /usr/local/chaos chaos-distrib
  artifacts:
    name: "$DISTRIB_NAME.tar.gz"
    paths:
      - ./*.tar.gz
Andrea Michelotti's avatar
Andrea Michelotti committed
    when: always
build_arm_linux26:
  stage: build
Andrea Michelotti's avatar
Andrea Michelotti committed
  tags:
    - shared
  image: baltig.infn.it:4567/chaos-lnf-control/chaos_bundle_compilation:lite
Andrea Michelotti's avatar
Andrea Michelotti committed
  script:
    - export PATH=/usr/local/chaos/i686-nptl-linux-gnu/bin/:$PATH
    - export DISTRIB_NAME=chaos-distrib-$CI_COMMIT_REF_NAME-$CI_JOB_NAME
    - export INSTALL_DIR=/builds/amichelo/chaos_bundle_compilation/distrib/$DISTRIB_NAME
    - mkdir -p $INSTALL_DIR
Andrea Michelotti's avatar
Andrea Michelotti committed
    - repo init -q --no-clone-bundle -u git@baltig.infn.it:chaos-lnf-control/chaos_repo_bundle.git -b $CI_COMMIT_REF_NAME
Andrea Michelotti's avatar
Andrea Michelotti committed
    - repo sync
    - export PATH=/usr/local/chaos/gcc-arm-infn-linux26/bin/:$PATH
    - cd chaosframework;export CHAOS_LIB_HASH=`git log -n 1 --pretty="%h"`;cd -;
Andrea Michelotti's avatar
Andrea Michelotti committed
    - cmake  -DCHAOS_VME=OFF -DCHAOS_VERSION_MAJOR="$CI_COMMIT_REF_NAME.$CHAOS_LIB_HASH" -DCMAKE_BUILD_WITH_INSTALL_RPATH=1 -DCHAOS_VERSION_MINOR="CI_JOB_STAGE.$CI_COMMIT_SHA" . -DCHAOS_STATIC=ON -DCHAOS_BUILD_ID=${CI_PIPELINE_ID} -DCHAOS_TARGET=arm-linux-2.6 -DCHAOS_CDS=OFF -DCHAOS_MDS=OFF -DCHAOS_WAN=OFF -DCHAOS_EXAMPLES=OFF -DCHAOS_ENABLE_C11=OFF -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR
Andrea Michelotti's avatar
Andrea Michelotti committed
    - if ! make  -j 4 install |& tee $INSTALL_DIR/bundle.compilation.log;then tar cfz compilation.tar.gz $INSTALL_DIR/bundle.compilation.log;exit 1;fi
Andrea Michelotti's avatar
Andrea Michelotti committed
    - arm-infn-linux-gnueabi-strip `find $INSTALL_DIR/bin/ -type f`
    - arm-infn-linux-gnueabi-strip `find $INSTALL_DIR/lib/ -name "*.a" -type f`
    - tar cfz $DISTRIB_NAME.tar.gz -C $INSTALL_DIR/..  $DISTRIB_NAME
  artifacts:
    name: "$DISTRIB_NAME.tar.gz"
    paths:
      - ./*.tar.gz
Andrea Michelotti's avatar
Andrea Michelotti committed
    expire_in: 2 day
    when: always
Andrea Michelotti's avatar
Andrea Michelotti committed
# test_arm_linux26:
#   stage: test
#   dependencies:
#     - build_arm_linux26
#   tags:
#     - lnf
#   image: baltig.infn.it:4567/chaos-lnf-control/chaos_bundle_compilation:lite
#   script:
#     - scp chaos-distrib-$CI_COMMIT_REF_NAME-build_arm_linux26.tar.gz chaosweb@opensource.lnf.infn.it:/var/www/html/binary/chaos/$CI_COMMIT_REF_NAME/arm/stage_chaos-distrib-$CI_COMMIT_REF_NAME-build_arm_linux26.tar.gz
#     - tar xvfz chaos-distrib-$CI_COMMIT_REF_NAME-build_arm_linux26.tar.gz chaos-distrib-$CI_COMMIT_REF_NAME-build_arm_linux26/bin/daqLiberaServer
#     - scp chaos-distrib-$CI_COMMIT_REF_NAME-build_arm_linux26/bin/daqLiberaServer michelo@192.168.143.252:/export/chaos-libera/old/daqLiberaServer-test
#     - ssh root@libera01 "/mnt/chaos/old/daqLiberaServer-test --help"
Andrea Michelotti's avatar
Andrea Michelotti committed
# test_i686_static_linux26:
#   dependencies:
#     - build_i686_static_linux26
#   tags:
#     - lnf
#   stage: test
#   image: baltig.infn.it:4567/chaos-lnf-control/chaos_bundle_compilation:lite
#   allow_failure: true
#   script:
#     - scp chaosweb@opensource.lnf.infn.it:/var/www/html/binary/chaos/$CI_COMMIT_REF_NAME/i686/stage_chaos-distrib-$CI_COMMIT_REF_NAME-build_i686_static_linux26.tar.gz chaos-distrib-$CI_COMMIT_REF_NAME-build_i686_static_linux26.tar.gz 
#     - tar xfz chaos-distrib-$CI_COMMIT_REF_NAME-build_i686_static_linux26.tar.gz chaos-distrib-$CI_COMMIT_REF_NAME-build_i686_static_linux26/bin/UnitServer
#     - scp chaos-distrib-$CI_COMMIT_REF_NAME-build_i686_static_linux26/bin/UnitServer root@dante073:UnitServer-test
#     - ssh root@dante073 "./UnitServer-test --help"
#     - ssh root@dante073 "rm ./UnitServer-test"
Andrea Michelotti's avatar
Andrea Michelotti committed
  
# test_i686_dynamic_linux26:
#   dependencies:
#     - build_i686_dynamic_linux26
#   tags:
#     - lnf
#   stage: test
#   image: baltig.infn.it:4567/chaos-lnf-control/chaos_bundle_compilation:lite
#   allow_failure: true
#   script:
#     - scp chaos-distrib-$CI_COMMIT_REF_NAME-build_i686_dynamic_linux26.tar.gz chaosweb@opensource.lnf.infn.it:/var/www/html/binary/chaos/$CI_COMMIT_REF_NAME/i686/stage_chaos-distrib-$CI_COMMIT_REF_NAME-build_i686_dynamic_linux26.tar.gz
#     - tar xfz chaos-distrib-$CI_COMMIT_REF_NAME-build_i686_dynamic_linux26.tar.gz chaos-distrib-$CI_COMMIT_REF_NAME-build_i686_dynamic_linux26/bin/daqLiberaServer chaos-distrib-$CI_COMMIT_REF_NAME-build_i686_dynamic_linux26/lib
#     - mv chaos-distrib-$CI_COMMIT_REF_NAME-build_i686_dynamic_linux26/ test
#     - ssh michelo@192.168.143.252 "rm -rf /export/chaos-libera/new/test"
#     - scp -r test michelo@192.168.143.252:/export/chaos-libera/new
#     - ssh root@libera12 "LD_LIBRARY_PATH=/mnt/chaos/new/test/lib /mnt/chaos/new/test/bin/daqLiberaServer --help"
#     - ssh michelo@192.168.143.252 "rm -rf /export/chaos-libera/new/test"

ubuntu1604_test_x86_64:
  stage: test
Andrea Michelotti's avatar
Andrea Michelotti committed
    - ubuntu1604_x86_64
Andrea Michelotti's avatar
Andrea Michelotti committed
  services:
  - name: couchbase/server:community-3.1.3
    alias: couchbase
  - name: baltig.infn.it:4567/chaos-lnf-control/chaos_bundle_compilation/mongo:3.4
Andrea Michelotti's avatar
Andrea Michelotti committed
    alias: mongo

  image: baltig.infn.it:4567/chaos-lnf-control/chaos_bundle_compilation:1604
Andrea Michelotti's avatar
Andrea Michelotti committed
  script:
Andrea Michelotti's avatar
Andrea Michelotti committed
    - tar xfz $DISTRIB_NAME.tar.gz -C /usr/local/chaos/
    - $INSTALL_DIR/tools/dbinit.sh couchbase mongo
Andrea Michelotti's avatar
Andrea Michelotti committed
    - repo init -q --no-clone-bundle -u git@baltig.infn.it:chaos-lnf-control/chaos_repo_bundle.git -b $CI_COMMIT_REF_NAME
Andrea Michelotti's avatar
Andrea Michelotti committed
    - repo sync
    - cp -r tools $INSTALL_DIR
    - cp -r common/test/js $INSTALL_DIR/tools
Andrea Michelotti's avatar
Andrea Michelotti committed
    - export PPROF_PATH=$INSTALL_DIR/bin/pprof;
Andrea Michelotti's avatar
Andrea Michelotti committed
    - source $INSTALL_DIR/chaos_env.sh
Andrea Michelotti's avatar
Andrea Michelotti committed
    - if ! $INSTALL_DIR/bin/TestFramework;then export HEAPCHECK=strict; echo "*retrying with heap check"; $INSTALL_DIR/bin/TestFramework; exit 1;fi
    - if ! $INSTALL_DIR/tools/chaos_test.sh -d $INSTALL_DIR/tools/test;then export HEAPCHECK=normal;     tar cfvz test-log.tar.gz -C /usr/local/chaos/chaos-distrib log;echo "* retrying test in debug mode";export CHAOS_DEBUG_CMD_TOOL="gdb";if ! $INSTALL_DIR/tools/chaos_test.sh -d $INSTALL_DIR/tools/test;then tar cfvz test-log-debug.tar.gz -C /usr/local/chaos/chaos-distrib log;fi;exit 1;fi
    - $INSTALL_DIR/tools/chaos_services.sh stop
Andrea Michelotti's avatar
Andrea Michelotti committed
    - tar cfz test-log-ok.tar.gz -C /usr/local/chaos/chaos-distrib log
Andrea Michelotti's avatar
Andrea Michelotti committed
  artifacts:
    name: "test-log.tar.gz"
Andrea Michelotti's avatar
Andrea Michelotti committed
    paths:
    - ./test-log*.tar.gz
    expire_in: 3 day
Andrea Michelotti's avatar
Andrea Michelotti committed
    when: always
ubuntu1804_test_x86_64:
  stage: test
  dependencies:
    - ubuntu1804_x86_64
  services:
  - name: couchbase/server:community-3.1.3
    alias: couchbase
  - name: baltig.infn.it:4567/chaos-lnf-control/chaos_bundle_compilation/mongo:3.4
    alias: mongo

  image: baltig.infn.it:4567/chaos-lnf-control/chaos_bundle_compilation:1804
  script:
    - tar xfz $DISTRIB_NAME.tar.gz -C /usr/local/chaos/
    - $INSTALL_DIR/tools/dbinit.sh couchbase mongo
    - repo init -q --no-clone-bundle -u git@baltig.infn.it:chaos-lnf-control/chaos_repo_bundle.git -b $CI_COMMIT_REF_NAME
    - repo sync
    - cp -r tools $INSTALL_DIR
    - cp -r common/test/js $INSTALL_DIR/tools
    - export PPROF_PATH=$INSTALL_DIR/bin/pprof;
    - source $INSTALL_DIR/chaos_env.sh
    - HEAPCHECK=normal; LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libtcmalloc.so $INSTALL_DIR/bin/TestFramework;
    - if ! LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libtcmalloc.so$INSTALL_DIR/tools/chaos_test.sh -p normal -d $INSTALL_DIR/tools/test;then tar cfvz test-log.tar.gz -C /usr/local/chaos/chaos-distrib log /tmp/*.heap*;exit 1;fi
    - $INSTALL_DIR/tools/chaos_services.sh stop
    - tar cfz test-log-ok.tar.gz -C /usr/local/chaos/chaos-distrib log /tmp/*.heap*
  artifacts:
    name: "test-log.tar.gz"
    paths:
    - ./test-log*.tar.gz
    expire_in: 3 day
    when: always

centos7_test_x86_64:
  stage: test
  dependencies:
    - centos7_x86_64
  services:
  - name: couchbase/server:community-3.1.3
    alias: couchbase
  - name: baltig.infn.it:4567/chaos-lnf-control/chaos_bundle_compilation/mongo:3.4
    alias: mongo

  image: baltig.infn.it:4567/chaos-lnf-control/chaos_bundle_compilation:centos7
  script:
    - tar xfz $DISTRIB_NAME.tar.gz -C /usr/local/chaos/
    - $INSTALL_DIR/tools/dbinit.sh couchbase mongo
    - repo init -q --no-clone-bundle -u git@baltig.infn.it:chaos-lnf-control/chaos_repo_bundle.git -b $CI_COMMIT_REF_NAME
    - repo sync
Andrea Michelotti's avatar
Andrea Michelotti committed
    - export PPROF_PATH=$INSTALL_DIR/bin/pprof
    - cp -r tools $INSTALL_DIR
    - cp -r common/test/js $INSTALL_DIR/tools
    - source $INSTALL_DIR/chaos_env.sh
Andrea Michelotti's avatar
Andrea Michelotti committed
    - if ! $INSTALL_DIR/bin/TestFramework;then export HEAPCHECK=strict; echo "*retrying with heap check"; $INSTALL_DIR/bin/TestFramework; exit 1;fi
Andrea Michelotti's avatar
Andrea Michelotti committed
    - if ! $INSTALL_DIR/tools/chaos_test.sh -d $INSTALL_DIR/tools/test;then export HEAPCHECK=normal; tar cfvz test-log.tar.gz -C /usr/local/chaos/chaos-distrib log;echo "* retrying test in debug mode";export CHAOS_DEBUG_CMD_TOOL="gdb";if ! $INSTALL_DIR/tools/chaos_test.sh -d $INSTALL_DIR/tools/test;then tar cfvz test-log-debug.tar.gz -C /usr/local/chaos/chaos-distrib log;fi;exit 1;fi
    - $INSTALL_DIR/tools/chaos_services.sh stop
Andrea Michelotti's avatar
Andrea Michelotti committed
    - tar cfz test-log-ok.tar.gz -C /usr/local/chaos/chaos-distrib log
Andrea Michelotti's avatar
Andrea Michelotti committed
  artifacts:
    name: "test-log.tar.gz"
Andrea Michelotti's avatar
Andrea Michelotti committed
    paths:
    - ./test-log*.tar.gz
Andrea Michelotti's avatar
Andrea Michelotti committed
    expire_in: 3 day
    when: always
Andrea Michelotti's avatar
Andrea Michelotti committed
ubuntu1404_test_x86_64:
  stage: test
Andrea Michelotti's avatar
Andrea Michelotti committed
  tags:
    - lnf
    - ubuntu1404_x86_64
Andrea Michelotti's avatar
Andrea Michelotti committed
  services:
  - name: couchbase/server:community-3.1.3
    alias: couchbase
  - name: baltig.infn.it:4567/chaos-lnf-control/chaos_bundle_compilation/mongo:3.4
Andrea Michelotti's avatar
Andrea Michelotti committed
    alias: mongo

  image: baltig.infn.it:4567/chaos-lnf-control/chaos_bundle_compilation:1404
Andrea Michelotti's avatar
Andrea Michelotti committed
  script:
Andrea Michelotti's avatar
Andrea Michelotti committed
    - tar xfz $DISTRIB_NAME.tar.gz -C /usr/local/chaos
    - $INSTALL_DIR/tools/dbinit.sh couchbase mongo
Andrea Michelotti's avatar
Andrea Michelotti committed
    - repo init -q --no-clone-bundle -u git@baltig.infn.it:chaos-lnf-control/chaos_repo_bundle.git -b $CI_COMMIT_REF_NAME
Andrea Michelotti's avatar
Andrea Michelotti committed
    - repo sync
    - cp -r tools $INSTALL_DIR
    - cp -r common/test/js $INSTALL_DIR/tools
Andrea Michelotti's avatar
Andrea Michelotti committed
    - source $INSTALL_DIR/chaos_env.sh
Andrea Michelotti's avatar
Andrea Michelotti committed
    - export PPROF_PATH=$INSTALL_DIR/bin/pprof
    - if ! $INSTALL_DIR/bin/TestFramework;then export HEAPCHECK=strict; echo "*retrying with heap check"; $INSTALL_DIR/bin/TestFramework; exit 1;fi
    - if ! $INSTALL_DIR/tools/chaos_test.sh -d $INSTALL_DIR/tools/test;then export HEAPCHECK=normal;     tar cfvz test-log.tar.gz -C /usr/local/chaos/chaos-distrib log;echo "* retrying test in debug mode";export CHAOS_DEBUG_CMD_TOOL="gdb";if ! $INSTALL_DIR/tools/chaos_test.sh -d $INSTALL_DIR/tools/test;then tar cfvz test-log-debug.tar.gz -C /usr/local/chaos/chaos-distrib log;fi;exit 1;fi
    - $INSTALL_DIR/tools/chaos_services.sh stop
Andrea Michelotti's avatar
Andrea Michelotti committed
    - tar cfz test-log-ok.tar.gz -C /usr/local/chaos/chaos-distrib log
Andrea Michelotti's avatar
Andrea Michelotti committed
  artifacts:
    name: "test-log.tar.gz"
Andrea Michelotti's avatar
Andrea Michelotti committed
    paths:
    - ./test-log*.tar.gz
Andrea Michelotti's avatar
Andrea Michelotti committed
    expire_in: 3 day
    when: always
    

deploy_stage:
  tags:
    - lnf
  dependencies:
    - ubuntu1404_x86_64
    - ubuntu1604_x86_64
    - ubuntu1804_x86_64    
Andrea Michelotti's avatar
Andrea Michelotti committed
    - centos7_x86_64
    - build_i686_dynamic_linux26
    - build_arm_linux26
  stage: deploy
  image: baltig.infn.it:4567/chaos-lnf-control/chaos_bundle_compilation:lite
  script:
    - scripts/accept_merge_request.sh $CI_COMMIT_REF_NAME
    - if [ -e chaos-osx10-distrib.tar.gz ];then scp chaos-osx10-distrib.tar.gz chaosweb@opensource.lnf.infn.it:/var/www/html/binary/chaos/$CI_COMMIT_REF_NAME/$ARCH/osx/;fi
    - scp chaos-distrib-$CI_COMMIT_REF_NAME-ubuntu-16.04-x86_64.tar.gz chaosweb@opensource.lnf.infn.it:/var/www/html/binary/chaos/$CI_COMMIT_REF_NAME/$ARCH/ubuntu/16.04/chaos-distrib.tar.gz
    - scp chaos-distrib-$CI_COMMIT_REF_NAME-ubuntu-18.04-x86_64.tar.gz chaosweb@opensource.lnf.infn.it:/var/www/html/binary/chaos/$CI_COMMIT_REF_NAME/$ARCH/ubuntu/18.04/chaos-distrib.tar.gz
Andrea Michelotti's avatar
Andrea Michelotti committed
    - scp chaos-distrib-$CI_COMMIT_REF_NAME-centos-7-x86_64.tar.gz chaosweb@opensource.lnf.infn.it:/var/www/html/binary/chaos/$CI_COMMIT_REF_NAME/$ARCH/centos/7/chaos-distrib.tar.gz
    - scp chaos-distrib-$CI_COMMIT_REF_NAME-ubuntu-14.04-x86_64.tar.gz chaosweb@opensource.lnf.infn.it:/var/www/html/binary/chaos/$CI_COMMIT_REF_NAME/$ARCH/ubuntu/14.04/chaos-distrib.tar.gz
    - scp chaos-distrib-$CI_COMMIT_REF_NAME-build_arm_linux26.tar.gz chaosweb@opensource.lnf.infn.it:/var/www/html/binary/chaos/$CI_COMMIT_REF_NAME/arm/chaos-distrib-$CI_COMMIT_REF_NAME-build_arm_linux26.tar.gz
    - scp chaos-distrib-$CI_COMMIT_REF_NAME-build_i686_dynamic_linux26.tar.gz chaosweb@opensource.lnf.infn.it:/var/www/html/binary/chaos/$CI_COMMIT_REF_NAME/i686/chaos-distrib-$CI_COMMIT_REF_NAME-build_i686_dynamic_linux26.tar.gz
Andrea Michelotti's avatar
Andrea Michelotti committed
#    - ssh chaosweb@opensource.lnf.infn.it "mv /var/www/html/binary/chaos/$CI_COMMIT_REF_NAME/i686/stage_chaos-distrib-$CI_COMMIT_REF_NAME-build_i686_static_linux26.tar.gz /var/www/html/binary/chaos/$CI_COMMIT_REF_NAME/i686/chaos-distrib-$CI_COMMIT_REF_NAME-build_i686_static_linux26.tar.gz"

    - if [ "$DEPLOY_DESTINATION" == "development" ];then echo "deploying in LNF DEVELOPMENT infrastructure"; tar xfz $DISTRIB_NAME.tar.gz -C /usr/local/chaos;cd $DISTRIB_PREFIX;source chaos_env.sh;./tools/chaos_deploy.sh -c tools/config/lnf/test/chaos-infrastructure.txt -i /usr/local/chaos/chaos-distrib;fi
Andrea Michelotti's avatar
Andrea Michelotti committed
    - if [ "$DEPLOY_DESTINATION" == "production" ];then echo "deploying in LNF MASTER infrastructure"; tar xfz $DISTRIB_NAME.tar.gz -C /usr/local/chaos;cd $DISTRIB_PREFIX;source chaos_env.sh;./tools/chaos_deploy.sh -c tools/config/lnf/production/chaos-infrastructure.txt -i /usr/local/chaos/chaos-distrib;cd tools/config/lnf/production; ./update_luminometer.sh;fi    
mds-docker:
   tags:
     - ubuntu18-shell
   stage: docker
   dependencies: []
   script:
     - echo "* building $CI_JOB_NAME.git"
     - git clone git@baltig.infn.it:chaos-lnf-control/$CI_JOB_NAME.git 
     - cd  $CI_JOB_NAME
     - git checkout $CI_COMMIT_REF_NAME
Andrea Michelotti's avatar
Andrea Michelotti committed
     - if [ $CI_COMMIT_REF_NAME == "experimental" ];then docker build --no-cache -t baltig.infn.it:4567/chaos-lnf-control/$CI_JOB_NAME:latest .;docker push baltig.infn.it:4567/chaos-lnf-control/$CI_JOB_NAME:latest;fi
     - docker build --no-cache -t baltig.infn.it:4567/chaos-lnf-control/$CI_JOB_NAME:$CI_COMMIT_REF_NAME .
     - docker push baltig.infn.it:4567/chaos-lnf-control/$CI_JOB_NAME:$CI_COMMIT_REF_NAME
webui-docker:
   tags:
     - ubuntu18-shell
   stage: docker
   script:
     - echo "* building $CI_JOB_NAME.git"
     - git clone git@baltig.infn.it:chaos-lnf-control/$CI_JOB_NAME.git 
     - cd  $CI_JOB_NAME
     - git checkout $CI_COMMIT_REF_NAME
Andrea Michelotti's avatar
Andrea Michelotti committed
     - if [ $CI_COMMIT_REF_NAME == "experimental" ];then docker build --no-cache -t baltig.infn.it:4567/chaos-lnf-control/$CI_JOB_NAME:latest .;docker push baltig.infn.it:4567/chaos-lnf-control/$CI_JOB_NAME:latest;fi
     - docker build --no-cache -t baltig.infn.it:4567/chaos-lnf-control/$CI_JOB_NAME:$CI_COMMIT_REF_NAME .
     - docker push baltig.infn.it:4567/chaos-lnf-control/$CI_JOB_NAME:$CI_COMMIT_REF_NAME

agent-docker:
   tags:
     - ubuntu18-shell
   stage: docker
   script:
     - echo "* building $CI_JOB_NAME.git"
     - git clone git@baltig.infn.it:chaos-lnf-control/$CI_JOB_NAME.git 
     - cd  $CI_JOB_NAME
     - git checkout $CI_COMMIT_REF_NAME
Andrea Michelotti's avatar
Andrea Michelotti committed
     - if [ $CI_COMMIT_REF_NAME == "experimental" ];then docker build --no-cache -t baltig.infn.it:4567/chaos-lnf-control/$CI_JOB_NAME:latest .;docker push baltig.infn.it:4567/chaos-lnf-control/$CI_JOB_NAME:latest;fi
     - docker build --no-cache -t baltig.infn.it:4567/chaos-lnf-control/$CI_JOB_NAME:$CI_COMMIT_REF_NAME .
     - docker push baltig.infn.it:4567/chaos-lnf-control/$CI_JOB_NAME:$CI_COMMIT_REF_NAME

ccs-docker:
   tags:
     - ubuntu18-shell
   stage: docker
   script:
     - echo "* building $CI_JOB_NAME.git"
     - git clone git@baltig.infn.it:chaos-lnf-control/$CI_JOB_NAME.git 
     - cd  $CI_JOB_NAME
     - git checkout $CI_COMMIT_REF_NAME
Andrea Michelotti's avatar
Andrea Michelotti committed
     - if [ $CI_COMMIT_REF_NAME == "experimental" ];then docker build --no-cache -t baltig.infn.it:4567/chaos-lnf-control/$CI_JOB_NAME:latest .;docker push baltig.infn.it:4567/chaos-lnf-control/$CI_JOB_NAME:latest;fi
     - docker build --no-cache -t baltig.infn.it:4567/chaos-lnf-control/$CI_JOB_NAME:$CI_COMMIT_REF_NAME .
     - docker push baltig.infn.it:4567/chaos-lnf-control/$CI_JOB_NAME:$CI_COMMIT_REF_NAME

chaosroot-docker:
   tags:
     - ubuntu18-shell
   stage: docker
   script:
     - echo "* building $CI_JOB_NAME.git"
     - git clone git@baltig.infn.it:chaos-lnf-control/$CI_JOB_NAME.git 
     - cd  $CI_JOB_NAME
     - git checkout $CI_COMMIT_REF_NAME
Andrea Michelotti's avatar
Andrea Michelotti committed
     - if [ $CI_COMMIT_REF_NAME == "experimental" ];then docker build --no-cache -t baltig.infn.it:4567/chaos-lnf-control/$CI_JOB_NAME:latest .;docker push baltig.infn.it:4567/chaos-lnf-control/$CI_JOB_NAME:latest;fi
     - docker build --no-cache -t baltig.infn.it:4567/chaos-lnf-control/$CI_JOB_NAME:$CI_COMMIT_REF_NAME .
     - docker push baltig.infn.it:4567/chaos-lnf-control/$CI_JOB_NAME:$CI_COMMIT_REF_NAME
Andrea Michelotti's avatar
Andrea Michelotti committed
pages:
Andrea Michelotti's avatar
Andrea Michelotti committed
  stage: publish
Andrea Michelotti's avatar
Andrea Michelotti committed
  services:
  - name: couchbase/server:community-3.1.3
    alias: couchbase
  - name: baltig.infn.it:4567/chaos-lnf-control/chaos_bundle_compilation/mongo:3.4
    alias: mongo

  image: baltig.infn.it:4567/chaos-lnf-control/chaos_bundle_compilation:1604
Andrea Michelotti's avatar
Andrea Michelotti committed
  script:
Andrea Michelotti's avatar
Andrea Michelotti committed
    - export INSTALL_DIR=$PWD/chaos-distrib
Andrea Michelotti's avatar
Andrea Michelotti committed
    - mkdir -p $INSTALL_DIR
    - repo init -q --no-clone-bundle -u git@baltig.infn.it:chaos-lnf-control/chaos_repo_bundle.git -b $CI_COMMIT_REF_NAME
    - repo sync
    - ./tools/dbinit.sh couchbase mongo
Andrea Michelotti's avatar
Andrea Michelotti committed
    - cd chaosframework;export CHAOS_LIB_HASH=`git log -n 1 --pretty="%h"`;cd -;
Andrea Michelotti's avatar
Andrea Michelotti committed
    - cmake -DCHAOS_ARCHITECTURE_TEST=ON -DCHAOS_VERSION_MAJOR="$CI_COMMIT_REF_NAME.$CHAOS_LIB_HASH" -DCHAOS_VERSION_MINOR="$CI_JOB_STAGE.$CI_COMMIT_SHA" -DCHAOS_WAN=ON -DCHAOS_CCS=ON -DCHAOS_BUILD_ID=${CI_PIPELINE_ID}  -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR -DCMAKE_BUILD_TYPE=PROFILE . |& tee $DISTRIB_PREFIX/bundle.configuration.log
Andrea Michelotti's avatar
Andrea Michelotti committed
    - make  -j 4 install
    - source $INSTALL_DIR/chaos_env.sh
    - $INSTALL_DIR/bin/TestFramework
    - $INSTALL_DIR/tools/chaos_test.sh -d $INSTALL_DIR/tools/test
Andrea Michelotti's avatar
Andrea Michelotti committed
    - lcov -c -d . -o coverage.info
Andrea Michelotti's avatar
Andrea Michelotti committed
    - genhtml coverage.info --output-directory public
Andrea Michelotti's avatar
Andrea Michelotti committed
    - ls -la
Andrea Michelotti's avatar
Andrea Michelotti committed
  allow_failure: true
Andrea Michelotti's avatar
Andrea Michelotti committed
  artifacts:
    paths:
Andrea Michelotti's avatar
Andrea Michelotti committed
    - 'public'
Andrea Michelotti's avatar
Andrea Michelotti committed
    expire_in: 7 day
  coverage: '/^TOTAL.*\s+(\d+\%)$/'