Commit 2194fee1 authored by Matthias Rüster's avatar Matthias Rüster
Browse files

Add configuration for GitLab CI

parent de5bd4af
Pipeline #18721 passed with stages
in 11 seconds
stages:
- test
- deploy-image
check_compile:
image: alpine:3.11.6
stage: test
tags:
- group
before_script:
- apk add --update curl make g++
script:
- make
gitlab_deploy:
stage: deploy-image
tags:
- group
when: manual
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
script:
- cd "${CI_PROJECT_DIR}"
- >
if [ -z "${CI_COMMIT_TAG}" ]; then
TAG="latest"
else
TAG="${CI_COMMIT_TAG}"
fi
- docker build --tag "${CI_REGISTRY_IMAGE}/${CI_PROJECT_NAME}:${TAG}" .
- docker push "${CI_REGISTRY_IMAGE}/${CI_PROJECT_NAME}:${TAG}"
......@@ -6,13 +6,6 @@ RUN apk add --update \
g++ && \
mkdir /data
# download it from ftp://topex.ucsd.edu/pub/srtm30_plus/topo30/topo30
COPY topo30 /root/topo30
# check if data has expected checksum
RUN A=$(md5sum /root/topo30 | cut -d " " -f 1) && \
test "$A" = "3f9d746674747bf2c01d8b05b7cccb42"
COPY *.cpp /root/
COPY *.h /root/
COPY *.txt /root/
......@@ -20,7 +13,10 @@ COPY Makefile /root/
WORKDIR /root
RUN make && \
RUN wget "ftp://topex.ucsd.edu/pub/srtm30_plus/topo30/topo30" -O topo30 && \
A=$(md5sum topo30 | cut -d " " -f 1) && \
test "$A" = "3f9d746674747bf2c01d8b05b7cccb42" && \
make && \
./srtmRead -range 0 360 -90 90 -fmt DSBB && \
mv srtmRead.out.grd /data/grid_30.grd && \
./srtmRead -range 0 360 -90 90 -resample 2 -fmt DSBB && \
......@@ -28,6 +24,7 @@ RUN make && \
./srtmRead -range 0 360 -90 90 -resample 4 -fmt DSBB && \
mv srtmRead.out.grd /data/grid_120.grd && \
./srtmRead -range 0 360 -90 90 -resample 8 -fmt DSBB && \
mv srtmRead.out.grd /data/grid_240.grd
mv srtmRead.out.grd /data/grid_240.grd && \
rm topo30
VOLUME [ "/data" ]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment