From 0f39a8cf70bb2bcdadf701640fa137fe1a6dcf98 Mon Sep 17 00:00:00 2001 From: Timm Fitschen <t.fitschen@indiscale.com> Date: Fri, 4 Jun 2021 17:15:46 +0200 Subject: [PATCH] WIP: pipeline --- .gitlab-ci.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b0278e2..5012ed5 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 -- GitLab