-
Andrea Michelotti authoredAndrea Michelotti authored
.gitlab-ci.yml 55.10 KiB
stages:
- build
- deploy_nightly
- test
- deploy
- publish
before_script:
- export GNOW=$(date +"%Y%m%d")
- export NOW=$(date +"%Y%m%d-%H%M%S")
- export TAR_NAME_POSTFIX=$NOW
- export NIGHTLY_NAME=chaos_distrib-$CI_JOB_NAME-$GNOW.tar.gz
- export MERGE_COMMENT="non-regression-$NOW-$CI_COMMIT_REF_NAME-${CI_PIPELINE_ID}"
- export SYS=`uname -s`
- if [ "$SYS" == "Linux" ];then export NPROC=`nproc`;else export NPROC=4;fi
- if [ -z "$TEST_BRANCH" ]; then export TEST_BRANCH=$CI_COMMIT_REF_NAME;fi
- if [ -n "$SKIP_TEST" ];then REVNAME="UNTESTED"; else REVNAME=$(basename $TEST_BRANCH); fi
- echo "[$CI_RUNNER_DESCRIPTION] $SYS $CI_JOB_NAME Working directory:$PWD tag $CI_COMMIT_REF_NAME CPUS:$NPROC framework in branch $TEST_BRANCH"
- 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=$REVNAME-$ID-$VERSION_ID-$ARCH
- 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
- export CHAOS_INTERFACE=lo
- export CHAOS_LIVE_SERVERS=couchbase
- export CHAOS_LOG_SERVERS=influxdb:8086
- export CHAOS_DB_SERVERS=mongo
- export PATH=/usr/local/chaos/qt-56/bin:$PATH
- echo "Running on $ID $VERSION_ID $ARCH (distrib name '$DISTRIB_NAME')"
- git config --global user.email andrea.michelotti@lnf.infn.it
- git config --global user.name amichelo
- git config --global color.ui true
- rm -rf chaosframework
- mkdir -p $INSTALL_DIR
# macosx_x86_64:
# tags:
# - macosx
# stage: build
# services:
# - name: couchbase/server:community-5.0.1
# alias: couchbase
# - name: mongo:3.6
# alias: mongo
# script:
# - 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@baltig.infn.it:chaos-lnf-control/chaos_repo_bundle.git -b $CI_COMMIT_REF_NAME
# - mkdir chaos-osx10-distrib
# - ~/bin/repo sync
# - if [ "$TEST_BRANCH" != "$CI_COMMIT_REF_NAME" ]; then ./chaosframework/tools/chaos_git.sh -c $TEST_BRANCH;fi
# - ./tools/dbinit.sh localhost localhost;sleep 5;./tools/dbinit.sh localhost localhost;sleep 5
# - cd chaosframework;export CHAOS_LIB_HASH=`git log -n 1 --pretty="%h"`;export CHAOS_LAST_TAG=`git describe --abbrev=0`;cd -;
# - cd html/chaos_dashboard/;./tag.sh $CI_COMMIT_REF_NAME;cd -
# - cmake -DCHAOS_ARCHITECTURE_TEST=ON -DCHAOS_VME=OFF -DCHAOS_VERSION_MAJOR="$CI_COMMIT_REF_NAME.$CHAOS_LIB_HASH ($CHAOS_LAST_TAG)" -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;sleep 5;./tools/dbinit.sh localhost localhost
# - ./tools/chaos_test.sh -k .
# - ./tools/chaos_services.sh stop
# - tar cfz chaos-osx10-distrib.tar.gz chaos-osx10-distrib