Skip to content
Snippets Groups Projects
Commit 535d1632 authored by Christian Rohlfing's avatar Christian Rohlfing
Browse files

Update .gitlab-ci.yml

Update .gitlab-ci.yml

Update .gitlab-ci.yml

Update .gitlab-ci.yml

Update .gitlab-ci.yml

Update .gitlab-ci.yml

Update .gitlab-ci.yml

Modified Gitlab CI for good
parent 9cea7dba
No related branches found
No related tags found
No related merge requests found
......@@ -11,9 +11,6 @@ variables:
DOCKER_TLS_CERTDIR: "/certs"
DOCKER_HOST: tcp://docker:2376 # Use TLS https://docs.gitlab.com/ee/ci/docker/using_docker_build.html#tls-enabled
before_script:
- docker login -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD} ${CI_REGISTRY}
build:
stage: build
script:
......@@ -25,11 +22,27 @@ build:
- docker push ${CI_REGISTRY_IMAGE}:latest
only:
- master
before_script:
- docker login -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD} ${CI_REGISTRY}
test:
stage: test
script:
- docker run --name examscan --rm -v $(pwd):$(pwd) -w $(pwd) ${CI_REGISTRY_IMAGE}:latest watermark.py --i pdfs --o out
- docker run --name examscan --rm -v $(pwd):$(pwd) -w $(pwd) ${CI_REGISTRY_IMAGE}:latest batch.py --i pdfs --o out
artifacts:
paths:
- out/
test-coverage:
image:
name: ${CI_REGISTRY_IMAGE}:latest
entrypoint: [""]
stage: test
script:
- pip3 install pytest pytest-cov
- cd /app
- python3 -m pytest --cov=./ tests
- python3 -m coverage xml
artifacts:
reports:
cobertura: coverage.xml
......@@ -34,7 +34,7 @@ RUN useradd -m friendlyscanner
USER friendlyscanner
# Copy all files
COPY . /app
COPY --chown=friendlyscanner . /app
WORKDIR /app
# Entrypoint is python
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment