Skip to content
Snippets Groups Projects
Commit 1486c346 authored by FETCHEPING FETCHEPING Rossif Borel's avatar FETCHEPING FETCHEPING Rossif Borel
Browse files

Merge branch 'develop' into 'main'

Pipeline complete

See merge request !3
parents 09416621 ad03b00d
No related branches found
No related tags found
1 merge request!3Pipeline complete
Pipeline #7981 passed
...@@ -7,3 +7,4 @@ report.sh ...@@ -7,3 +7,4 @@ report.sh
.pytest_cache/ .pytest_cache/
requirements.txt.old requirements.txt.old
**/node_modules **/node_modules
docker-compose.yml
\ No newline at end of file
...@@ -10,17 +10,6 @@ stages: # List of stages for jobs, and their order of execution ...@@ -10,17 +10,6 @@ stages: # List of stages for jobs, and their order of execution
- build - build
- deploy - deploy
build-python:
stage: test
script:
- python -m venv venv
- source venv/bin/activate
- pip install -r vapormap/app/requirements/production.txt
artifacts:
paths:
- venv
expire_in: 1 day
#Job de test de qualité de code Python de l'API #Job de test de qualité de code Python de l'API
lint_test_job: lint_test_job:
stage: test stage: test
...@@ -75,6 +64,18 @@ front_test_job: ...@@ -75,6 +64,18 @@ front_test_job:
paths: paths:
- docs - docs
docker_lint_job:
image: hadolint/hadolint:latest-alpine
script:
- rm -rf docs/docker/lint.md && touch docs/docker/lint.md
- echo "##Dockerfile.api" >> docs/docker/lint.md
- hadolint --no-color --no-fail Dockerfile.api | while read line; do echo ${line}" " >> docs/docker/lint.md; done
- echo "##Dockerfile.front" >> docs/docker/lint.md
- hadolint --no-color --no-fail Dockerfile.front | while read line; do echo ${line}" " >> docs/docker/lint.md; done
artifacts:
paths:
- docs
# Job de génération des pages pour le reporting des tests # Job de génération des pages pour le reporting des tests
pages: pages:
stage: report stage: report
...@@ -86,6 +87,7 @@ pages: ...@@ -86,6 +87,7 @@ pages:
- job: e2e_test_job - job: e2e_test_job
- job: cov_test_job - job: cov_test_job
- job: front_test_job - job: front_test_job
- job: docker_lint_job
artifacts: artifacts:
paths: paths:
- public - public
......
...@@ -2,7 +2,8 @@ FROM python:3.8-alpine ...@@ -2,7 +2,8 @@ FROM python:3.8-alpine
WORKDIR /usr/src/app WORKDIR /usr/src/app
COPY vapormap/app . COPY vapormap/app .
RUN pip install --no-cache-dir -r requirements/production.txt RUN pip install -r requirements/production.txt
RUN pip install flask
ENTRYPOINT ["flask"] ENTRYPOINT ["flask"]
CMD ["run", "--host=0.0.0.0"] CMD ["run", "--host=0.0.0.0"]
......
...@@ -3,6 +3,4 @@ FROM nginx:1.23-alpine ...@@ -3,6 +3,4 @@ FROM nginx:1.23-alpine
WORKDIR /usr/share/nginx/html WORKDIR /usr/share/nginx/html
COPY vapormap/frontend . COPY vapormap/frontend .
ENTRYPOINT ["nginx"]
CMD ["-g", "daemon off;"]
EXPOSE 80 EXPOSE 80
\ No newline at end of file
...@@ -9,7 +9,10 @@ pip install mkdocs-material==8.5.11 ...@@ -9,7 +9,10 @@ pip install mkdocs-material==8.5.11
## Lint Dockerfile ## Lint Dockerfile
```sh
docker run --rm -i hadolint/hadolint < Dockerfile docker run --rm -i hadolint/hadolint < Dockerfile
echo "##Dockerfile.api" >> docs/docker/docker.md && docker run --rm -i --env-file $PWD/hadolint.env hadolint/hadolint < Dockerfile.api | while read line; do echo ${line}" " >> docs/docker/docker.md; done
```
## ENVSUBST ## ENVSUBST
...@@ -42,3 +45,18 @@ flake8 api wsgi.py | while read line; do echo ${line}$" " >> docs/lint.md; done ...@@ -42,3 +45,18 @@ flake8 api wsgi.py | while read line; do echo ${line}$" " >> docs/lint.md; done
./report.sh ./report.sh
mkdocs build -d public mkdocs build -d public
``` ```
## Build venv job
```sh
build-python:
stage: test
script:
- python -m venv venv
- source venv/bin/activate
- pip install -r vapormap/app/requirements/production.txt
artifacts:
paths:
- venv
expire_in: 1 day
```
...@@ -12,3 +12,4 @@ nav: ...@@ -12,3 +12,4 @@ nav:
- Bootstrap HTML: frontend/bootlint.md - Bootstrap HTML: frontend/bootlint.md
- Javascript: frontend/jshint.md - Javascript: frontend/jshint.md
- Style CSS: frontend/stylelint.md - Style CSS: frontend/stylelint.md
- Tests Dockerfiles: docker/lint.md
\ 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