Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Features historique deploiements #1

Open
wants to merge 205 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
205 commits
Select commit Hold shift + click to select a range
57bb562
feat(wip): basic card for visualizing projects
ophdlv Jul 18, 2022
68aa126
feat: add icon buttons in cards
ophdlv Jul 18, 2022
e6a8820
test(api): add first test and reformat
Jul 19, 2022
d8241c2
feat(api): new routes
Jul 19, 2022
253e19f
refactor: shift to general context
ophdlv Jul 20, 2022
45a11d9
chore: fix .env
Julien-Gr4z Jul 20, 2022
119eb76
refactor: refact schemas and models
MathildeNS Jul 20, 2022
c2a67a7
build(api): pin sqlachemy version for compat
Jul 20, 2022
b1ea260
fix: remove useless context
Julien-Gr4z Jul 20, 2022
3529b1e
feat: use openapi-TS-codegen
Julien-Gr4z Jul 20, 2022
4c82f5f
Merge branch 'dev' into feat/refactorcontext
Julien-Gr4z Jul 20, 2022
be1ce5a
Merge branch 'refactor/review' into feat/refactorcontext
Julien-Gr4z Jul 20, 2022
0f60104
feat: fix navigation and create annotation page
Julien-Gr4z Jul 20, 2022
7e71501
fix: problem refresh
Julien-Gr4z Jul 20, 2022
61ce093
fix: some anti-con
Julien-Gr4z Jul 20, 2022
b07089d
feat: custom annotation page
ophdlv Jul 21, 2022
683dee0
feat: update annotation form
ophdlv Jul 21, 2022
882b698
fix: image number to display
ophdlv Jul 21, 2022
76704aa
feat: add selection in list
MathildeNS Jul 25, 2022
033865b
Merge branch 'feat/refactorcontext' of gitlab.com:natural-solutions/g…
MathildeNS Jul 25, 2022
c050f57
refactor/api
MathildeNS Jul 26, 2022
8a6c10d
Merge branch 'refactor/review' into 'dev'
Jul 26, 2022
1344988
feat: refact files and annotation and add test upload files
MathildeNS Jul 27, 2022
6407e70
feat: router update annotations to file
MathildeNS Jul 27, 2022
2ff0978
feat: test update annotations
MathildeNS Jul 27, 2022
3a77ccb
Merge branch 'feat/api-annotations' into feature/link-front-to-back
MathildeNS Jul 27, 2022
8ac2150
feat: link back to front for annotations
MathildeNS Jul 27, 2022
d908784
feat: test_update_annotations ok
MathildeNS Jul 28, 2022
f8fb97b
feat: add basic for site, deployment, project
MathildeNS Jul 28, 2022
27736aa
feat: site tests
MathildeNS Jul 28, 2022
6fd4073
refact: refact project
MathildeNS Jul 29, 2022
6d3c7ff
refact: site
MathildeNS Jul 29, 2022
e3feaad
refact: device
MathildeNS Jul 29, 2022
f80a238
refact : deployments (not working)
MathildeNS Jul 29, 2022
9293028
feat: add tests on files
MathildeNS Aug 2, 2022
714c91c
feat: add test on projects(not functionning)
MathildeNS Aug 2, 2022
99333ee
chore: deployment - modif date in fixture & add response_model to del…
MathildeNS Aug 2, 2022
9605742
feat: try add test device
MathildeNS Aug 2, 2022
d85c86b
feat: front stat to project cards
MathildeNS Aug 3, 2022
720d2b1
feat: dynamic form for annotation
ophdlv Aug 3, 2022
30cc4bf
feat: stats in home
MathildeNS Aug 4, 2022
cb15cd9
refact: modify filenames for schemas
MathildeNS Aug 4, 2022
b5816e6
feat: begin link-to-back
MathildeNS Aug 4, 2022
fb19c1a
feat: link back to front
MathildeNS Aug 4, 2022
8167cb8
wip stats projects
ophdlv Aug 4, 2022
7ebdc9b
wip
MathildeNS Aug 4, 2022
74ac611
wip project with deployments and files
MathildeNS Aug 4, 2022
b996049
feat: compute stats of all projects
ophdlv Aug 4, 2022
8608612
feat: wip basic new deployment form
ophdlv Aug 4, 2022
6cf7185
Merge branch 'feat/cardproject' into feat/refactorcontext
ophdlv Aug 5, 2022
c360d2c
fix: resolve bugs due to merge
ophdlv Aug 5, 2022
dbfc307
Merge branch 'feat/statsHome' into feat/refactorcontext
ophdlv Aug 5, 2022
884beed
fix: resolve merge after add of home stats
ophdlv Aug 5, 2022
27d9670
fix: resolve errors after generate client
ophdlv Aug 5, 2022
dadbc16
feat: context stats for homepage
MathildeNS Aug 5, 2022
0170940
Merge branch 'feat/refactorcontext' into 'dev'
ophdlv Aug 5, 2022
adbb6a1
feat: statistics of all projects
ophdlv Aug 5, 2022
2c887d4
Merge branch 'feat/stats-projects' into 'dev'
MathildeNS Aug 5, 2022
f731d1e
test(api): added and corrected tests
Aug 8, 2022
0ae00ca
refact: delete item object
MathildeNS Aug 9, 2022
7d5de37
refact: clean schemas folder
MathildeNS Aug 9, 2022
26a0971
Merge cleaning in back and debug tests
MathildeNS Aug 18, 2022
27436be
Merge branch 'test/api-review' into 'dev'
ophdlv Aug 18, 2022
03e5415
Feat project page and create new project
MathildeNS Aug 18, 2022
2a28d74
Merge branch 'feat/project_page' into 'dev'
ophdlv Aug 18, 2022
48b261e
Style home page integration
MathildeNS Aug 18, 2022
c8e0872
Merge branch 'feat/home_integration' into 'dev'
ophdlv Aug 18, 2022
943befd
chore: delete duplicated projectsheet folder
ophdlv Aug 18, 2022
b9ed24d
Merge branch 'dev' of gitlab.com:natural-solutions/geonature/annotati…
MathildeNS Aug 18, 2022
6c6ce05
wip: start device menu in frontend
MathildeNS Aug 18, 2022
de72984
wip: add route menu devices
MathildeNS Aug 18, 2022
76001c6
wip: device menu
MathildeNS Aug 18, 2022
276b517
fix: style bouton stats
MathildeNS Aug 18, 2022
cb90bda
style: integration annotation page
MathildeNS Aug 18, 2022
80e631f
chore: project page
MathildeNS Aug 18, 2022
029d45e
style: annotation page integration and fix bug style projectForm
MathildeNS Aug 19, 2022
ad2d4fa
feat: add member group component
MathildeNS Aug 19, 2022
301b952
style: add theme
MathildeNS Aug 19, 2022
cfcaad7
fix: fix bug in annotation style
MathildeNS Aug 19, 2022
2d73277
style: modified label in card project
MathildeNS Aug 22, 2022
07902a5
feat: deployment form for modale and page
ophdlv Aug 25, 2022
ba52e33
fix: update breadcrumb project path
ophdlv Aug 25, 2022
0f5fe5d
Merge branch 'style/project_page' into 'dev'
ophdlv Aug 25, 2022
acd21f2
feat: wip deployment page and modale
ophdlv Aug 25, 2022
2e84146
feat: wip display deployment form
ophdlv Aug 26, 2022
afc9a49
Merge branch 'dev' into 'feat/create_deployment'
MathildeNS Aug 26, 2022
67fca90
Merge branch 'feat/create_deployment' into 'dev'
MathildeNS Aug 26, 2022
6d0eb48
fix: fix bug merge
MathildeNS Aug 26, 2022
8686d84
Fix: correction verification directory img
andriacap Aug 29, 2022
2c98b11
fix: update annotation front features and split annotation code
ophdlv Sep 12, 2022
0d9f67f
Merge branch 'annotation_cleaning' into 'dev'
MathildeNS Sep 12, 2022
3a642e8
feat: create, update, and delete deployments
ophdlv Sep 12, 2022
67f8c53
Merge branch 'deployment_form' into 'dev'
MathildeNS Sep 12, 2022
e91d4ee
feat: create and update device and menu
MathildeNS Sep 12, 2022
4d5f436
Merge branch 'feat/device_menu' into 'dev'
ophdlv Sep 12, 2022
95e8819
feat: formulaire avec les champs associé à la maquette -> OK
andriacap Sep 12, 2022
bbf7dcb
Merge branch 'feature/annotation-ac' into 'dev'
MathildeNS Sep 12, 2022
9009d8c
fix: fix breadcrumb
ophdlv Sep 12, 2022
408a031
Merge branch 'dev' of gitlab.com:natural-solutions/geonature/annotati…
ophdlv Sep 12, 2022
9a765aa
fix: bug for deployments in breadcrumbs
MathildeNS Sep 12, 2022
0d195b5
feat: add cicd
javierblancoNS Sep 14, 2022
1523630
Merge branch 'cicd' into 'dev'
javierblancoNS Sep 14, 2022
2458789
ci: -set e to scripts/test-ci.sh
javierblancoNS Sep 14, 2022
60965cf
ci: -set e to scripts/test-ci.sh
javierblancoNS Sep 14, 2022
28e7a93
ci: add execution permission to test-ci.sh
javierblancoNS Sep 14, 2022
443d201
test(api): fix non working tests
Sep 14, 2022
e3fe91f
fix(api): add Optional to PrimaryKeys
Sep 14, 2022
d28010b
Merge branch 'dev' of gitlab.com:natural-solutions/geonature/annotati…
Sep 14, 2022
4ce3064
ci: fix frontend unhealthy
Sep 14, 2022
28e456e
feat: drop down breadcrumb
ophdlv Sep 19, 2022
e2cf742
Merge branch 'update_front_gallery_deployment' into 'dev'
MathildeNS Sep 19, 2022
5e08050
Refactor/required fields in backend and frontend
MathildeNS Sep 19, 2022
22f590b
Merge branch 'refactor/required_fields' into 'dev'
ophdlv Sep 19, 2022
3a21e72
feat: site menu, create site, site page, data on device page, access …
MathildeNS Sep 22, 2022
86935c8
Merge branch 'feat/site_pages' into 'dev'
MathildeNS Sep 22, 2022
6c174f4
chore: fix bug to go to annotation after merge
MathildeNS Sep 22, 2022
fe88890
chore: fix bug to access deployment page from breadcrumbs
MathildeNS Sep 22, 2022
52a9312
Merge branch 'chore/fix_annotation_path' into 'dev'
ophdlv Sep 22, 2022
aad8fb0
feat/Update deployment form and update models
ophdlv Sep 22, 2022
27a467d
Merge branch 'refactor/update_models' into 'dev'
MathildeNS Sep 22, 2022
1143444
feat: add navigation to the first and last image in annotation page, …
MathildeNS Sep 22, 2022
d330249
Merge branch 'feat/annotation_status' into 'dev'
MathildeNS Sep 22, 2022
0c17bb5
feat: generic modale to import data
ophdlv Sep 23, 2022
242a380
Merge branch 'feat/import-modale' into 'dev'
MathildeNS Sep 23, 2022
c36acd9
fix: update project stats in card after import
ophdlv Sep 23, 2022
5cf7b1c
fix: update global stats after import
ophdlv Sep 23, 2022
a4fc502
fix: update global and projects stats after import
ophdlv Sep 23, 2022
521b6e7
Merge branch 'fix/update-stats-after-import' into 'dev'
ophdlv Sep 23, 2022
8e345e2
style: modal and form responsive and black writing for disabled form
MathildeNS Sep 23, 2022
54bcafa
Merge branch 'style/responsive' into 'dev'
ophdlv Sep 23, 2022
89cce3b
feat: border color on media and snack notif
andriacap Sep 28, 2022
9cce2ff
Merge branch 'feature/annotation' into 'dev'
MathildeNS Sep 28, 2022
2cd8f43
feat: handle device status and delete navigation menu
MathildeNS Sep 28, 2022
b6c8029
Merge branch 'style/clean_application' into 'dev'
MathildeNS Sep 28, 2022
0d7b5d1
feat: species list from taxhub for species field in annotation page
MathildeNS Sep 29, 2022
7e0549f
Merge branch 'feat/taxref' into 'dev'
MathildeNS Sep 29, 2022
80aa46b
docs: User guide
MathildeNS Sep 30, 2022
f437d18
Merge branch 'docs/init-docs' into 'dev'
MathildeNS Sep 30, 2022
13e81ac
ci: update deploy
javierblancoNS Oct 6, 2022
344c65a
ci: update variables to deploy
javierblancoNS Oct 6, 2022
6dc5cca
ci: update runners
javierblancoNS Oct 7, 2022
2afa064
ci: update deploy
javierblancoNS Oct 7, 2022
1053235
ci: update deploy variables
javierblancoNS Oct 7, 2022
25b2bbc
ci: update deploy variables
javierblancoNS Oct 7, 2022
9a0725b
fix(api): minio access url in config
Oct 14, 2022
1ae1cd8
Merge branch 'fix/displaying-media' into 'dev'
Oct 14, 2022
67d0266
fix: bucketname for traefik
Oct 14, 2022
cc65f18
Merge branch 'fix/traefik-minio' into 'dev'
Oct 14, 2022
7dd8fe3
ci: update deploy with ssh
javierblancoNS Oct 18, 2022
5af0f0c
ci: remove ANSIBLE_INVENTORY_UNPARSED_FAILED
javierblancoNS Oct 18, 2022
0c96d7f
ci: simplify deploy
javierblancoNS Oct 18, 2022
6a40ffc
feat(api): add alembic
Nov 21, 2022
3a30aac
Merge branch 'feat/alembic' into 'dev'
Nov 21, 2022
4c86555
Resolve "Optimiser la CI de tests backend"
Nov 22, 2022
673c780
Merge branch '6-optimiser-la-ci-de-tests-backend' into 'dev'
Nov 22, 2022
0f24105
ci: add pages to build doc
Nov 22, 2022
a6d32a5
Merge branch 'ci/docs-pages' into 'dev'
Nov 22, 2022
48e8959
Resolve "Revoir la gestion de la config pour centraliser"
Nov 22, 2022
e2808e1
Merge branch '1-revoir-la-gestion-de-la-config-pour-centraliser' into…
Nov 22, 2022
671af73
Resolve "Bump FastAPI to 0.87.0"
Nov 22, 2022
de2571e
Merge branch '4-bump-fastapi' into 'dev'
Nov 22, 2022
bf0c542
Resolve "Implémenter la traduction"
Nov 24, 2022
e26675d
Merge branch '8-implementer-la-traduction' into 'dev'
MathildeNS Nov 24, 2022
c4c0b77
Fix/device menu
MathildeNS Nov 25, 2022
e015d19
Merge branch 'fix/device_menu' into 'dev'
Nov 25, 2022
9e30e04
Fix bugs in project and deployment page
MathildeNS Nov 25, 2022
ae62567
Merge branch 'fix/front-end' into 'dev'
MathildeNS Nov 25, 2022
320f203
feat : add maps
MathildeNS Nov 29, 2022
48baf23
Merge branch 'feat/front-end/map' into 'dev'
MathildeNS Nov 29, 2022
911d6c5
Resolve "Fix les changements de la dernière merge request"
Nov 30, 2022
2eda0ba
Merge branch '9-fix-les-changements-de-la-derniere-merge' into 'dev'
Nov 30, 2022
866a06d
Resolve "Améliorer l'image docker du frontend"
Dec 23, 2022
9d45bc6
Merge branch '3-ameliorer-l-image-docker-du-frontend' into 'dev'
Dec 23, 2022
fe294ab
Resolve "Build production frontend image in gitlab-ci"
Dec 23, 2022
cfca4da
Merge branch '10-build-production-frontend-image-in-gitlab-ci' into '…
Dec 23, 2022
4fcad71
Resolve "Deploy all when gitlab-ci variable is set"
Dec 23, 2022
7ac83d2
Merge branch '11-deploy-all-when-gitlab-ci-variable-is-set' into 'dev'
Dec 23, 2022
a441b7e
ci: change deploy tag
Dec 23, 2022
1aead5a
fix(front): default to /api/v1
Dec 23, 2022
df77398
feat: Add LICENSE
Jan 4, 2023
c3de328
Resolve "Supprimer les "jean-paul-bucket" en dur dans le code"
Jan 4, 2023
631a9e5
Merge branch '2-supprimer-les-jean-paul-bucket-en-dur-dans-le-code' i…
Jan 4, 2023
a1d627c
Resolve "Appliquer black/isort/autoflake"
Jan 4, 2023
ec5f609
Merge branch '5-appliquer-black-isort-autoflake' into 'dev'
Jan 4, 2023
a62fe4a
Resolve "fix(env) .env.sample instead of .env and gitignore .env"
Jan 4, 2023
fa811ac
Merge branch '14-fix-env-env-sample-instead-of-env-and-gitignore-env'…
Jan 4, 2023
023253a
Resolve "Add more info to the README"
Jan 16, 2023
85ac3c3
Merge branch '12-add-more-info-to-the-readme' into 'dev'
Jan 16, 2023
4a53b0b
GitHub Actions (test/build/documentation/code style) (#19)
georgemoon Jul 5, 2023
896dd07
Added licence and basic contributing guidelines (#23)
georgemoon Jul 5, 2023
f35a007
Correcting style to comply with python black
Jul 19, 2023
e6fb185
Require tests on pull request
Jul 19, 2023
df61ff4
fix(front): remove hardcoded values of users (#9)
mvergez Jul 25, 2023
5d125a8
build: prevent mounting node_modules volume (#10)
mvergez Jul 25, 2023
332c841
Fix/homogenize buttons (#5)
ophdlv Jul 25, 2023
7e0b976
Fix/deployment form (#7)
ophdlv Jul 25, 2023
1fa6379
Fix/annotation after navigation (#13)
ophdlv Jul 25, 2023
5cec783
Fix/snack component (#22)
ophdlv Jul 25, 2023
a018f39
fix: type used in deployment form (#28)
ophdlv Jul 25, 2023
affc58a
test(deployment): update test for deploy creation
ophdlv May 9, 2023
d02a199
fix: style
Jul 26, 2023
ebf078a
feat: ajout du tableau historique des déploiements côté frontend
GiulianaFbz Jun 23, 2023
a035945
avancée de l'historique des deploiements
Apr 10, 2024
5637ee3
avancée historique de déploiement
Apr 10, 2024
500aaa1
historique de deploiement finit
Apr 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions .env

This file was deleted.

40 changes: 40 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Documentation (build and deploy)
on:
push:
branches: [dev]
paths:
- docs/
- .github/
workflow_dispatch:
permissions:
contents: write
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 2
lfs: true
- uses: actions/setup-python@v4
with:
python-version: 3.x
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v3
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- run: pip install mkdocs-material
- run: mkdocs build --config-file ./docs/mkdocs.yml --site-dir ./public
- uses: actions/upload-pages-artifact@v1
with:
path: ./docs/public
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/deploy-pages@v2
25 changes: 25 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Code (check style)

on:
push:
workflow_dispatch:

concurrency:
group: "${{ github.ref }}"
cancel-in-progress: true

jobs:
isort:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: isort/isort-action@v1.1.0
with:
sort-paths: api/
black:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: psf/black@stable
with:
src: api/
89 changes: 89 additions & 0 deletions .github/workflows/test_and_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: Code (test and build)

on:
push:
branches: ["dev"]
workflow_dispatch:
pull_request:

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
test_api:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: "./scripts/test-ci.sh"
build_api:
needs: test_api
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write
steps:
- uses: actions/checkout@v3
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v2
- name: Log into registry ${{ env.REGISTRY }}
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build/push API (dev)
uses: docker/build-push-action@v4
with:
context: ./api
target: development
push: true
tags: ${{ env.REGISTRY }}/${{env.IMAGE_NAME}}:api-dev
- name: Build/push API (prod)
uses: docker/build-push-action@v4
with:
context: ./api
target: production
push: true
tags: ${{ env.REGISTRY }}/${{env.IMAGE_NAME}}:api-latest
build_frontend:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write
steps:
- uses: actions/checkout@v3
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v2
- name: Log into registry ${{ env.REGISTRY }}
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build/push API (dev)
uses: docker/build-push-action@v4
with:
context: ./frontend
target: development
push: true
tags: ${{ env.REGISTRY }}/${{env.IMAGE_NAME}}:frontend-dev
- name: Build/push API (prod)
uses: docker/build-push-action@v4
with:
context: ./frontend
target: production
push: true
tags: ${{ env.REGISTRY }}/${{env.IMAGE_NAME}}:frontend-latest
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
docker/.env
179 changes: 179 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
stages:
- format
- build
- pages
- test
- deploy

isort:
stage: format
image:
name: registry.gitlab.com/natural-solutions/images:isort-latest
entrypoint: [""]
script:
- isort api/ --check-only
tags:
- NSCICDDOCKER

black:
stage: format
image:
name: cytopia/black
entrypoint: ["/bin/ash", "-c"]
script:
- python3 -m black --check --diff api/
tags:
- NSCICDDOCKER

build_api_development:
stage: build
script:
- docker login ${CI_REGISTRY} -u gitlab-ci-token -p ${CI_BUILD_TOKEN}
- docker build --target development -t ${CI_REGISTRY_IMAGE}:api-dev ./api
- docker push ${CI_REGISTRY_IMAGE}:api-dev
only:
refs:
- dev
changes:
- api/**/*
tags:
- NSCICDDOCKER

build_api_production:
stage: build
script:
- docker login ${CI_REGISTRY} -u gitlab-ci-token -p ${CI_BUILD_TOKEN}
- docker build --target production -t ${CI_REGISTRY_IMAGE}:api-latest ./api
- docker push ${CI_REGISTRY_IMAGE}:api-latest
only:
refs:
- dev
changes:
- api/**/*
- .gitlab-ci.yml
tags:
- NSCICDDOCKER

build_frontend_development:
stage: build
script:
- docker login ${CI_REGISTRY} -u gitlab-ci-token -p ${CI_BUILD_TOKEN}
- docker build --target development -t ${CI_REGISTRY_IMAGE}:frontend-dev ./frontend
- docker push ${CI_REGISTRY_IMAGE}:frontend-dev
only:
refs:
- dev
changes:
- frontend/**/*
tags:
- NSCICDDOCKER

build_frontend_production:
stage: build
script:
- docker login ${CI_REGISTRY} -u gitlab-ci-token -p ${CI_BUILD_TOKEN}
- docker build --target production -t ${CI_REGISTRY_IMAGE}:frontend-latest ./frontend
- docker push ${CI_REGISTRY_IMAGE}:frontend-latest
only:
refs:
- dev
changes:
- frontend/**/*
- .gitlab-ci.yml
tags:
- NSCICDDOCKER

test_api:
stage: test
script:
- ./scripts/test-ci.sh
coverage: '/(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/'
artifacts:
reports:
coverage_report:
coverage_format: cobertura
path: ./api/coverage.xml
only:
changes:
- api/**/*
tags:
- NSCICDSHELL

deploy_api:
stage: deploy
image:
name: registry.gitlab.com/natural-solutions/ns-ansible-infrastructure:latest
script:
- cd /home/ansible
- export VAULT_TOKEN="$(vault write -field=token auth/jwt/login role=gitlab-runner-annotation jwt=$CI_JOB_JWT)"
- ansible-playbook playbooks/generate-ssh-key.yml --connection=local -e ssh_client_signer_role=geonature
- ansible-playbook -i inventory.py playbooks/infra.yml -t deploy_one -e service=api
only:
refs:
- dev
changes:
- api/**/*
- .gitlab-ci.yml
variables:
INVENTORY_PATH: inventories/geonature/annotation
GIT_STRATEGY: none
tags:
- NSCICDDOCKER

deploy_frontend:
stage: deploy
image: registry.gitlab.com/natural-solutions/ns-ansible-infrastructure:latest
script:
- cd /home/ansible
- export VAULT_TOKEN="$(vault write -field=token auth/jwt/login role=gitlab-runner-annotation jwt=$CI_JOB_JWT)"
- ansible-playbook playbooks/generate-ssh-key.yml --connection=local -e ssh_client_signer_role=geonature
- ansible-playbook -i inventory.py playbooks/infra.yml -t deploy_one -e service=frontend
only:
refs:
- dev
changes:
- frontend/**/*
- .gitlab-ci.yml
variables:
INVENTORY_PATH: inventories/geonature/annotation
GIT_STRATEGY: none
tags:
- NSCICDDOCKER

deploy_all:
stage: deploy
image: registry.gitlab.com/natural-solutions/ns-ansible-infrastructure:latest
script:
- cd /home/ansible
- export VAULT_TOKEN="$(vault write -field=token auth/jwt/login role=gitlab-runner-annotation jwt=$CI_JOB_JWT)"
- ansible-playbook playbooks/generate-ssh-key.yml --connection=local -e ssh_client_signer_role=geonature
- ansible-playbook -i inventory.py playbooks/infra.yml -t deploy
only:
variables:
- $DEPLOY_ALL
variables:
INVENTORY_PATH: inventories/geonature/annotation
GIT_STRATEGY: none
tags:
- NSCICDDOCKER

pages:
stage: pages
image:
name: squidfunk/mkdocs-material:8.1.10
entrypoint:
- ""
only:
refs:
- dev
changes:
- docs/**/*
- .gitlab-ci.yml
script:
- cd docs
- mkdocs build --site-dir ../public
artifacts:
paths:
- public
tags:
- NSCICDDOCKER
41 changes: 41 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Launch index.html",
"type": "firefox",
"request": "launch",
"reAttach": true,
"file": "${workspaceFolder}/index.html"
},
{
"name": "Launch localhost",
"type": "firefox",
"request": "launch",
"reAttach": true,
"url": "http://localhost:3000",
"webRoot": "${workspaceFolder}",
"pathMappings": [
{
"url": "file:///app/src",
"path": "${workspaceFolder}/frontend/src"
}
]
},
{
"name": "Attach",
"type": "firefox",
"request": "attach"
},
{
"name": "Launch WebExtension",
"type": "firefox",
"request": "launch",
"reAttach": true,
"addonPath": "${workspaceFolder}"
}
]
}
Loading
Loading