add login and folder UI

This commit is contained in:
OxSaitama 2023-04-19 15:01:23 +02:00
commit 0fd3063f59
5 changed files with 190 additions and 61 deletions

View File

@ -1,69 +1,109 @@
version: 2.1 version: 2.1
orbs: orbs:
kubernetes: circleci/kubernetes@1.0.0 kubernetes: circleci/kubernetes@1.0.0
helm: circleci/helm@2.0.1 helm: circleci/helm@2.0.1
jobs: jobs:
build-push-docker-image:
docker:
- image: cimg/base:stable
environment:
TAG: << pipeline.git.tag >>
steps:
- checkout
- add_ssh_keys:
fingerprints:
- "39:25:57:64:62:43:1f:98:b1:5e:75:53:87:d8:e7:71"
- run: cp $HOME/.ssh/id_rsa_3925576462431f98b15e755387d8e771 id_rsa
- setup_remote_docker:
version: 20.10.12
docker_layer_caching: true
- run: docker login rg.fr-par.scw.cloud/lecoffre -u nologin -p $SCW_SECRET_KEY
- run: docker build --tag rg.fr-par.scw.cloud/lecoffre/front:$TAG .
- run: docker push rg.fr-par.scw.cloud/lecoffre/front:$TAG
build-push-docker-image: deploy-docker-image:
docker: parameters:
- image: cimg/base:stable env:
environment: type: string
TAG: << pipeline.git.tag >> default: ""
steps: docker:
- checkout - image: cimg/base:stable
- add_ssh_keys: environment:
fingerprints: TAG: << pipeline.git.tag >>
- "39:25:57:64:62:43:1f:98:b1:5e:75:53:87:d8:e7:71" steps:
- run: cp $HOME/.ssh/id_rsa_3925576462431f98b15e755387d8e771 id_rsa - checkout
- setup_remote_docker: - kubernetes/install-kubeconfig:
version: 20.10.12 kubeconfig: KUBECONFIG_DATA
docker_layer_caching: true - helm/install-helm-client
- run: docker login rg.fr-par.scw.cloud/lecoffre -u nologin -p $SCW_SECRET_KEY - run:
- run: docker build --tag rg.fr-par.scw.cloud/lecoffre/front:$TAG . name: Deploy
- run: docker push rg.fr-par.scw.cloud/lecoffre/front:$TAG command: >
helm upgrade
lecoffre-front devops/ -i -f devops/<<parameters.env>>.values.yaml
deploy-docker-image: -n lecoffre
docker: --create-namespace
- image: cimg/base:stable --set lecoffreFront.image.repository='rg.fr-par.scw.cloud/lecoffre/front'
environment: --set lecoffreFront.image.tag=$TAG
TAG: << pipeline.git.tag >>
steps:
- checkout
- kubernetes/install-kubeconfig:
kubeconfig: KUBECONFIG_DATA
- helm/install-helm-client
- run:
name: Deploy
command: >
helm upgrade
lecoffre-front devops/ -i -f devops/values.yaml
-n lecoffre
--create-namespace
--set lecoffreFront.image.repository='rg.fr-par.scw.cloud/lecoffre/front'
--set lecoffreFront.image.tag=$TAG
workflows: workflows:
version: 2 version: 2
build-and-register: build-and-deploy-stg:
jobs: jobs:
- build-push-docker-image: - build-push-docker-image:
filters: filters:
tags: tags:
only: /^v.*/ only: /^v.*/
branches: branches:
ignore: /.*/ ignore: /.*/
- deploy-docker-image: - deploy-docker-image:
requires: env: stg
- build-push-docker-image requires:
context: - build-push-docker-image
- staging context:
filters: - staging
tags: filters:
only: /^v.*/ tags:
branches: only: /^v.*/
ignore: /.*/ branches:
ignore: /.*/
build-and-deploy-ppd:
jobs:
- build-push-docker-image:
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/
- deploy-docker-image:
env: ppd
requires:
- build-push-docker-image
context:
- production
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/
# build-and-deploy-prod:
# jobs:
# - build-push-docker-image:
# filters:
# tags:
# only: /^v.*/
# branches:
# ignore: /.*/
# - deploy-docker-image:
# requires:
# - build-push-docker-image
# context:
# - production
# filters:
# tags:
# only: /^v.*/
# branches:
# ignore: /.*/

44
devops/ppd.values.yaml Normal file
View File

@ -0,0 +1,44 @@
dockerPullSecret: secret/data/lecoffre-front-ppd/config/dockerpullsecret
namespace: lecoffre
lecoffreFront:
serviceAccountName: lecoffre-front-sa
command: "'sh', '-c', '. /vault/secrets/envs && npm run start'"
vault:
role : custom_lecoffre-front_injector_rol
server: https://vault-ppd.smart-chain.fr
annotations:
vault.hashicorp.com/agent-pre-populate-only: "true"
vault.hashicorp.com/agent-inject: "true"
vault.hashicorp.com/agent-inject-secret-envs: secret/data/lecoffre-front-ppd/config/envs
vault.hashicorp.com/role: custom_lecoffre-front_injector_rol
vault.hashicorp.com/agent-inject-template-envs: |
{{ with secret "secret/data/lecoffre-front-ppd/config/envs" }}
{{ range $k, $v := .Data.data }}
export {{ $k }}="{{ $v }}"
{{ end }}
{{ end }}
imagePullSecrets:
- name: docker-pull-secret
image:
pullPolicy: Always
repository: "rg.fr-par.scw.cloud/lecoffre/front"
resources:
requests:
cpu: 200m
memory: 1Gi
limits:
memory: 2Gi
ingress:
host: app.ppd.lecoffre.smart-chain.fr
tls:
hosts:
- app.ppd.lecoffre.smart-chain.fr
secretName: app-tls
annotations:
kubernetes.io/ingress.class: nginx
cert-manager.io/cluster-issuer: letsencrypt-prod
nginx.ingress.kubernetes.io/from-to-www-redirect: "true"
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"

44
devops/stg.values.yaml Normal file
View File

@ -0,0 +1,44 @@
dockerPullSecret: secret/data/lecoffre-front-stg/config/dockerpullsecret
namespace: lecoffre
lecoffreFront:
serviceAccountName: lecoffre-front-sa
command: "'sh', '-c', '. /vault/secrets/envs && npm run start'"
vault:
role : custom_lecoffre-front_injector_rol
server: https://vault-stg.smart-chain.fr
annotations:
vault.hashicorp.com/agent-pre-populate-only: "true"
vault.hashicorp.com/agent-inject: "true"
vault.hashicorp.com/agent-inject-secret-envs: secret/data/lecoffre-front-stg/config/envs
vault.hashicorp.com/role: custom_lecoffre-front_injector_rol
vault.hashicorp.com/agent-inject-template-envs: |
{{ with secret "secret/data/lecoffre-front-stg/config/envs" }}
{{ range $k, $v := .Data.data }}
export {{ $k }}="{{ $v }}"
{{ end }}
{{ end }}
imagePullSecrets:
- name: docker-pull-secret
image:
pullPolicy: Always
repository: "rg.fr-par.scw.cloud/lecoffre/front"
resources:
requests:
cpu: 200m
memory: 1Gi
limits:
memory: 2Gi
ingress:
host: app.stg.lecoffre.smart-chain.fr
tls:
hosts:
- app.stg.lecoffre.smart-chain.fr
secretName: app-tls
annotations:
kubernetes.io/ingress.class: nginx
cert-manager.io/cluster-issuer: letsencrypt-prod
nginx.ingress.kubernetes.io/from-to-www-redirect: "true"
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"

View File

@ -33,3 +33,5 @@
"typescript": "4.9.5" "typescript": "4.9.5"
} }
} }

View File

@ -1,7 +1,6 @@
import Button, { EButtonVariant } from "@Front/Components/DesignSystem/Button"; import Button, { EButtonVariant } from "@Front/Components/DesignSystem/Button";
import Form from "@Front/Components/DesignSystem/Form"; import Form from "@Front/Components/DesignSystem/Form";
import InputField from "@Front/Components/DesignSystem/Form/Elements/InputField"; import InputField from "@Front/Components/DesignSystem/Form/Elements/InputField";
import Select, { IOption } from "@Front/Components/DesignSystem/Select";
import Typography, { ITypo } from "@Front/Components/DesignSystem/Typography"; import Typography, { ITypo } from "@Front/Components/DesignSystem/Typography";
import BackArrow from "@Front/Components/Elements/BackArrow"; import BackArrow from "@Front/Components/Elements/BackArrow";
import DefaultNotaryDashboard, { IDashBoardFolder } from "@Front/Components/LayoutTemplates/DefaultNotaryDashboard"; import DefaultNotaryDashboard, { IDashBoardFolder } from "@Front/Components/LayoutTemplates/DefaultNotaryDashboard";