diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3bd2056394171458b60b53e3b8dc7b31c9b7b126..300048c74c237ddbe9c457bdbddb27966be5e013 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,10 +1,10 @@ # -# ** header v3.0 # This file is a part of the CaosDB Project. # # Copyright (C) 2018 Research Group Biomedical Physics, # Max-Planck-Institute for Dynamics and Self-Organization Göttingen # Copyright (C) 2019 Henrik tom Wörden +# Copyright (C) 2021 Timm Fitschen <t.fitschen@indiscale.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -19,8 +19,6 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <https://www.gnu.org/licenses/>. # -# ** end header -# variables: DEPLOY_REF: f-grpc @@ -41,6 +39,9 @@ stages: - test - deploy +.env: &env + - F_BRANCH="${CI_COMMIT_REF_NAME}" + info: tags: [cached-dind] image: docker:20.10 @@ -50,7 +51,8 @@ info: - *env - echo "Pipeline triggered by $TRIGGERED_BY_REPO@$TRIGGERED_BY_REF ($TRIGGERED_BY_HASH)" - echo "Pipeline will trigger DEPLOY with branch $DEPLOY_REF" - - echo "F_BRANCH: $F_BRANCH" + - echo "F_BRANCH = $F_BRANCH" + # Setup: Build a docker image in which tests for this repository can run build-testenv: @@ -81,22 +83,7 @@ test: - mvn compile - mvn test -.env: &env - - F_BRANCH="${CI_COMMIT_REF_NAME}" - # TODO remove, this is grpc-special stuff - # server in f-grpc-dev branch matches with dev branch of cpplib/cppinttest - - if echo "$F_BRANCH" | grep -c "^f-grpc-dev$"; then - F_BRANCH=dev; - fi - # server in f-grpc-main branch matches with main branch of cpplib/cppinttest - - if echo "$F_BRANCH" | grep -c "^f-grpc-main$"; then - F_BRANCH=main; - fi - # server in f-grpc-f-something branch matches with f-something branch of cpplib/cppinttest - - if echo "$F_BRANCH" | grep -c "^f-grpc-f-.*$"; then - F_BRANCH=`echo "${F_BRANCH:7}"`; - fi # Deploy: Trigger building of server image and integration tests trigger_build: