stages: - build-image - koji - build - test - publish before_script: - export GTEST_COLOR="1" c8: stage: build image: gitlab-registry.cern.ch/eos/quarkdb/build-image-c8 script: - packaging/gitlab-build.sh - mkdir ${CI_JOB_NAME} - cp -r /root/rpmbuild/RPMS build/SRPMS ${CI_JOB_NAME} artifacts: paths: - "$CI_JOB_NAME" cc7: stage: build image: gitlab-registry.cern.ch/eos/quarkdb/build-image-cc7 script: - packaging/gitlab-build.sh - mkdir ${CI_JOB_NAME} - cp -r /root/rpmbuild/RPMS build/SRPMS ${CI_JOB_NAME} artifacts: paths: - "$CI_JOB_NAME" fedora: stage: build image: gitlab-registry.cern.ch/eos/quarkdb/build-image-fedora script: - packaging/gitlab-build.sh - mkdir ${CI_JOB_NAME} - cp -r /root/rpmbuild/RPMS build/SRPMS ${CI_JOB_NAME} artifacts: paths: - "$CI_JOB_NAME" fedora-tsan: stage: build image: gitlab-registry.cern.ch/eos/quarkdb/build-image-fedora script: - CXXFLAGS='-fsanitize=thread' packaging/gitlab-build.sh - mkdir ${CI_JOB_NAME} - cp -r /root/rpmbuild/RPMS build/SRPMS ${CI_JOB_NAME} artifacts: paths: - "$CI_JOB_NAME" ubuntu-asan: stage: test image: gitlab-registry.cern.ch/eos/quarkdb/build-image-ubuntu script: - ci/ubuntu/asan.sh artifacts: paths: - build/coverage-report # tags: # - docker-privileged cc7-test: stage: test image: gitlab-registry.cern.ch/eos/quarkdb/build-image-cc7 dependencies: - cc7 script: - yum -y localinstall cc7/RPMS/* - quarkdb-tests - quarkdb-stress-tests c8-test: stage: test image: gitlab-registry.cern.ch/eos/quarkdb/build-image-c8 dependencies: - c8 script: - yum -y localinstall c8/RPMS/* - quarkdb-tests - quarkdb-stress-tests fedora-test: stage: test image: gitlab-registry.cern.ch/eos/quarkdb/build-image-fedora dependencies: - fedora script: - dnf -y install fedora/RPMS/* - quarkdb-tests - quarkdb-stress-tests fedora-tsan-test: stage: test image: gitlab-registry.cern.ch/eos/quarkdb/build-image-fedora dependencies: - fedora-tsan script: - dnf -y install fedora-tsan/RPMS/* - export QDB_TEST_TIMEOUT="default" - quarkdb-tests - export GTEST_TOTAL_SHARDS=100 - MAX_SHARD=$((GTEST_TOTAL_SHARDS - 1)) - for i in $(seq 0 ${MAX_SHARD}); do export GTEST_SHARD_INDEX=$i; quarkdb-stress-tests; done rpms: stage: publish image: gitlab-registry.cern.ch/eos/gitlab-eos/cc7:latest dependencies: - cc7 - c8 - fedora script: - yum install -y createrepo - automount - cat "$STCI_PASSWORD" | kinit stci - eosfusebind - for platform in cc7 c8 fedora; do packaging/repo-manager.py --action add --base /eos/project/s/storage-ci/www/quarkdb --ref ${CI_COMMIT_REF_NAME} --packages ${platform}/RPMS/* ${platform}/SRPMS/* ; done tags: - docker-privileged retry: 2 only: - branches@eos/quarkdb - tags@eos/quarkdb docs: stage: publish image: gitlab-registry.cern.ch/eos/gitlab-eos/cc7:latest script: - automount - cat "$STCI_PASSWORD" | kinit stci - eosfusebind - yum install -y npm git - npm install -g gitbook-cli - npm install gitbook - gitbook build - SNAPSHOT=$(date +%s) - TARGET="/eos/project/q/quarkdb/www/docs/${CI_COMMIT_REF_NAME}" - STAGING_AREA="$TARGET-${SNAPSHOT}" - cp -r _book "$STAGING_AREA" - packaging/replace-directory.sh "$STAGING_AREA" "$TARGET" tags: - docker-privileged retry: 2 only: - branches@eos/quarkdb - tags@eos/quarkdb coverage: stage: publish image: gitlab-registry.cern.ch/eos/gitlab-eos/cc7:latest dependencies: - ubuntu-asan script: - automount - cat "$STCI_PASSWORD" | kinit stci - eosfusebind - SNAPSHOT=$(date +%s) - TARGET="/eos/project/q/quarkdb/www/coverage/${CI_COMMIT_REF_NAME}" - STAGING_AREA="$TARGET-${SNAPSHOT}" - cp -r build/coverage-report "$STAGING_AREA" - packaging/replace-directory.sh "$STAGING_AREA" "$TARGET" tags: - docker-privileged retry: 2 only: - branches@eos/quarkdb - tags@eos/quarkdb cc7-koji-scratch: stage: koji image: gitlab-registry.cern.ch/linuxsupport/cc7-base script: - yum install -y koji - yum install -y git rpm-build python python3 - mkdir ~/.koji - cp ci/koji/config ~/.koji - echo "${QDBKOJI_PASSWORD}" | kinit qdbkoji - packaging/make-srpm.sh - koji build --scratch --wait quarkdb7 ./build/SRPMS/*.src.rpm when: manual cc7-koji: stage: koji image: gitlab-registry.cern.ch/linuxsupport/cc7-base script: - yum install -y koji - yum install -y git rpm-build python python3 - mkdir ~/.koji - cp ci/koji/config ~/.koji - echo "${QDBKOJI_PASSWORD}" | kinit qdbkoji - packaging/make-srpm.sh - koji build --wait quarkdb7 ./build/SRPMS/*.src.rpm - cd build/SRPMS - TAG_NAME=$(echo *.src.rpm | python -c "import sys; inp = sys.stdin.readlines()[0][0:-1]; print('.'.join(inp.split('.')[0:-2])); ") - koji tag-build quarkdb7-qa ${TAG_NAME} - koji tag-build quarkdb7-stable ${TAG_NAME} only: - tags@eos/quarkdb c8-image: stage: build-image variables: TO: gitlab-registry.cern.ch/eos/quarkdb/build-image-c8 DOCKER_FILE: ci/c8/Dockerfile NO_CACHE: 1 script: - "" tags: - docker-image-build only: variables: - $BUILD_IMAGES == "1" cc7-image: stage: build-image variables: TO: gitlab-registry.cern.ch/eos/quarkdb/build-image-cc7 DOCKER_FILE: ci/cc7/Dockerfile NO_CACHE: 1 script: - "" tags: - docker-image-build only: variables: - $BUILD_IMAGES == "1" fedora-image: stage: build-image variables: TO: gitlab-registry.cern.ch/eos/quarkdb/build-image-fedora DOCKER_FILE: ci/fedora/Dockerfile NO_CACHE: 1 script: - "" tags: - docker-image-build only: variables: - $BUILD_IMAGES == "1" ubuntu-image: stage: build-image variables: TO: gitlab-registry.cern.ch/eos/quarkdb/build-image-ubuntu DOCKER_FILE: ci/ubuntu/Dockerfile NO_CACHE: 1 script: - "" tags: - docker-image-build only: variables: - $BUILD_IMAGES == "1"