From 6190abd2f8952d320e6bee621d285ac6f6f44958 Mon Sep 17 00:00:00 2001 From: Cecilia Nievas <cnievas@gfz-potsdam.de> Date: Fri, 24 Sep 2021 14:41:46 +0200 Subject: [PATCH] Added yml for CI pipeline --- gitlab-ci.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 gitlab-ci.yml diff --git a/gitlab-ci.yml b/gitlab-ci.yml new file mode 100644 index 0000000..e17f770 --- /dev/null +++ b/gitlab-ci.yml @@ -0,0 +1,30 @@ +image: debian:bullseye-slim + +before_script: + - apt update -y + - apt install -y git make shellcheck golang-go postgresql -y -qq + - export GOPATH="$HOME/go" + - export PATH="$PATH:$GOPATH/bin" + - go get -u github.com/mvdan/sh/cmd/shfmt + +linters: + script: + - make check + +test: + services: + - name: $CI_REGISTRY/dynamicexposure/server-components/containers/docker-obm-database:master + alias: postgres + variables: + POSTGRES_USER: "postgres" + POSTGRES_PASSWORD: "9doij23408usf" + PGPASSWORD: "$POSTGRES_PASSWORD" + + interruptible: true + script: + - | + for file in `ls migrations/*` + do + echo "importing $file" + psql -v ON_ERROR_STOP=1 -h postgres -U postgres -f $file + done -- GitLab