From 0dd2a84b196e454bc25630ef71bc2207b9ef86c1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Henrik=20tom=20W=C3=B6rden?= <h.tomwoerden@indiscale.com>
Date: Tue, 17 Oct 2023 20:53:52 +0200
Subject: [PATCH] revert pipeline stuff

---
 .gitlab-ci.yml | 91 ++------------------------------------------------
 1 file changed, 2 insertions(+), 89 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 67b90a62..d2abdcd6 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -33,92 +33,6 @@ stages:
   - integrationtest
   - deploy
 
-.env: &env
-  - PYLIB=${TMP_PYLIB:-$PYLIB}
-  - PYINT=${TMP_PYINT:-$PYINT}
-  - CPPINT=${TMP_CPPINT:-$CPPINT}
-  - CPPLIB=${TMP_CPPLIB:-$CPPLIB}
-  - SERVER=${TMP_SERVER:-$SERVER}
-  - WEBUI=${TMP_WEBUI:-$WEBUI}
-  - MYSQLBACKEND=${TMP_MYSQLBACKEND:-$MYSQLBACKEND}
-  - echo "F_BRANCH = $F_BRANCH"
-  - echo "SERVER = $SERVER"
-  - echo "MYSQLBACKEND = $MYSQLBACKEND"
-  - echo "CPPINT = $CPPINT"
-  - echo "CPPLIB = $CPPLIB"
-  - echo "PYINT = $PYINT"
-  - echo "PYLIB = $PYLIB"
-  - echo "ADVANCEDUSERTOOLS = $ADVANCEDUSERTOOLS"
-
-
-setup-env:
-  stage: setup
-  tags: [ cached-dind ]
-  needs: [ ]
-  image: python:3
-  script:
-    # Calculate the values first.
-    - *env
-    - pip install requests
-    - if [ "${CI_COMMIT_REF_NAME:0:8}" == release- ] ; then
-        echo "Release branch detected, setting default F_BRANCH to 'main'.";
-        F_BRANCH="${F_BRANCH:-main}";
-      fi
-    - F_BRANCH=${F_BRANCH:-$CI_COMMIT_REF_NAME}
-    - if [ "$F_BRANCH" == "main" ] && [ "$CI_COMMIT_REF_NAME" != "main" ] ; then
-        DEFAULT_BRANCH=main
-        F_BRANCH=;
-        REFTAG="${CI_COMMIT_REF_NAME}_F_main";
-      elif [ "$F_BRANCH" != "$CI_COMMIT_REF_NAME" ] && echo "$F_BRANCH" | grep -c "^f-" ; then
-        REFTAG="${CI_COMMIT_REF_NAME}_F_${F_BRANCH}";
-      elif echo "$CI_COMMIT_REF_NAME" | grep -c "^f-" ; then
-        F_BRANCH="${CI_COMMIT_REF_NAME}";
-        REFTAG="${CI_COMMIT_REF_NAME}";
-      else
-        F_BRANCH=;
-        REFTAG="${CI_COMMIT_REF_NAME}";
-      fi
-
-    - if [ "${CI_COMMIT_REF_NAME}" == "main" ]; then
-        DEFAULT_BRANCH=main;
-      fi
-    - DEFAULT_BRANCH=${DEFAULT_BRANCH:-dev}
-      # if this is main, default to other main branches.
-
-
-    - echo "DEFAULT_BRANCH = $DEFAULT_BRANCH"
-    - echo "CI_COMMIT_REF_NAME = $CI_COMMIT_REF_NAME"
-    - echo "REFTAG = $REFTAG"
-    - echo "F_BRANCH = $F_BRANCH"
-
-      # determine branch for caosdb-pylib (specific branch, f-branch or dev)
-    - echo "PYLIB REF = $PYLIB"
-    - if [ "$PYLIB" == "" ]  && [ "$F_BRANCH" != "" ] && ./utils/branch_exists.py PYLIB "$F_BRANCH" ; then
-        PYLIB="$F_BRANCH";
-      fi
-    - PYLIB=${PYLIB:-$DEFAULT_BRANCH}
-    - if [ "$PYLIB" != "$DEFAULT_BRANCH" ] && [ "$PYLIB" != "$F_BRANCH" ] ; then
-        REFTAG="${REFTAG}_P_${PYLIB}";
-      fi
-    - echo "PYLIB REF = $PYLIB"
-
-      # convert branch to commit
-    - PYLIB=`./utils/ref_to_commit.py PYLIB $PYLIB`;
-    - echo "PYLIB COMMIT = $PYLIB"
-
-      # determine branch for caosdb-pyinttest (specific branch, f-branch or dev)
-    - echo "PYINT REF = $PYINT"
-    - if [ "$PYINT" == "" ]  && [ "$F_BRANCH" != "" ] && ./utils/branch_exists.py PYINT "$F_BRANCH" ; then
-        PYINT="$F_BRANCH";
-      fi
-    - PYINT=${PYINT:-$DEFAULT_BRANCH}
-    - if [ "$PYINT" != "$DEFAULT_BRANCH" ] && [ "$PYINT" != "$F_BRANCH" ] ; then
-        REFTAG="${REFTAG}_IP_${PYINT}";
-      fi
-    - echo "PYINT REF = $PYINT"
-
-    - echo "REFTAG = $REFTAG"
-
 test:
   tags: [docker]
   services:
@@ -213,9 +127,8 @@ unittest_py39:
   tags: [docker]
   stage: unittest
   image: $CI_REGISTRY_IMAGE
-  needs: [build-testenv, setup-env]
+  needs: [build-testenv]
   script:
-    - *env
     # First verify that system Python actually is 3.9
     - python3 -c "import sys; assert sys.version.startswith('3.9')"
     - python3 -c "import linkahead; print('LinkAhead Version:', linkahead.__version__)"
@@ -227,7 +140,7 @@ unittest_py37:
   image: python:3.7
   script: &python_test_script
     - pip install nose pandas pytest pytest-cov gitignore-parser openpyxl>=3.0.7 xlrd==1.2 h5py
-    - pip install git+https://gitlab.indiscale.com/caosdb/src/caosdb-pylib.git@$PYLIB
+    - pip install git+https://gitlab.indiscale.com/caosdb/src/caosdb-pylib.git@dev
     - pip install .
     - pytest --cov=caosadvancedtools unittests
 
-- 
GitLab