diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 67f7047a79ea3feac9e27d1a2689556771aa621b..1deced3a490e4b313b8b2176456931ec3e1357c1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -55,7 +55,7 @@ macosx_x86_64: - cd $PWD/chaos-osx10-distrib - source chaos_env.sh - ./tools/dbinit.sh localhost localhost;sleep 5;./tools/dbinit.sh localhost localhost - - ./tools/chaos_test.sh -k . + - ./tools/chaos_test.sh -k . - ./tools/chaos_services.sh stop - tar cfz chaos-osx10-distrib.tar.gz chaos-osx10-distrib allow_failure: true @@ -65,6 +65,10 @@ macosx_x86_64: - ./*.tar.gz expire_in: 1 day when: always + only: + variables: + - $BUILD_DISTRIBUTION == "macosx_x86_64" + - $BUILD_DISTRIBUTION == null build_i686_static_linux26: stage: build @@ -92,11 +96,14 @@ build_i686_static_linux26: - ./*.tar.gz expire_in: 2 day when: always - + only: + variables: + - $BUILD_DISTRIBUTION == "i686_static_linux26" + - $BUILD_DISTRIBUTION == null build_i686_dynamic_linux26: stage: build - retry: 2 + retry: 2 tags: - shared image: baltig.infn.it:4567/chaos-lnf-control/chaos_bundle_compilation:lite @@ -118,11 +125,14 @@ build_i686_dynamic_linux26: - ./*.tar.gz expire_in: 2 day when: always + only: + variables: + - $BUILD_DISTRIBUTION == "i686_dynamic_linux26" + - $BUILD_DISTRIBUTION == null - ubuntu1604_x86_64: stage: build - retry: 2 + retry: 2 tags: - shared image: baltig.infn.it:4567/chaos-lnf-control/chaos_bundle_compilation:1604 @@ -132,7 +142,7 @@ ubuntu1604_x86_64: - 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 -DCAEN2527=ON -DIDS=ON -DBASLER=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 + - 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 . @@ -146,10 +156,14 @@ ubuntu1604_x86_64: - ./*.tar.gz expire_in: 2 day when: always - + only: + variables: + - $BUILD_DISTRIBUTION == "ubuntu1604_x86_64" + - $BUILD_DISTRIBUTION == null + ubuntu1804_x86_64: stage: build - retry: 2 + retry: 2 tags: - shared image: baltig.infn.it:4567/chaos-lnf-control/chaos_bundle_compilation:1804 @@ -159,7 +173,7 @@ ubuntu1804_x86_64: - 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 -DBASLER=ON -DCAEN2527=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 + - 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 . @@ -173,11 +187,14 @@ ubuntu1804_x86_64: - ./*.tar.gz expire_in: 2 day when: always - + only: + variables: + - $BUILD_DISTRIBUTION == "ubuntu1804_x86_64" + - $BUILD_DISTRIBUTION == null ubuntu1804_profile_x86_64: stage: build - retry: 2 + retry: 2 tags: - shared image: baltig.infn.it:4567/chaos-lnf-control/chaos_bundle_compilation:1804 @@ -187,7 +204,7 @@ ubuntu1804_profile_x86_64: - 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 -DCAEN2527=ON -DBASLER=ON -DENABLE_MEMCACHE=ON -DCHAOS_CCS=ON -DCHAOS_BUILD_ID=${CI_PIPELINE_ID} -DCERN_ROOT=$INSTALL_DIR -DCMAKE_BUILD_TYPE=PROFILE -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 + - 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_BUILD_TYPE=PROFILE -DCMAKE_MODULE_PATH=$INSTALL_DIR -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR . @@ -203,11 +220,14 @@ ubuntu1804_profile_x86_64: - ./*.tar.gz expire_in: 2 day when: always - + only: + variables: + - $BUILD_DISTRIBUTION == "ubuntu1804_profile_x86_64" + - $BUILD_DISTRIBUTION == null centos7_x86_64: stage: build - retry: 2 + retry: 2 tags: - shared image: baltig.infn.it:4567/chaos-lnf-control/chaos_bundle_compilation:centos7 @@ -231,7 +251,10 @@ centos7_x86_64: - ./*.tar.gz expire_in: 2 day when: always - + only: + variables: + - $BUILD_DISTRIBUTION == "centos7_x86_64" + - $BUILD_DISTRIBUTION == null # ubuntu1604_legacy_x86_64: # stage: build # image: baltig.infn.it:4567/chaos-lnf-control/chaos_bundle_compilation:1604 @@ -255,7 +278,7 @@ centos7_x86_64: ubuntu1404_x86_64: stage: build - retry: 2 + retry: 2 tags: - shared image: baltig.infn.it:4567/chaos-lnf-control/chaos_bundle_compilation:1404 @@ -276,7 +299,7 @@ ubuntu1404_x86_64: - 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 + - scripts/strip_symbols.sh $INSTALL_DIR - tar cfz $DISTRIB_NAME.tar.gz -C /usr/local/chaos chaos-distrib artifacts: name: "$DISTRIB_NAME.tar.gz" @@ -284,14 +307,18 @@ ubuntu1404_x86_64: - ./*.tar.gz expire_in: 1 day when: always + only: + variables: + - $BUILD_DISTRIBUTION == "ubuntu1404_x86_64" + - $BUILD_DISTRIBUTION == null build_arm_linux26: stage: build - retry: 2 + retry: 2 tags: - shared image: baltig.infn.it:4567/chaos-lnf-control/chaos_bundle_compilation:lite - + script: - export PATH=/usr/local/chaos/i686-nptl-linux-gnu/bin/:$PATH - export DISTRIB_NAME=chaos-distrib-$CI_COMMIT_REF_NAME-$CI_JOB_NAME @@ -312,9 +339,12 @@ build_arm_linux26: - ./*.tar.gz expire_in: 2 day when: always + only: + variables: + - $BUILD_DISTRIBUTION == "build_arm_linux26" + - $BUILD_DISTRIBUTION == null - # test_arm_linux26: # stage: test # dependencies: @@ -337,13 +367,13 @@ build_arm_linux26: # 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 +# - 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" - - + + # test_i686_dynamic_linux26: # dependencies: # - build_i686_dynamic_linux26 @@ -361,7 +391,7 @@ build_arm_linux26: # - 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 dependencies: @@ -392,6 +422,10 @@ ubuntu1604_test_x86_64: - ./*-log*.tar.gz expire_in: 3 day when: always + only: + variables: + - $BUILD_DISTRIBUTION == "ubuntu1604_x86_64" + - $BUILD_DISTRIBUTION == null ubuntu1804_test_x86_64: stage: test @@ -424,6 +458,10 @@ ubuntu1804_test_x86_64: - ./*-log*.tar.gz expire_in: 3 day when: always + only: + variables: + - $BUILD_DISTRIBUTION == "ubuntu1804_x86_64" + - $BUILD_DISTRIBUTION == null ubuntu1804_test_profile_x86_64: stage: test @@ -451,14 +489,17 @@ ubuntu1804_test_profile_x86_64: - mkdir -p $INSTALL_DIR/log/html - gcovr -r . --html --html-details -o $INSTALL_DIR/log/html/coverage.html -v > $INSTALL_DIR/log/gcovr.log - tar cfz $DISTRIB_NAME-profile-log-ok.tar.gz -C /usr/local/chaos/chaos-distrib log - allow_failure: true + allow_failure: true artifacts: name: "log.tar.gz" paths: - ./*-log*.tar.gz expire_in: 3 day when: always - + only: + variables: + - $BUILD_DISTRIBUTION == "ubuntu1804_profile_x86_64" + - $BUILD_DISTRIBUTION == null centos7_test_x86_64: @@ -491,6 +532,10 @@ centos7_test_x86_64: - ./*-log*.tar.gz expire_in: 3 day when: always + only: + variables: + - $BUILD_DISTRIBUTION == "centos7_test_x86_64" + - $BUILD_DISTRIBUTION == null ubuntu1404_test_x86_64: stage: test @@ -526,7 +571,10 @@ ubuntu1404_test_x86_64: - ./*-log*.tar.gz expire_in: 3 day when: always - + only: + variables: + - $BUILD_DISTRIBUTION == "ubuntu1404_test_x86_64" + - $BUILD_DISTRIBUTION == null deploy_stage: tags: @@ -538,18 +586,18 @@ deploy_stage: - centos7_x86_64 - build_i686_dynamic_linux26 - build_arm_linux26 - - build_i686_static_linux26 + - build_i686_static_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_NAME_POSTFIX.tar.gz - - ssh chaosweb@opensource.lnf.infn.it "ln -sf /var/www/html/binary/chaos/$CI_COMMIT_REF_NAME/$ARCH/ubuntu/16.04/chaos-distrib.$TAR_NAME_POSTFIX.tar.gz /var/www/html/binary/chaos/$CI_COMMIT_REF_NAME/$ARCH/ubuntu/16.04/latest.tar.gz" + - ssh chaosweb@opensource.lnf.infn.it "ln -sf /var/www/html/binary/chaos/$CI_COMMIT_REF_NAME/$ARCH/ubuntu/16.04/chaos-distrib.$TAR_NAME_POSTFIX.tar.gz /var/www/html/binary/chaos/$CI_COMMIT_REF_NAME/$ARCH/ubuntu/16.04/latest.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_NAME_POSTFIX.tar.gz - ssh chaosweb@opensource.lnf.infn.it "ln -sf /var/www/html/binary/chaos/$CI_COMMIT_REF_NAME/$ARCH/ubuntu/18.04/chaos-distrib.$TAR_NAME_POSTFIX.tar.gz /var/www/html/binary/chaos/$CI_COMMIT_REF_NAME/$ARCH/ubuntu/18.04/latest.tar.gz" - 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_NAME_POSTFIX.tar.gz - - ssh chaosweb@opensource.lnf.infn.it "ln -sf /var/www/html/binary/chaos/$CI_COMMIT_REF_NAME/$ARCH/centos/7/chaos-distrib.$TAR_NAME_POSTFIX.tar.gz /var/www/html/binary/chaos/$CI_COMMIT_REF_NAME/$ARCH/centos/7/latest.tar.gz" + - ssh chaosweb@opensource.lnf.infn.it "ln -sf /var/www/html/binary/chaos/$CI_COMMIT_REF_NAME/$ARCH/centos/7/chaos-distrib.$TAR_NAME_POSTFIX.tar.gz /var/www/html/binary/chaos/$CI_COMMIT_REF_NAME/$ARCH/centos/7/latest.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_NAME_POSTFIX.tar.gz - ssh chaosweb@opensource.lnf.infn.it "ln -sf /var/www/html/binary/chaos/$CI_COMMIT_REF_NAME/$ARCH/ubuntu/14.04/chaos-distrib.$TAR_NAME_POSTFIX.tar.gz /var/www/html/binary/chaos/$CI_COMMIT_REF_NAME/$ARCH/ubuntu/14.04/latest.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 @@ -559,7 +607,9 @@ deploy_stage: - 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 - curl -X POST -F token="81913e63e951cc80ebf0095440d432" -F "ref=experimental" -F "variables[DEPLOY_DESTINATION]=$CI_COMMIT_REF_NAME" https://baltig.infn.it/api/v4/projects/1443/trigger/pipeline allow_failure: true - + only: + variables: + - $BUILD_DISTRIBUTION == null pages: stage: publish @@ -568,7 +618,7 @@ pages: - ubuntu1604_test_x86_64 - centos7_test_x86_64 - ubuntu1804_test_x86_64 - - ubuntu1804_test_profile_x86_64 + - ubuntu1804_test_profile_x86_64 image: baltig.infn.it:4567/chaos-lnf-control/chaos_bundle_compilation:lite script: - mkdir -p perf/ubuntu1404 perf/ubuntu1604 perf/centos7 perf/ubuntu1804 perf/ubuntu1804-profile public @@ -576,7 +626,7 @@ pages: - if [ -e chaos-distrib-$CI_COMMIT_REF_NAME-ubuntu-14.04-x86_64-log-ok.tar.gz ];then tar xfvz chaos-distrib-$CI_COMMIT_REF_NAME-ubuntu-14.04-x86_64-log-ok.tar.gz -C perf/ubuntu1404;mv perf/ubuntu1404/log/*.png perf/ubuntu1404;mv perf/ubuntu1404/log/html/* perf/ubuntu1404;rm -rf perf/ubuntu1404/log;fi - if [ -e chaos-distrib-$CI_COMMIT_REF_NAME-ubuntu-16.04-x86_64-log-ok.tar.gz ]; then tar xfvz chaos-distrib-$CI_COMMIT_REF_NAME-ubuntu-16.04-x86_64-log-ok.tar.gz -C perf/ubuntu1604;mv perf/ubuntu1604/log/*.png perf/ubuntu1604;mv perf/ubuntu1604/log/html/* perf/ubuntu1604;rm -rf perf/ubuntu1604/log;fi - if [ -e chaos-distrib-$CI_COMMIT_REF_NAME-ubuntu-18.04-x86_64-log-ok.tar.gz ]; then tar xfvz chaos-distrib-$CI_COMMIT_REF_NAME-ubuntu-18.04-x86_64-log-ok.tar.gz -C perf/ubuntu1804;mv perf/ubuntu1804/log/*.png perf/ubuntu1804;mv perf/ubuntu1804/log/html/* perf/ubuntu1804;rm -rf perf/ubuntu1804/log;fi - - if [ -e chaos-distrib-$CI_COMMIT_REF_NAME-ubuntu-18.04-profile-x86_64-log-ok.tar.gz ]; then tar xfvz chaos-distrib-$CI_COMMIT_REF_NAME-ubuntu-18.04-x86_64-profile-log-ok.tar.gz -C perf/ubuntu1804-profile;mv perf/ubuntu1804-profile/log/*.png perf/ubuntu1804-profile;mv perf/ubuntu1804-profile/log/html/* perf/ubuntu1804-profile;rm -rf perf/ubuntu1804-profile/log;fi + - if [ -e chaos-distrib-$CI_COMMIT_REF_NAME-ubuntu-18.04-profile-x86_64-log-ok.tar.gz ]; then tar xfvz chaos-distrib-$CI_COMMIT_REF_NAME-ubuntu-18.04-x86_64-profile-log-ok.tar.gz -C perf/ubuntu1804-profile;mv perf/ubuntu1804-profile/log/*.png perf/ubuntu1804-profile;mv perf/ubuntu1804-profile/log/html/* perf/ubuntu1804-profile;rm -rf perf/ubuntu1804-profile/log;fi - if [ -e chaos-distrib-$CI_COMMIT_REF_NAME-centos-7-x86_64-log-ok.tar.gz ]; then tar xfvz chaos-distrib-$CI_COMMIT_REF_NAME-centos-7-x86_64-log-ok.tar.gz -C perf/centos7;mv perf/centos7/log/*.png perf/centos7/;mv perf/centos7/log/html/* perf/centos7/;rm -rf perf/centos7/log;fi - mv perf public - git clone git@baltig.infn.it:chaos-lnf-control/chaos_bundle_tools.git -b $CI_COMMIT_REF_NAME @@ -586,5 +636,6 @@ pages: paths: - 'public' expire_in: 60 day - - + only: + variables: + - $BUILD_DISTRIBUTION == null