Skip to content
Snippets Groups Projects
Verified Commit d4ad8353 authored by Timm Fitschen's avatar Timm Fitschen
Browse files

add trigger for inttest pipeline

parent 1d6cc667
No related branches found
No related tags found
No related merge requests found
Pipeline #10692 passed
Pipeline: caosdb-octaveinttest

#10699

    ......@@ -25,8 +25,10 @@ RUN unzip MOxUnit-master.zip
    WORKDIR /MOxUnit-master/
    RUN make install
    COPY doc/requirements.txt doc-requirements.txt
    RUN pip3 install -r doc-requirements.txt
    COPY dev-requirements.txt dev-requirements.txt
    COPY . /caosdb-octavelib
    WORKDIR /caosdb-octavelib
    RUN rm -rf .git
    RUN pip3 install -r doc/requirements.txt
    RUN pip3 install -r dev-requirements.txt
    ......@@ -26,6 +26,8 @@ variables:
    OCTAVE_REGISTRY_IMAGE: $CI_REGISTRY_IMAGE/testenv:$CI_COMMIT_REF_NAME
    CPPLIB_BRANCH: dev
    OCTAVEINTTEST_PIPELINE: https://gitlab.indiscale.com/api/v4/projects/121/trigger/pipeline
    image: $OCTAVE_REGISTRY_IMAGE
    ......@@ -70,14 +72,20 @@ code_style_cpp:
    - clang-format-11 --dry-run --verbose --Werror $(find test/ src/ -type f -iname "*.cpp" -o -iname "*.h" -o -iname "*.h.in")
    allow_failure: true
    # Unit tests
    test:
    unit_tests:
    tags: [ docker ]
    stage: test
    script:
    - octave -v
    - make test
    package_tests:
    tags: [ docker ]
    stage: test
    script:
    - octave -v
    - make pkg-test
    # Linting with miss_hit
    linting_octave:
    tags: [ docker ]
    ......@@ -96,6 +104,38 @@ linting_cpp:
    - cmake -D LINTING=On ..
    - cmake --build .
    # trigger the integration tests
    trigger_inttest:
    tags: [ docker ]
    stage: deploy
    script:
    ## Determine the octaveinttest branch...
    # ... use an f-branch if posible...
    - if echo "$CI_COMMIT_REF_NAME" | grep -c "^f-" ; then
    OCTAVEINT_REF=$CI_COMMIT_REF_NAME ;
    fi;
    # ... or use main if possible...
    - if [[ "$CI_COMMIT_REF_NAME" == "main" ]] ; then
    OCTAVEINT_REF=main ;
    fi
    # ... and fall-back to dev
    - OCTAVEINT_REF=${OCTAVEINT_REF:-dev}
    - F_BRANCH=$CI_COMMIT_REF_NAME
    - echo "Triggering caosdb-octaveinttest@${OCTAVEINT_REF} (F_BRANCH=$F_BRANCH)"
    - 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 "variables[OCTAVELIB_REGISTRY_IMAGE]=$OCTAVELIB_REGISTRY_IMAGE"
    -F "variables[F_BRANCH]=${F_BRANCH}"
    -F ref=${OCTAVEINT_REF} $OCTAVEINTTEST_PIPELINE 2>HTTPCODE
    # fail if the request failed
    - 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
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment