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
......@@ -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,11 +34,11 @@ RUN useradd -m friendlyscanner
USER friendlyscanner
# Copy all files
COPY . /app
COPY --chown=friendlyscanner . /app
WORKDIR /app
# Entrypoint is python
ENTRYPOINT ["python3"]
# Standard command is batch.py
CMD ["./batch.py", "--help"]
\ No newline at end of file
CMD ["./batch.py", "--help"]
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