ci script added

This commit is contained in:
Wolfgang Hottgenroth 2021-01-26 15:50:43 +01:00
parent f74efc929a
commit c9478935cd
Signed by: wn
GPG Key ID: E49AF3B9EF6DD469
2 changed files with 40 additions and 4 deletions

38
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,38 @@
stages:
- check
- build
variables:
IMAGE_NAME: $CI_REGISTRY/$CI_PROJECT_PATH
check:
image: registry.hottis.de/dockerized/base-build-env:latest
stage: check
tags:
- hottis
- linux
- docker
rules:
- if: $CI_COMMIT_TAG
script:
- checksemver.py -v
--versionToValidate "${CI_COMMIT_TAG}"
--validateMessage
--messageToValidate "${CI_COMMIT_MESSAGE}"
build:
image: registry.hottis.de/dockerized/docker-bash:latest
stage: build
tags:
- hottis
- linux
- docker
script:
- docker build --tag $IMAGE_NAME:latest .
- if [ "$CI_COMMIT_TAG" != "" ]; then
docker tag $IMAGE_NAME:latest $IMAGE_NAME:${CI_COMMIT_TAG};
docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY;
docker push $IMAGE_NAME:latest;
docker push $IMAGE_NAME:${CI_COMMIT_TAG};
fi

View File

@ -7,13 +7,11 @@ ARG APP_DIR="/opt/app"
ARG CONF_DIR="${APP_DIR}/config"
ENV DB_HOST="172.16.10.18"
ENV DB_NAME="hausverwaltung"
ENV DB_NAME="authservice"
ENV DB_USER="hausverwaltung-ui"
ENV DB_PASS="test123"
ENV JWT_ISSUER='de.hottis.hausverwaltung'
ENV JWT_SECRET='streng_geheim'
ENV JWT_LIFETIME_SECONDS=60
ENV JWT_ALGORITHM='HS256'
RUN \