Newer
Older
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"
- 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 "\" "`
- export REV_POSTFIX=$CI_COMMIT_REF_NAME-$ID-$VERSION_ID-$ARCH
- export DISTRIB_PREFIX=/usr/local/chaos/chaos-distrib
- export INSTALL_DIR=$DISTRIB_PREFIX
- export CHAOS_MDS=localhost:5000
- export CHAOS_LIVE_SERVERS=couchbase
- export CHAOS_DB_SERVERS=mongo
- echo "Running on $ID $VERSION_ID $ARCH (distrib name '$DISTRIB_NAME')"
- git config --global user.name amichelo
- git config --global color.ui true
- name: couchbase/server:community-3.1.3
- export CHAOS_LIVE_SERVERS=localhost
- export CHAOS_DB_SERVERS=localhost
- curl http://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
- chmod +x ~/bin/repo
- ~/bin/repo init -q --no-clone-bundle -u git@gitlab.com:chaos-lnf-control/chaos_repo_bundle.git -b $CI_COMMIT_REF_NAME
- cmake -DCHAOS_VME=OFF -DCHAOS_VERSION_MAJOR="$CI_COMMIT_REF_NAME" -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
# - cd $PWD/chaos-osx10-distrib
# - source chaos_env.sh
# - ./tools/chaos_test.sh .
# - ./tools/chaos_services.sh stop
- tar cfz chaos-osx10-distrib.tar.gz chaos-osx10-distrib
allow_failure: true
artifacts:
name: "chaos-osx10-distrib.tar.gz"
paths:

Andrea Michelotti
committed
- repo init -q --no-clone-bundle -u git@gitlab.com:chaos-lnf-control/chaos_repo_bundle.git -b $CI_COMMIT_REF_NAME
# - cmake -DCHAOS_WAN=ON -DCHAOS_CCS=ON -DCERN_ROOT=$INSTALL_DIR -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR -DCMAKE_BUILD_TYPE=PROFILE . |& tee $DISTRIB_PREFIX/bundle.configuration.log
- cmake -DCHAOS_VERSION_MAJOR="$CI_COMMIT_REF_NAME" -DCHAOS_VERSION_MINOR="$CI_JOB_STAGE.$CI_COMMIT_SHA" -DCHAOS_WAN=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
# - 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 ../../
- tar cfz $DISTRIB_NAME.tar.gz -C /usr/local/chaos chaos-distrib
# ubuntu1604_legacy_x86_64:
# stage: build
# image: michelo/chaos_bundle_compilation:1604
# script:
# - mkdir -p $INSTALL_DIR
# - repo init -q --no-clone-bundle -u git@gitlab.com: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
- repo init -q --no-clone-bundle -u git@gitlab.com:chaos-lnf-control/chaos_repo_bundle.git -b $CI_COMMIT_REF_NAME
- cmake -DCHAOS_VERSION_MAJOR="$CI_COMMIT_REF_NAME" -DCHAOS_VERSION_MINOR="$CI_JOB_STAGE.$CI_COMMIT_SHA" -DCHAOS_WAN=ON -DCHAOS_BUILD_ID=${CI_PIPELINE_ID} -DCHAOS_CCS=ON -DCERN_ROOT=$INSTALL_DIR -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR .
- 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 ../../
- tar cfz $DISTRIB_NAME.tar.gz -C /usr/local/chaos chaos-distrib
- 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
- repo init -q --no-clone-bundle -u git@gitlab.com:chaos-lnf-control/chaos_repo_bundle.git -b $CI_COMMIT_REF_NAME
- export PATH=/usr/local/chaos/gcc-arm-infn-linux26/bin/:$PATH
- cmake -DCHAOS_VME=OFF -DCHAOS_VERSION_MAJOR="$CI_COMMIT_REF_NAME" -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
- 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
expire_in: 1 day
- repo init -q --no-clone-bundle -u git@gitlab.com: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
- cmake -DCHAOS_VERSION_MAJOR="$CI_COMMIT_REF_NAME" -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_INSTALL_PREFIX=$INSTALL_DIR |& tee $INSTALL_DIR/bundle.configuration.log
- i686-nptl-linux-gnu-strip `find $INSTALL_DIR/bin/ -type f`
- i686-nptl-linux-gnu-strip `find $INSTALL_DIR/lib/ -name "*.a" -type f`
- tar cfz $DISTRIB_NAME.tar.gz -C $INSTALL_DIR/.. $DISTRIB_NAME
expire_in: 1 day
- 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@gitlab.com: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
- cmake . -DCHAOS_VERSION_MAJOR="$CI_COMMIT_REF_NAME" -DCHAOS_VERSION_MINOR="CI_JOB_STAGE.$CI_COMMIT_SHA" -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
- tar cfz $DISTRIB_NAME.tar.gz -C $INSTALL_DIR/.. $DISTRIB_NAME
expire_in: 1 day
- 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-16.04-x86_64.legacy.tar.gz chaosweb@opensource.lnf.infn.it:/var/www/html/binary/chaos/$CI_COMMIT_REF_NAME/$ARCH/ubuntu/16.04/chaos-distrib.legacy.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/
- scp chaos-distrib-$CI_COMMIT_REF_NAME-build_i686_static_linux26.tar.gz chaosweb@opensource.lnf.infn.it:/var/www/html/binary/chaos/$CI_COMMIT_REF_NAME/i686/
- 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/
- 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
- 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_libera.sh;fi
dependencies:
stage: test
services:
- name: couchbase/server:community-3.1.3
alias: couchbase
- tar xfz $DISTRIB_NAME.tar.gz -C /usr/local/chaos/
- repo init -q --no-clone-bundle -u git@gitlab.com:chaos-lnf-control/chaos_repo_bundle.git -b $CI_COMMIT_REF_NAME
- source $INSTALL_DIR/chaos_env.sh
- if ! $INSTALL_DIR/tools/chaos_test.sh -d $INSTALL_DIR/tools/test;then echo "* retrying test in debug mode";export CHAOS_DEBUG_CMD_TOOL="gdb";$INSTALL_DIR/tools/chaos_test.sh -d $INSTALL_DIR/tools/test;fi
- $INSTALL_DIR/tools/chaos_services.sh stop
- $INSTALL_DIR/tools/chaos_services.sh stop
- tar cfz $DISTRIB_NAME.tar.gz -C /usr/local/chaos chaos-distrib
artifacts:
when: always
name: "$DISTRIB_NAME.tar.gz"
paths:
- ./*.tar.gz
expire_in: 1 day
after_script:
- echo "* compatting files in $INSTALL_DIR"
- tar cfz test-log.$CI_JOB_NAME.$CI_RUNNER_DESCRIPTION.tar.gz -C /usr/local/chaos/chaos-distrib log
- if scp test-log.$CI_JOB_NAME.$CI_RUNNER_DESCRIPTION.tar.gz chaosweb@opensource.lnf.infn.it:/var/www/html/binary/chaos/logs;then echo "* [$CI_RUNNER_DESCRIPTION] log transferred ok";else echo "%% [$CI_RUNNER_DESCRIPTION] cannot copy";fi
ubuntu1404_test_x86_64:
stage: test
dependencies:
- ubuntu1404_x86_64
services:
- name: couchbase/server:community-3.1.3
alias: couchbase
- repo init -q --no-clone-bundle -u git@gitlab.com:chaos-lnf-control/chaos_repo_bundle.git -b $CI_COMMIT_REF_NAME
- source $INSTALL_DIR/chaos_env.sh
- if ! $INSTALL_DIR/tools/chaos_test.sh -d $INSTALL_DIR/tools/test;then echo "* retrying test in debug mode";export CHAOS_DEBUG_CMD_TOOL="gdb";$INSTALL_DIR/tools/chaos_test.sh -d $INSTALL_DIR/tools/test;fi
- $INSTALL_DIR/tools/chaos_services.sh stop
- $INSTALL_DIR/tools/chaos_services.sh stop
- tar cfz $DISTRIB_NAME.tar.gz -C /usr/local/chaos chaos-distrib
artifacts:
when: always
name: "$DISTRIB_NAME.tar.gz"
paths:
- ./*.tar.gz
expire_in: 1 day
after_script:
- echo "* compatting files in $INSTALL_DIR"
- tar cfz test-log.$CI_JOB_NAME.$CI_RUNNER_DESCRIPTION.tar.gz -C /usr/local/chaos/chaos-distrib log
- if scp test-log.$CI_JOB_NAME.$CI_RUNNER_DESCRIPTION.tar.gz chaosweb@opensource.lnf.infn.it:/var/www/html/binary/chaos/logs;then echo "* [$CI_RUNNER_DESCRIPTION] log transferred ok";else echo "%% [$CI_RUNNER_DESCRIPTION] cannot copy";fi
mds-docker:
tags:
- ubuntu16-shell
stage: docker
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
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
- if [ $CI_COMMIT_REF_NAME == "experimental" ];then docker build -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 -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:
- ubuntu16-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
- if [ $CI_COMMIT_REF_NAME == "experimental" ];then docker build -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 -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:
- ubuntu16-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
- if [ $CI_COMMIT_REF_NAME == "experimental" ];then docker build -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 -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:
- ubuntu16-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
- if [ $CI_COMMIT_REF_NAME == "experimental" ];then docker build -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 -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:
- ubuntu16-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
- if [ $CI_COMMIT_REF_NAME == "experimental" ];then docker build -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 -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