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

WIP: pipeline

parent 1f77263d
No related branches found
No related tags found
No related merge requests found
Pipeline #8520 failed
ARG CPPLIB_REGISTRY_IMAGE ARG CPPLIB_REGISTRY_IMAGE
ARG CPPLIB_VERSION=bla
FROM $CPPLIB_REGISTRY_IMAGE FROM $CPPLIB_REGISTRY_IMAGE
COPY .docker/wait-for-it.sh /wait-for-it.sh COPY .docker/wait-for-it.sh /wait-for-it.sh
...@@ -8,7 +7,7 @@ COPY .docker/wait-for-it.sh /wait-for-it.sh ...@@ -8,7 +7,7 @@ COPY .docker/wait-for-it.sh /wait-for-it.sh
WORKDIR /libcaosdb/ WORKDIR /libcaosdb/
RUN mkdir build RUN mkdir build
WORKDIR /libcaosdb/build WORKDIR /libcaosdb/build
RUN cmake .. RUN cmake -D INSTALL_DIR_NAME=libcaosdb..
RUN cmake --build . RUN cmake --build .
RUN cmake --install . --prefix /usr/local/ RUN cmake --install . --prefix /usr/local/
...@@ -22,10 +21,10 @@ RUN apt-get install -y openjdk-11-jdk-headless ...@@ -22,10 +21,10 @@ RUN apt-get install -y openjdk-11-jdk-headless
# build and run tests # build and run tests
CMD ls -la && \ CMD ls -la && \
ls -la /usr/local/lib/ && \ ls -la /usr/local/lib/ && \
ls -la /usr/local/lib/libcaosdb-$ENV_CPPLIB_VERSION && \ ls -la /usr/local/lib/libcaosdb && \
mkdir build && \ mkdir build && \
cd build && \ cd build && \
/wait-for-it.sh caosdb-server:10443 -t 500 -- \ /wait-for-it.sh caosdb-server:10443 -t 500 -- \
cmake -D CMAKE_PREFIX_PATH=/usr/local/lib/libcaosdb-$ENV_CPPLIB_VERSION .. && \ cmake -D CMAKE_PREFIX_PATH=/usr/local/lib/libcaosdb .. && \
cmake --build . && \ cmake --build . && \
ctest ctest
#!/bin/sh #!/bin/sh
echo $CPPLIB_VERSION docker-compose -f tester.yml run tester
CPPLIB_VERSION=$CPPLIB_VERSION docker-compose -f tester.yml run tester
rv=$? rv=$?
echo $rv > result echo $rv > result
...@@ -4,8 +4,6 @@ services: ...@@ -4,8 +4,6 @@ services:
image: "$CPPINTTEST_REGISTRY_IMAGE" image: "$CPPINTTEST_REGISTRY_IMAGE"
networks: networks:
- docker_caosnet - docker_caosnet
environment:
ENV_CPPLIB_VERSION: "$CPPLIB_VERSION"
volumes: volumes:
- type: bind - type: bind
source: ./cert source: ./cert
......
...@@ -33,16 +33,11 @@ variables: ...@@ -33,16 +33,11 @@ variables:
# this is the name of the image in the /image-cache/ directory # this is the name of the image in the /image-cache/ directory
CPPINTTEST_IMAGE_CACHE: caosdb-cppinttest-testenv:$CI_COMMIT_REF_NAME.tar CPPINTTEST_IMAGE_CACHE: caosdb-cppinttest-testenv:$CI_COMMIT_REF_NAME.tar
## FOR DEBUGGING ## FOR DEBUGGING
TRIGGERED_BY_REPO: CPPINTTEST TRIGGERED_BY_REPO: CPPINTTEST
TRIGGERED_BY_REF: $CI_COMMIT_REF_NAME TRIGGERED_BY_REF: $CI_COMMIT_REF_NAME
TRIGGERED_BY_HASH: $CI_COMMIT_SHORT_SHA TRIGGERED_BY_HASH: $CI_COMMIT_SHORT_SHA
## Run tests against this cpplib version
CPPLIB_VERSION: 0.0.1
# This is the caosdb-deploy branch which build the images for caosdb-server and caosdb-mysql # This is the caosdb-deploy branch which build the images for caosdb-server and caosdb-mysql
# TODO change to dev after merge of f-grpc to dev # TODO change to dev after merge of f-grpc to dev
...@@ -65,6 +60,7 @@ info: ...@@ -65,6 +60,7 @@ info:
- echo "$CI_REGISTRY_IMAGE_BASE" - echo "$CI_REGISTRY_IMAGE_BASE"
- echo "$CPPINTTEST_REGISTRY_IMAGE" - echo "$CPPINTTEST_REGISTRY_IMAGE"
- echo "$CPPINTTEST_IMAGE_CACHE" - echo "$CPPINTTEST_IMAGE_CACHE"
- echo "$CAOSDB_TAG"
# Build a docker image in which tests for this repository can run # Build a docker image in which tests for this repository can run
...@@ -95,7 +91,6 @@ build-testenv: ...@@ -95,7 +91,6 @@ build-testenv:
- docker pull $CPPLIB_REGISTRY_IMAGE || true # remove??? docker build --pull??? - docker pull $CPPLIB_REGISTRY_IMAGE || true # remove??? docker build --pull???
- docker build - docker build
--build-arg CPPLIB_REGISTRY_IMAGE=$CPPLIB_REGISTRY_IMAGE --build-arg CPPLIB_REGISTRY_IMAGE=$CPPLIB_REGISTRY_IMAGE
--build-arg CPPLIB_VERSION=$CPPLIB_VERSION
--file .docker/Dockerfile --file .docker/Dockerfile
--pull --pull
--cache-from $CPPINTTEST_REGISTRY_IMAGE --cache-from $CPPINTTEST_REGISTRY_IMAGE
...@@ -115,7 +110,7 @@ build-test: ...@@ -115,7 +110,7 @@ build-test:
- echo $PWD - echo $PWD
- mkdir build - mkdir build
- cd build - cd build
- cmake -D CMAKE_PREFIX_PATH=/usr/local/lib/libcaosdb-${CPPLIB_VERSION} .. - cmake -D CMAKE_PREFIX_PATH=/usr/local/lib/libcaosdb ..
- cmake --build . - cmake --build .
...@@ -164,7 +159,7 @@ test: ...@@ -164,7 +159,7 @@ test:
# the pyinttest docker writes the return value of the tests into the # the pyinttest docker writes the return value of the tests into the
# file result # file result
- CPPLIB_VERSION=$CPPLIB_VERSION /bin/sh ./run.sh - /bin/sh ./run.sh
# collect log files # collect log files
- docker logs docker_caosdb-server_1 &> ../caosdb_log.txt - docker logs docker_caosdb-server_1 &> ../caosdb_log.txt
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment