diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b0278e2c63a02b6291c05cf45576a3169837331d..5012ed5f630014e39c36e4253325e6892e7f3da1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -22,6 +22,8 @@ variables: CI_REGISTRY_IMAGE: $CI_REGISTRY/caosdb/src/caosdb-cpplib/testenv:latest + CPP_INT_TEST_REPO: https://gitlab.indiscale.com/api/v4/projects/111/trigger/pipeline + INT_TEST_REPO: $CPP_INT_TEST_REPO GIT_SUBMODULE_STRATEGY: normal image: $CI_REGISTRY_IMAGE @@ -66,6 +68,26 @@ test: - cmake --build . - cmake --build . --target unit_test_coverage +# trigger the integration tests +trigger_inttest: + tags: [ docker ] + stage: deploy + dependencies: + - setup + script: + - CPPINT_REF=main + - TRIGGERED_BY_REPO=${TRIGGERED_BY_REPO:-CPPLIB} + - TRIGGERED_BY_REF=${TRIGGERED_BY_REF:-$CI_COMMIT_REF_NAME} + - TRIGGERED_BY_HASH=${TRIGGERED_BY_HASH:-$CI_COMMIT_SHORT_SHA} + + - /usr/bin/curl -w "%{stderr}HTTPCODE=%{http_code}" -X POST + -F token=$CI_JOB_TOKEN + -F "variables[TRIGGERED_BY_REPO]=$TRIGGERED_BY_REPO" + -F "variables[TRIGGERED_BY_REF]=$TRIGGERED_BY_REF" + -F "variables[TRIGGERED_BY_HASH]=$TRIGGERED_BY_HASH" + -F ref=${CPPINT_REF} $INT_TEST_REPO 2>HTTPCODE + - grep -c "HTTPCODE=2" HTTPCODE + # Build the sphinx documentation and make it ready for deployment by Gitlab Pages # Special job for serving a static website. See https://docs.gitlab.com/ee/ci/yaml/README.html#pages pages_prepare: &pages_prepare