diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 700dcd787130084683091a25e399a8640b899967..7983041e601acd82a2a6d7d6aa1152b613930a07 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -117,88 +117,88 @@ build_MCU_MAC: # UNIT TEST STAGE # -#unit_test_TMSS: -# stage: unit_test -# image: ci_sas:$CI_COMMIT_SHORT_SHA -# script: -# - PACKAGE=TMSS -# - echo "Testing $PACKAGE..." -# - cd build/gnucxx11_opt -# - SKIP_INTEGRATION_TESTS=true ctest -# dependencies: -# - build_TMSS -# artifacts: -# name: unit-test-report -# when: always -# paths: -# - build/gnucxx11_opt/Testing/Temporary/LastTest.log -# -#unit_test_RAServices: -# stage: unit_test -# image: ci_sas:$CI_COMMIT_SHORT_SHA -# script: -# - PACKAGE=RAServices -# - echo "Testing $PACKAGE..." -# - cd build/gnucxx11_opt -# - SKIP_INTEGRATION_TESTS=true ctest -# services: -# - rabbitmq:latest -# variables: -# RABBITMQ_DEFAULT_USER: guest -# RABBITMQ_DEFAULT_PASS: guest -# LOFAR_DEFAULT_BROKER: 'rabbitmq' # override default 'localhost' which does not work for CI service rabbitmq. -# dependencies: -# - build_RAServices -# artifacts: -# name: unit-test-report -# when: always -# paths: -# - build/gnucxx11_opt/Testing/Temporary/LastTest.log -# -#unit_test_LTAIngest: -# stage: unit_test -# image: ci_lta:$CI_COMMIT_SHORT_SHA -# script: -# - PACKAGE=LTAIngest -# - echo "Testing $PACKAGE..." -# - cd build/gnucxx11_opt -# - SKIP_INTEGRATION_TESTS=true ctest -# services: -# - rabbitmq:latest -# variables: -# RABBITMQ_DEFAULT_USER: guest -# RABBITMQ_DEFAULT_PASS: guest -# LOFAR_DEFAULT_BROKER: 'rabbitmq' # override default 'localhost' which does not work for CI service rabbitmq. -# dependencies: -# - build_LTAIngest -# artifacts: -# name: unit-test-report -# when: always -# paths: -# - build/gnucxx11_opt/Testing/Temporary/LastTest.log -# -#unit_test_MCU_MAC: -# stage: unit_test -# image: ci_mac:$CI_COMMIT_SHORT_SHA -# script: -# - echo "Starting Qpid server..." && qpidd & -# - PACKAGE=MCU_MAC -# - echo "Testing $PACKAGE..." -# - cd build/gnucxx11_opt -# - SKIP_INTEGRATION_TESTS=true ctest -# services: -# - rabbitmq:latest -# variables: -# RABBITMQ_DEFAULT_USER: guest -# RABBITMQ_DEFAULT_PASS: guest -# LOFAR_DEFAULT_BROKER: 'rabbitmq' # override default 'localhost' which does not work for CI service rabbitmq. -# dependencies: -# - build_MCU_MAC -# artifacts: -# name: unit-test-report -# when: always -# paths: -# - build/gnucxx11_opt/Testing/Temporary/LastTest.log +unit_test_TMSS: + stage: unit_test + image: ci_sas:$CI_COMMIT_SHORT_SHA + script: + - PACKAGE=TMSS + - echo "Testing $PACKAGE..." + - cd build/gnucxx11_opt + - SKIP_INTEGRATION_TESTS=true ctest + dependencies: + - build_TMSS + artifacts: + name: unit-test-report + when: always + paths: + - build/gnucxx11_opt/Testing/Temporary/LastTest.log + +unit_test_RAServices: + stage: unit_test + image: ci_sas:$CI_COMMIT_SHORT_SHA + script: + - PACKAGE=RAServices + - echo "Testing $PACKAGE..." + - cd build/gnucxx11_opt + - SKIP_INTEGRATION_TESTS=true ctest + services: + - rabbitmq:latest + variables: + RABBITMQ_DEFAULT_USER: guest + RABBITMQ_DEFAULT_PASS: guest + LOFAR_DEFAULT_BROKER: 'rabbitmq' # override default 'localhost' which does not work for CI service rabbitmq. + dependencies: + - build_RAServices + artifacts: + name: unit-test-report + when: always + paths: + - build/gnucxx11_opt/Testing/Temporary/LastTest.log + +unit_test_LTAIngest: + stage: unit_test + image: ci_lta:$CI_COMMIT_SHORT_SHA + script: + - PACKAGE=LTAIngest + - echo "Testing $PACKAGE..." + - cd build/gnucxx11_opt + - SKIP_INTEGRATION_TESTS=true ctest + services: + - rabbitmq:latest + variables: + RABBITMQ_DEFAULT_USER: guest + RABBITMQ_DEFAULT_PASS: guest + LOFAR_DEFAULT_BROKER: 'rabbitmq' # override default 'localhost' which does not work for CI service rabbitmq. + dependencies: + - build_LTAIngest + artifacts: + name: unit-test-report + when: always + paths: + - build/gnucxx11_opt/Testing/Temporary/LastTest.log + +unit_test_MCU_MAC: + stage: unit_test + image: ci_mac:$CI_COMMIT_SHORT_SHA + script: + - echo "Starting Qpid server..." && qpidd & + - PACKAGE=MCU_MAC + - echo "Testing $PACKAGE..." + - cd build/gnucxx11_opt + - SKIP_INTEGRATION_TESTS=true ctest + services: + - rabbitmq:latest + variables: + RABBITMQ_DEFAULT_USER: guest + RABBITMQ_DEFAULT_PASS: guest + LOFAR_DEFAULT_BROKER: 'rabbitmq' # override default 'localhost' which does not work for CI service rabbitmq. + dependencies: + - build_MCU_MAC + artifacts: + name: unit-test-report + when: always + paths: + - build/gnucxx11_opt/Testing/Temporary/LastTest.log # allow_failure: true # allow failure for now, so MAC_MCU failure does not block this pipeline and we can deploy TMSS. TODO: fix docker_mac environment and services so the tests pass. # @@ -222,79 +222,79 @@ dockerize_TMSS: - docker logout $CI_NEXUS_REGISTRY dependencies: - build_TMSS -# - unit_test_TMSS -# - integration_test_TMSS + - unit_test_TMSS + - integration_test_TMSS # # INTEGRATION TEST STAGE # -#integration_test_TMSS: -# stage: integration_test -# image: ci_sas:$CI_COMMIT_SHORT_SHA -# script: -# - PACKAGE=TMSS -# - echo "Integration Testing $PACKAGE..." -# - cd build/gnucxx11_opt -# - SKIP_INTEGRATION_TESTS=false SKIP_UNIT_TESTS=true ctest -# services: -# - rabbitmq:latest -# variables: -# RABBITMQ_DEFAULT_USER: guest -# RABBITMQ_DEFAULT_PASS: guest -# LOFAR_DEFAULT_BROKER: 'rabbitmq' # override default 'localhost' which does not work for CI service rabbitmq. -# dependencies: -# - build_TMSS -# artifacts: -# name: integration-test-report -# when: always -# paths: -# - build/gnucxx11_opt/Testing/Temporary/LastTest.log -# -#integration_test_RAServices: -# stage: integration_test -# image: ci_sas:$CI_COMMIT_SHORT_SHA -# services: -# - rabbitmq:latest -# variables: -# RABBITMQ_DEFAULT_USER: guest -# RABBITMQ_DEFAULT_PASS: guest -# LOFAR_DEFAULT_BROKER: 'rabbitmq' # override default 'localhost' which does not work for CI service rabbitmq. -# script: -# - PACKAGE=RAServices -# - echo "Integration Testing $PACKAGE..." -# - cd build/gnucxx11_opt -# - SKIP_INTEGRATION_TESTS=false SKIP_UNIT_TESTS=true ctest -# dependencies: -# - build_RAServices -# artifacts: -# name: integration-test-report -# when: always -# paths: -# - build/gnucxx11_opt/Testing/Temporary/LastTest.log -# -#integration_test_LTAIngest: -# stage: integration_test -# image: ci_lta:$CI_COMMIT_SHORT_SHA -# script: -# - PACKAGE=LTAIngest -# - echo "Integration Testing $PACKAGE..." -# - cd build/gnucxx11_opt -# - SKIP_INTEGRATION_TESTS=false SKIP_UNIT_TESTS=true ctest -# services: -# - rabbitmq:latest -# variables: -# RABBITMQ_DEFAULT_USER: guest -# RABBITMQ_DEFAULT_PASS: guest -# LOFAR_DEFAULT_BROKER: 'rabbitmq' # override default 'localhost' which does not work for CI service rabbitmq. -# dependencies: -# - build_LTAIngest -# artifacts: -# name: integration-test-report -# when: always -# paths: -# - build/gnucxx11_opt/Testing/Temporary/LastTest.log +integration_test_TMSS: + stage: integration_test + image: ci_sas:$CI_COMMIT_SHORT_SHA + script: + - PACKAGE=TMSS + - echo "Integration Testing $PACKAGE..." + - cd build/gnucxx11_opt + - SKIP_INTEGRATION_TESTS=false SKIP_UNIT_TESTS=true ctest + services: + - rabbitmq:latest + variables: + RABBITMQ_DEFAULT_USER: guest + RABBITMQ_DEFAULT_PASS: guest + LOFAR_DEFAULT_BROKER: 'rabbitmq' # override default 'localhost' which does not work for CI service rabbitmq. + dependencies: + - build_TMSS + artifacts: + name: integration-test-report + when: always + paths: + - build/gnucxx11_opt/Testing/Temporary/LastTest.log + +integration_test_RAServices: + stage: integration_test + image: ci_sas:$CI_COMMIT_SHORT_SHA + services: + - rabbitmq:latest + variables: + RABBITMQ_DEFAULT_USER: guest + RABBITMQ_DEFAULT_PASS: guest + LOFAR_DEFAULT_BROKER: 'rabbitmq' # override default 'localhost' which does not work for CI service rabbitmq. + script: + - PACKAGE=RAServices + - echo "Integration Testing $PACKAGE..." + - cd build/gnucxx11_opt + - SKIP_INTEGRATION_TESTS=false SKIP_UNIT_TESTS=true ctest + dependencies: + - build_RAServices + artifacts: + name: integration-test-report + when: always + paths: + - build/gnucxx11_opt/Testing/Temporary/LastTest.log + +integration_test_LTAIngest: + stage: integration_test + image: ci_lta:$CI_COMMIT_SHORT_SHA + script: + - PACKAGE=LTAIngest + - echo "Integration Testing $PACKAGE..." + - cd build/gnucxx11_opt + - SKIP_INTEGRATION_TESTS=false SKIP_UNIT_TESTS=true ctest + services: + - rabbitmq:latest + variables: + RABBITMQ_DEFAULT_USER: guest + RABBITMQ_DEFAULT_PASS: guest + LOFAR_DEFAULT_BROKER: 'rabbitmq' # override default 'localhost' which does not work for CI service rabbitmq. + dependencies: + - build_LTAIngest + artifacts: + name: integration-test-report + when: always + paths: + - build/gnucxx11_opt/Testing/Temporary/LastTest.log # @@ -320,8 +320,8 @@ deploy-tmss-test: - ssh lofarsys@scu199.control.lofar "docker tag ${CI_NEXUS_REGISTRY}/tmss_testprovider:$CI_COMMIT_SHORT_SHA ${CI_NEXUS_REGISTRY}/tmss_testprovider:latest" - ssh lofarsys@scu199.control.lofar "docker tag ${CI_NEXUS_REGISTRY}/tmss_django:$CI_COMMIT_SHORT_SHA ${CI_NEXUS_REGISTRY}/tmss_django:latest" - ssh lofarsys@scu199.control.lofar "docker-compose -f docker-compose-scu199.yml up -d" -# dependencies: -# - integration_test_TMSS + dependencies: + - integration_test_TMSS when: manual deploy-tmss-ua: @@ -343,8 +343,8 @@ deploy-tmss-ua: - ssh lofarsys@tmss-ua.control.lofar "docker tag ${CI_NEXUS_REGISTRY}/tmss_testprovider:$CI_COMMIT_SHORT_SHA ${CI_NEXUS_REGISTRY}/tmss_testprovider:latest" - ssh lofarsys@tmss-ua.control.lofar "docker tag ${CI_NEXUS_REGISTRY}/tmss_django:$CI_COMMIT_SHORT_SHA ${CI_NEXUS_REGISTRY}/tmss_django:latest" - ssh lofarsys@tmss-ua.control.lofar "docker-compose -f docker-compose-ua.yml up -d" -# dependencies: -# - integration_test_TMSS + dependencies: + - integration_test_TMSS when: manual only: - "master" @@ -361,6 +361,6 @@ deploy-MCU_MAC-test: - chmod 644 ~/.ssh/known_hosts script: - ssh lofarsys@mcu199.control.lofar "MAC_install -b ${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHORT_SHA} -v ${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHORT_SHA}" -# dependencies: -# - unit_test_MCU_MAC + dependencies: + - unit_test_MCU_MAC when: manual \ No newline at end of file diff --git a/Docker/lofar-ci/Dockerfile_ci_base b/Docker/lofar-ci/Dockerfile_ci_base index 4cb0a2f0679c63ac011c8b3fcd1cd42a803073d5..1afd6427e70ff6bc4c5937f5986241e418751e0c 100644 --- a/Docker/lofar-ci/Dockerfile_ci_base +++ b/Docker/lofar-ci/Dockerfile_ci_base @@ -8,7 +8,7 @@ FROM centos:centos7.6.1810 RUN yum -y groupinstall 'Development Tools' && \ yum -y install epel-release && \ yum -y install cmake cmake3 gcc git log4cplus-devel python3 python3-devel python3-pip which wget curl atop valgrind && \ - pip3 install kombu requests coverage python-qpid-proton && \ + pip3 install kombu==4.6.8 requests coverage python-qpid-proton && \ adduser lofarsys && \ mkdir -p /opt/lofar && chown -R lofarsys:lofarsys /opt