Skip to content
Snippets Groups Projects
Commit 254dd879 authored by Matevz Erzen's avatar Matevz Erzen
Browse files

Added CI config

parent fe175304
No related branches found
No related tags found
No related merge requests found
......@@ -2,4 +2,8 @@ __pycache__/
*.pyc
*$py.class
.idea/
dump.rdb
\ No newline at end of file
dump.rdb
.git
.cache
.gitignore
.gitlab-ci.yml
\ No newline at end of file
image: nexus-registry.xlab.si:5001/docker:dind
variables:
REGISTRY: registry-gitlab.xlab.si
before_script:
- export SERVICE=$(grep SERVICE MANIFEST | cut -d '=' -f2)
- export VERSION=$(grep VERSION MANIFEST | cut -d '=' -f2)
stages:
- build
- test
- push
build:
stage: build
script:
- docker build --no-cache -t $REGISTRY/medina/$SERVICE:$VERSION .
only:
- develop
- master
test:
stage: test
script:
- echo "not yet implemented"
only:
- develop
- master
push:
stage: push
script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $REGISTRY
- docker tag $REGISTRY/medina/$SERVICE:$VERSION $REGISTRY/medina/$SERVICE:latest
- docker push $REGISTRY/medina/$SERVICE:$VERSION
- docker push $REGISTRY/medina/$SERVICE:latest
- docker logout $REGISTRY
only:
- master
\ No newline at end of file
# syntax=docker/dockerfile:1
FROM python:3.8-slim-buster
FROM nexus-registry.xlab.si:5001/python:3.8-slim-buster
WORKDIR /evidence-collector
......
VERSION=v0.0.1
SERVICE=evidence-collector
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment