Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1124 commits
Select commit Hold shift + click to select a range
44c9eae
Merge pull request #182 from inclusion-numerique/feat/help-center-lan…
Clrk Apr 18, 2024
23d4b55
Merge remote-tracking branch 'stack/main' into dev
Apr 19, 2024
6ed1a3f
chore: cleanup and qa fixes after stack main merge
Apr 19, 2024
6be708c
chore: use stack formatting for helpers.css (4 spaces before css prop…
Apr 19, 2024
e775836
fix: update renamed css class
Apr 19, 2024
f273cb9
fix: axios-retry dependency fix
Apr 19, 2024
f1e4b94
fix: OptionBadge data-test-id
Apr 19, 2024
a96617e
Merge remote-tracking branch 'stack/main' into dev
Apr 19, 2024
abb04d8
qa: lint fix
Apr 19, 2024
dd64bf8
fix: scaleway db instance call
Apr 19, 2024
3ec9383
feat: security txt
Apr 24, 2024
8ab6cba
fix: free slug on resource deletion
Apr 24, 2024
aa0ec8f
qa: remove copilot prompt
Apr 24, 2024
222db2a
fix: filter not validated users in search results
marc-gavanier May 13, 2024
b1e7837
fix: format user name
marc-gavanier May 13, 2024
50ea9f1
Merge pull request #187 from inclusion-numerique/fix/display-user
Clrk May 14, 2024
0ade44f
fix: section title and File title font size
Clrk May 15, 2024
c4057ee
fix: cli command error on CI
Clrk May 21, 2024
29f7ab5
Merge pull request #189 from inclusion-numerique/fix/display-resource…
Clrk May 21, 2024
cf570d8
fix: fixing resource state when changing from profile to base
Apr 24, 2024
267d24d
test CI
Clrk May 23, 2024
b070cc3
fix: design review for mobile devices
marc-gavanier May 14, 2024
c35772d
ci: remove skip unchanged pnpm-lock
marc-gavanier May 24, 2024
e794aeb
Merge pull request #186 from inclusion-numerique/fix/design-review
marc-gavanier May 24, 2024
c36ba4d
fix: Admin -> Administrateur
Clrk May 24, 2024
5dad9cc
Merge pull request #194 from inclusion-numerique/fix/design-review
Clrk May 24, 2024
99dab81
fix: design review for mobile devices
marc-gavanier May 14, 2024
36a3c77
ci: remove skip unchanged pnpm-lock
marc-gavanier May 24, 2024
619359d
fix: Admin -> Administrateur
Clrk May 24, 2024
23e0aa8
fix: test CI
Clrk May 24, 2024
5409b35
fix: test CI
Clrk May 24, 2024
35731db
Merge pull request #192 from inclusion-numerique/fix/draft-wrong-state
Clrk May 24, 2024
14a2a8d
fix: package-lock for dependencies
Clrk May 27, 2024
bfd15e5
fix: webpack build
Jun 5, 2024
ad23812
feat: add resource feedback form
marc-gavanier May 24, 2024
0d3fd46
feat: cannot give feedback to his own resource
marc-gavanier May 24, 2024
cb05ed0
feat: add resource public feedback configuration
marc-gavanier May 24, 2024
6bfd361
feat: add private feedback display
marc-gavanier May 24, 2024
3c014d2
test: add e2e for resource feedback view
marc-gavanier May 27, 2024
0a9ee44
test: e2e for create, update and delete a resource
marc-gavanier May 27, 2024
c8378c7
test: e2e for all resources feedback labels
marc-gavanier May 27, 2024
d91c426
test: add e2e for feedback visibility in resource parameters
marc-gavanier May 28, 2024
afbc31e
test: add e2e for resources list view
marc-gavanier May 28, 2024
9cad622
feat: add resource feedback on ressource card
marc-gavanier May 29, 2024
1654513
fix: feddback summary not displayed for visitors for resources with p…
marc-gavanier May 29, 2024
9c8315d
feat: add resource more actions dropdown
marc-gavanier May 31, 2024
46316a4
test: remove cropped upload story
marc-gavanier Jun 3, 2024
070c393
fix: design review
marc-gavanier Jun 3, 2024
d36af6d
feat: add mobile dropdown modal
marc-gavanier Jun 5, 2024
788da20
Merge pull request #190 from inclusion-numerique/feat/resource-feedback
Clrk Jun 6, 2024
e94c68e
ui: add figma plugin to storybook
Clrk Jun 5, 2024
962f136
ui: add figma plugin to storybook
Clrk Jun 5, 2024
b45a8b1
fix: lint
Clrk Jun 6, 2024
8de724f
feat: adding links to ProfileCard.stories.tsx PublicFooter.stories.ts…
Clrk Jun 6, 2024
41fe5cf
feat: adding links to header and ResourceCard
Clrk Jun 6, 2024
bdad52b
fix: adding pnpm-lock
Clrk Jun 6, 2024
98ffb9c
fix: removing design on resource view
Clrk Jun 6, 2024
df9b88d
chore: updating dependencies
Clrk Jun 6, 2024
c33eb0b
chore: updating dependencies
Clrk Jun 6, 2024
07b5337
chore: updating dependencies
Clrk Jun 6, 2024
514b1dc
chore: update vulnerabilities
Jun 7, 2024
379a572
fix: remove unused storybook utils
marc-gavanier Jun 7, 2024
4f0ef47
fix: storybook main imports and dotenv variables function definition
marc-gavanier Jun 7, 2024
c16ac37
fix: upgrade cdk package dependencies
marc-gavanier Jun 7, 2024
41e2e32
Merge pull request #196 from inclusion-numerique/ui/storybook-figma-p…
marc-gavanier Jun 7, 2024
e4fec4b
fix: delete feedback on small devices
marc-gavanier Jun 10, 2024
a4eb6df
Merge pull request #198 from inclusion-numerique/fix/delete-feedback-…
Clrk Jun 10, 2024
bc244c1
chore: manual approval for chromatic execution
Jun 10, 2024
2727d97
fix: forbidden html elements hierarchy
marc-gavanier Jun 11, 2024
855e993
Merge pull request #199 from inclusion-numerique/chore/chromatic-appr…
hugues-m Jun 11, 2024
65f5bb4
test: update resource card storybook
marc-gavanier Jun 11, 2024
d778319
feat: optimisation des stories visiteur pour limiter le nombre de tes…
marc-gavanier Jun 11, 2024
3967467
test: add stories for resource view
marc-gavanier Jun 12, 2024
5c27630
fix: title size for text edition
Clrk Jun 12, 2024
94e8698
fix: fix e2e
Clrk Jun 12, 2024
9fea859
fix: adding T1 T2 T3 with h4 h5 and h6
Clrk Jun 12, 2024
dd62eae
fix: fixing error on collection title in base
Clrk Jun 12, 2024
375a9ed
fix: fix lint
Clrk Jun 13, 2024
b9681d9
Merge pull request #200 from inclusion-numerique/test/resource-card-s…
Clrk Jun 13, 2024
b1f2eae
Merge pull request #201 from inclusion-numerique/fix/ui-title-text-ed…
Clrk Jun 13, 2024
d98289c
fix: corporate firewalls disabling magic links
Jun 13, 2024
46e8e91
qa: better next auth function invocation
Jun 13, 2024
bf53434
fix: resource car author not showing
Clrk Jun 13, 2024
a88bcf8
fix: firewall user agents
Jun 13, 2024
bedd166
fix: resource card and view design
marc-gavanier Jun 14, 2024
5c93501
Merge pull request #203 from inclusion-numerique/fix/resource-card-an…
Clrk Jun 14, 2024
36e5452
feat: new home page
marc-gavanier Jun 14, 2024
4113056
feat: cross platform dsfr setup script
Jun 19, 2024
be0cdc7
chore: minified remixicons
Jun 19, 2024
72183f6
chore: debug info on setup-dsfr.sh
Jun 19, 2024
88aa210
feat: add category pages
marc-gavanier Jun 20, 2024
65fe98d
chore: remove env var for windows compatibility
Jun 20, 2024
bf09981
fix: categories tags loading state
marc-gavanier Jun 24, 2024
7bb9058
fix: no hover background for featured ressources, bases and profiles
marc-gavanier Jun 24, 2024
1640970
feat: add pagination for thematic pages
marc-gavanier Jun 24, 2024
642d2db
feat: add thematic sorting
marc-gavanier Jun 24, 2024
c01277e
fix: remove dynamic data from home static content
marc-gavanier Jun 24, 2024
99fa089
fix: thematic sort wrong urls
marc-gavanier Jun 24, 2024
9868ed4
feat: thematic tags selector with no loading state nor side effect on…
Jun 25, 2024
0531301
feat: factorize CategoryPage logic in its own component and fix homep…
Jun 25, 2024
51f2309
fix: counts for deleted bases
Jun 25, 2024
781ebd1
feat: page d'accueil, carte featured base, profile and resources
Jun 26, 2024
de318df
fix: follow button while logged out is a link and would highjack the …
Jun 26, 2024
be3d3be
Merge pull request #204 from inclusion-numerique/feat/new-home-page
hugues-m Jun 26, 2024
909edaf
fix: profile card links
Jun 26, 2024
8c98aa9
ui: clickable category cards
Jun 26, 2024
1d1973f
wording: category page descriptions
Jun 26, 2024
a1c63f8
feat: collection card resources counts depend on user authorizations
Jun 27, 2024
3297cdd
wording: update front page wordings
Jun 27, 2024
8ac12ed
qa: remove console logs
Jul 1, 2024
ab969b0
test: adding collection card stories on storybook
Clrk Jul 2, 2024
51a0fa3
ui: fixing action buttons outline on collection card
Clrk Jul 2, 2024
7f7466d
qa: fixing lint
Clrk Jul 2, 2024
b9ae538
qa: fixing lint
Clrk Jul 2, 2024
f7e42d2
qa: fix import
Clrk Jul 2, 2024
31ae05d
ui: fix collection card buttons on mobile and collection modal
Clrk Jul 3, 2024
7345146
ui: fix collection view
Clrk Jul 4, 2024
70eb8db
Merge pull request #205 from inclusion-numerique/test/collection-card…
Clrk Jul 4, 2024
2374bda
ui: fix resource cards publication date on 2 lines when base title to…
Clrk Jul 8, 2024
8e692d1
ui: add search icon on mobile header
Clrk Jul 11, 2024
7bc2b1d
fix: lint
Clrk Jul 11, 2024
cc72615
ui: remove search icon
Clrk Jul 11, 2024
25bf32f
ui: adapt text size on header for mobile
Clrk Jul 18, 2024
6c2f0ce
Merge pull request #206 from inclusion-numerique/fix/ui-regression
Clrk Jul 18, 2024
636d661
fix: removing not verified email from invitation search
Clrk Jul 18, 2024
6e960e4
fix: fixing typo
Clrk Jul 18, 2024
d510507
feat: new frontpage featured content
Jul 31, 2024
bfe14c9
Merge pull request #207 from inclusion-numerique/fix/verified-member-…
Clrk Aug 12, 2024
e1b39cd
fix: fixing private resource view
Clrk Aug 12, 2024
1673c76
test: adding bracket case to unit test
Clrk Aug 12, 2024
c0b2d2a
fix: fixing horizontal overflow on resource tab
Clrk Aug 15, 2024
a614064
Merge pull request #208 from inclusion-numerique/fix/private-resource-UI
Clrk Aug 30, 2024
396e647
ui: adding active members on stats and newsletter replaces webinaire
Clrk Aug 30, 2024
8a3b7c8
ui: cleaning file
Clrk Aug 30, 2024
76e8431
ui: update featured on landing
Clrk Aug 30, 2024
01ba030
fix: lint
Clrk Aug 30, 2024
f873355
Merge pull request #209 from inclusion-numerique/feat/active-members
Clrk Aug 30, 2024
462f249
Merge pull request #210 from inclusion-numerique/fix/bracket-issue-in…
Clrk Aug 30, 2024
f1d76bc
Merge pull request #211 from inclusion-numerique/fix/resource-tab-ove…
Clrk Aug 30, 2024
ea383e4
ui: update featured
Clrk Oct 1, 2024
eb908eb
chore: update scaleway email config
hugues-m Oct 1, 2024
32fe50e
feat: reply to contact email in outbound emails
hugues-m Oct 1, 2024
5e3a980
chore: create scaleway legacy bucket
hugues-m Oct 2, 2024
ba24684
fix: remove legacy vars
hugues-m Oct 2, 2024
3ad63f7
ui: ajout de la coop en landing
Clrk Oct 4, 2024
6b5aa0a
Merge branch 'stack-main' into dev
hugues-m Oct 7, 2024
3348b90
chore: package update after stack merge
hugues-m Oct 7, 2024
7587cd1
feat: implement breaking changes from stack update
hugues-m Oct 8, 2024
3e73cdd
feat: implement breaking changes from stack update
hugues-m Oct 8, 2024
0f2be22
qa: fixes after stack merge
hugues-m Oct 8, 2024
34ae781
Merge remote-tracking branch 'stack/main' into dev
hugues-m Oct 8, 2024
8553e17
qa: e2e fixes after stack merge
hugues-m Oct 8, 2024
c71ebba
qa: lint fixes
hugues-m Oct 9, 2024
09a9b22
feat: support non unicode strings in serialization !stack
hugues-m Oct 9, 2024
5e4cbff
e2e: use new serialization for ressource tasks
hugues-m Oct 9, 2024
7492b20
qa: move checkbox data-test-id to input element !stack
hugues-m Oct 9, 2024
0fea2a2
qa: update testid
hugues-m Oct 9, 2024
d9ce7cc
fix: create resource modal race condition
hugues-m Oct 9, 2024
ca94119
e2e: update sendFeedback test
hugues-m Oct 9, 2024
e9f6c49
chore: deletable preview upload buckets !stack
hugues-m Oct 9, 2024
a9fe87f
chore: update lock
hugues-m Oct 10, 2024
79e1f4e
feat: update user email from oauth provider and reconcile user email …
hugues-m Oct 10, 2024
a8a1c9e
feat: fix css stack upgrade
marc-gavanier Oct 11, 2024
f9e01a6
fix: badge triumph style for storybook
marc-gavanier Oct 11, 2024
584076d
feat: email reconciliation on signin and e2e test !stack
hugues-m Oct 14, 2024
1c998ae
chore: remove sourcemap tsc option !stack
hugues-m Oct 14, 2024
e7210ed
qa: lint fix
hugues-m Oct 14, 2024
973bfc2
fix: multi-select input accessibility
marc-gavanier Oct 14, 2024
e13dfd6
fix: profile actions dropdown overflow
marc-gavanier Oct 14, 2024
cc762f1
fix: invite modal padding
marc-gavanier Oct 14, 2024
c820620
fix : lint
Clrk Oct 14, 2024
53e90e6
chore: next generated d.ts
hugues-m Oct 15, 2024
252baac
qa: enable proconnect e2e
hugues-m Oct 15, 2024
4b3f7c8
qa: proconnect e2e
hugues-m Oct 16, 2024
86ed8a6
chore: update prisma
hugues-m Oct 16, 2024
e723c8f
Merge remote-tracking branch 'stack/main' into dev
hugues-m Oct 21, 2024
831af58
qa: lint fix
hugues-m Oct 21, 2024
bcbf406
Merge remote-tracking branch 'stack/main' into dev
hugues-m Oct 30, 2024
73c5cc4
fix: v1 redirection edge case
hugues-m Oct 30, 2024
7bdf348
feat: throttled and cached dns resolution for external media to ensur…
hugues-m Dec 5, 2024
3eb881a
update: featured content on landing december
Clrk Dec 9, 2024
ceadfd8
fix: download of files with non ascii names !stack
hugues-m Dec 10, 2024
5b08506
update: politique de confidentialité
Clrk Dec 19, 2024
5cf238c
fix: mobile view sur la politique de confidentialité
Clrk Dec 19, 2024
4184fde
fix: lint
Clrk Dec 19, 2024
8abec23
fix: remove extra tag
Clrk Dec 20, 2024
299e94c
feat: meta description for bases, collections et ressources
hugues-m Jan 3, 2025
14daf92
feat: markdown function
hugues-m Jan 6, 2025
e19b5a2
feat: base and resource to markdown
hugues-m Jan 15, 2025
4514f7f
feat: add deleted timestamp to bases and resources api
hugues-m Jan 15, 2025
7c06daa
feat: api charset utf8
hugues-m Jan 15, 2025
6cd53f0
feat: v1 extensive lists apis
hugues-m Jan 15, 2025
e56c863
feat: update baseUrl methods from coop
hugues-m Jan 17, 2025
f7d873b
update: featured content on landing february 2025
Clrk Feb 3, 2025
377c263
feat: adding new way to display favorite collection
KGALLET Feb 12, 2025
a97f155
fix: e2e test modification
KGALLET Feb 12, 2025
b63ee66
feat: adding CollectionMoreActions on collection card
KGALLET Feb 13, 2025
34ffd08
chore: handling prisma migration for old favorite collection
KGALLET Feb 13, 2025
e69979b
fix: lint and build
KGALLET Feb 13, 2025
e86ccc7
chore: add storybook component
KGALLET Feb 13, 2025
dfc2a60
fix: e2e test
KGALLET Feb 13, 2025
f279c81
fix: e2e test
KGALLET Feb 13, 2025
6145ff3
chore: remove renamed component (unused)
KGALLET Feb 13, 2025
b761fd2
fix: review thibault - ui adjustments
KGALLET Feb 19, 2025
069e770
fix: review thibault - ui adjustments
KGALLET Feb 19, 2025
f15dc47
feat: add new collection page ui
KGALLET Feb 14, 2025
f7c5fd1
Merge pull request #222 from inclusion-numerique/feat/new-collection-ui
Clrk Feb 20, 2025
bce463b
fix: display SaveCollection button title
KGALLET Feb 20, 2025
92f4c62
fix: re-enable collections actions on card
KGALLET Feb 20, 2025
3c78f5e
fix: disable e2e save collection feature is removed
KGALLET Feb 20, 2025
08643fe
fix: lint
KGALLET Feb 20, 2025
ece5c05
fix: modal weird behavior on desktop
KGALLET Feb 20, 2025
11e0037
dev de la page budget
manonGalle Feb 14, 2025
0688060
chore: pull review - interpolate boolean
KGALLET Feb 21, 2025
21d727c
qa: lint fix
hugues-m Feb 21, 2025
a8cffac
fix: e2e bounds for dropdown isnt mandatory anyomre
KGALLET Feb 21, 2025
0512f13
Merge pull request #226 from inclusion-numerique/fix/modal-behavior
KGALLET Feb 21, 2025
351ff77
Merge pull request #224 from inclusion-numerique/feat/budget
hugues-m Feb 21, 2025
69e8a47
fix: image position on collection card / view
KGALLET Feb 26, 2025
3813f09
fix: contributor view for base member
KGALLET Feb 26, 2025
fc1261a
fix: e2e - disable test for registered collection for base member
KGALLET Feb 26, 2025
1f72d83
fix: row reverse only when collection image
KGALLET Feb 27, 2025
febd8c0
chore: change the orderby condition to first retrieve favorite collec…
KGALLET Feb 21, 2025
54a09fd
feat: new save ressource modal ui
KGALLET Feb 26, 2025
88dae0d
fix: data-test-id empty box e2e test
KGALLET Feb 27, 2025
37d6a3f
fix: display only accepted base members
KGALLET Feb 27, 2025
2af667b
Merge pull request #225 from inclusion-numerique/feat/new-collection-…
Clrk Feb 27, 2025
9023f1f
fix: typo sur la landing
Clrk Mar 3, 2025
e9eaebf
Merge pull request #228 from inclusion-numerique/fix/admin-base--memb…
Clrk Mar 4, 2025
4afeb1e
chore: review Thibault
KGALLET Mar 5, 2025
b90e708
fix: create collection in private base
KGALLET Mar 6, 2025
f0f3e83
feat: add collections sorting drag n drop
KGALLET Mar 5, 2025
2240417
feat: add orderby for base collection
KGALLET Mar 6, 2025
4289305
chore: rebase fix
KGALLET Mar 6, 2025
4871a49
fix: collection order by created desc (newest to oldest)
KGALLET Mar 6, 2025
dac6ce1
fix: e2e test
KGALLET Mar 6, 2025
918acc1
Merge pull request #227 from inclusion-numerique/feat/new-save-ressou…
Clrk Mar 6, 2025
57372c2
fix: router refresh on mutate success
KGALLET Mar 6, 2025
4bdb447
Merge pull request #229 from inclusion-numerique/feat/collections-sor…
Clrk Mar 11, 2025
45f5355
feat: add orderby for collection resources
KGALLET Mar 7, 2025
9a48d1d
fix: lint
KGALLET Mar 7, 2025
1b73060
chore: wording on create collection button
KGALLET Mar 12, 2025
eb70184
update: featured content on landing march 2025
Clrk Mar 12, 2025
0d35605
feat: add og image of ressource
KGALLET Mar 12, 2025
2403ece
fix: display placeholder image when image fails to load
KGALLET Mar 12, 2025
4ebaa6e
fix: set absolute path for metadata
KGALLET Mar 12, 2025
f57bed4
fix: 307 redirect on catch error
KGALLET Mar 12, 2025
19d66c5
Merge pull request #230 from inclusion-numerique/feat/collections-res…
KGALLET Mar 13, 2025
6af1b65
Merge pull request #232 from inclusion-numerique/fix/display-placehol…
KGALLET Mar 13, 2025
0ff556f
fix: count with saved collections on profile menu
KGALLET Mar 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
115 changes: 87 additions & 28 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ parameters:
default: './pnpm-lock.yaml'
image:
type: string
default: stack-web-<< pipeline.git.branch >> | sed -e 's/\//-/g'
default: la-base-web-<< pipeline.git.branch >> | sed -e 's/\//-/g'
deploy_version:
type: string
default: latest
Expand All @@ -64,21 +64,21 @@ parameters:
## web_app_deployment
## web_app_preview_deletion
## project_stack_deployment
default: "web_app_deployment"
default: 'web_app_deployment'
# Name of the environment to scrap
web_app_docker_registry:
# This is redundant with .env.dist but needed as jobs are way simpler to configure with this parameter
type: string
default: 'rg.fr-par.scw.cloud/stack-web-app'
default: 'rg.fr-par.scw.cloud/la-base-web-app'
preview_deletion_branch:
type: string
default: ""
default: ''

workflows:
version: 2
web_app_deployment:
when:
equal: [ web_app_deployment, << pipeline.parameters.trigger_workflow >> ]
equal: [web_app_deployment, << pipeline.parameters.trigger_workflow >>]
jobs:
- prepare_workspace_dependencies
- lint_web:
Expand Down Expand Up @@ -138,7 +138,8 @@ workflows:

project_infrastructure_deployment:
when:
equal: [ project_stack_deployment, << pipeline.parameters.trigger_workflow >> ]
equal:
[project_stack_deployment, << pipeline.parameters.trigger_workflow >>]
jobs:
- prepare_workspace_dependencies
- lint_and_test_cdk_package:
Expand All @@ -162,11 +163,15 @@ workflows:
when:
and:
- not:
equal: [ main, << pipeline.parameters.preview_deletion_branch >>]
equal: [main, << pipeline.parameters.preview_deletion_branch >>]
- not:
equal: [ dev, << pipeline.parameters.preview_deletion_branch >>]
equal: [dev, << pipeline.parameters.preview_deletion_branch >>]
- << pipeline.parameters.preview_deletion_branch >>
- equal: [ web_app_preview_deletion, << pipeline.parameters.trigger_workflow >> ]
- equal:
[
web_app_preview_deletion,
<< pipeline.parameters.trigger_workflow >>,
]
jobs:
- prepare_workspace_dependencies
- web_app_preview_deletion:
Expand All @@ -179,8 +184,6 @@ jobs:
resource_class: large
steps:
- checkout
- skip/skip_unchanged:
paths: pnpm-lock.yaml
- install_dependencies
- run:
name: 'Fetch dependencies'
Expand Down Expand Up @@ -304,7 +307,7 @@ jobs:
- add_secrets_to_dotenv_file
- setup_docker_web_env
- run:
name: "Add NEXT_PUBLIC_* env to .env"
name: 'Add NEXT_PUBLIC_* env to .env'
command: |
pnpm --silent cli dotenv:add-next-public $NAMESPACE
- restore_cache:
Expand Down Expand Up @@ -370,7 +373,7 @@ jobs:
test_web_e2e:
executor: node-e2e
resource_class: large
parallelism: 2
parallelism: 3
steps:
- checkout
- install_dependencies
Expand All @@ -384,7 +387,7 @@ jobs:
command: pnpm --silent -F @app/web prisma generate
- setup_docker_web_env
- run:
name: "Add NEXT_PUBLIC_* env to .env"
name: 'Add NEXT_PUBLIC_* env to .env'
command: |
pnpm --silent cli dotenv:add-next-public --local $NAMESPACE
- run:
Expand Down Expand Up @@ -440,7 +443,7 @@ jobs:
- add_secrets_to_dotenv_file
- setup_docker_web_env
- run:
name: "Add NEXT_PUBLIC_* env to .env"
name: 'Add NEXT_PUBLIC_* env to .env'
command: |
pnpm --silent cli dotenv:add-next-public --local $NAMESPACE
- run:
Expand Down Expand Up @@ -471,7 +474,7 @@ jobs:
pnpm --silent -F @app/web test:integration

deploy_web:
executor: node
executor: node-postgres
resource_class: large
steps:
- checkout
Expand All @@ -488,7 +491,7 @@ jobs:
pnpm --silent cli secrets:database:setup $NAMESPACE
echo "export DATABASE_PASSWORD=$(pnpm --silent cli secrets:database-password $NAMESPACE)" >> ${BASH_ENV}
- run:
name: "Create terraform variables file from environment variables"
name: 'Create terraform variables file from environment variables'
command: |
pnpm --silent cli terraform:vars-from-env web
- install_terraform
Expand Down Expand Up @@ -519,6 +522,16 @@ jobs:
- run:
name: Set deployment status to migration
command: pnpm --silent cli github:deployment:update $DEPLOYMENT_ID in_progress -d 'Executing database migrations' -l https://app.circleci.com/pipelines/workflows/$CIRCLE_WORKFLOW_ID
- when:
condition:
and:
- not:
equal: [main, << pipeline.git.branch >>]
steps:
- run:
name: 'Import main database dump on preview envs'
command: |
pnpm --silent cli backup:locally-restore-latest-main
- run:
name: 'Migrate database'
command: |
Expand All @@ -530,7 +543,7 @@ jobs:
condition:
and:
- not:
equal: [ main, << pipeline.git.branch >> ]
equal: [main, << pipeline.git.branch >>]
steps:
- run:
name: 'Load fixtures on preview envs'
Expand Down Expand Up @@ -561,7 +574,7 @@ jobs:
command: pnpm --silent -F @app/web prisma generate
- add_secrets_to_dotenv_file
- run:
name: "Create terraform variables file from environment variables"
name: 'Create terraform variables file from environment variables'
command: |
pnpm --silent cli terraform:vars-from-env project
- run:
Expand All @@ -582,14 +595,58 @@ jobs:
command: pnpm --silent -F @app/web prisma generate
- add_secrets_to_dotenv_file
- run:
name: "Create terraform variables file from environment variables"
name: 'Create terraform variables file from environment variables'
command: |
pnpm --silent cli terraform:vars-from-env project
- run:
name: 'Deploy project infrastructure stack'
command: |
pnpm --silent -F @app/cdk cdktf deploy project --var-file .tfvars.json --auto-approve --outputs-file=cdk.out.json --outputs-file-include-sensitive-outputs

backup_main_database:
executor: node
resource_class: large
parameters:
backup_type:
type: string
default: manual
expires_in_days:
type: integer
default: 90
steps:
- checkout
- install_dependencies
- create_dotenv_file
- add_secrets_to_dotenv_file
- add_dotenv_vars_to_bash_env
- run:
name: 'Set backup file name'
command: |
BACKUP_FILE_NAME="backup_${BACKUP_DATABASE_NAME}_<< parameters.backup_type >>_$(date -u +'%Y-%m-%d-%H%M%S')"
echo "export BACKUP_FILE_NAME=$BACKUP_FILE_NAME" >> ${BASH_ENV}
echo "Backup file name: $BACKUP_FILE_NAME"
- run:
name: 'Set expires at'
# Set the BACKUP_EXPIRES_AT env variable to iso 8601 format to now + number of days in {{parameters.expires_in_days}}
command: |
BACKUP_EXPIRES_AT=$(date -u -d "+<< parameters.expires_in_days >> days" +'%Y-%m-%dT%H:%M:%SZ')
echo "export BACKUP_EXPIRES_AT=$BACKUP_EXPIRES_AT" >> ${BASH_ENV}
echo "Backup expires at: $BACKUP_EXPIRES_AT"
- run:
name: 'Create backup file'
command: |
curl -X POST \
-H "X-Auth-Token: $CI_SCW_SECRET_KEY" \
-H "Content-Type: application/json" \
-d "{
\"database_name\": \"$BACKUP_DATABASE_NAME\",
\"instance_id\": \"$DATABASE_INSTANCE_ID\",
\"name\": \"$BACKUP_FILE_NAME\",
\"expires_at\": \"$BACKUP_EXPIRES_AT\"
}" \
--fail --include \
"https://api.scaleway.com/rdb/v1/regions/fr-par/backups"

web_app_preview_deletion:
executor: node
resource_class: large
Expand All @@ -603,15 +660,15 @@ jobs:
command: pnpm --silent -F @app/web prisma generate
- add_secrets_to_dotenv_file
- run:
name: "Create terraform variables file from environment variables"
name: 'Create terraform variables file from environment variables'
command: |
DATABASE_PASSWORD='placeholder_for_destroy' WEB_CONTAINER_IMAGE='placeholder_for_destroy' pnpm --silent cli terraform:vars-from-env web
- when:
condition:
or:
- not: << pipeline.parameters.preview_deletion_branch >>
- equal: [ main, << pipeline.parameters.preview_deletion_branch >> ]
- equal: [ dev, << pipeline.parameters.preview_deletion_branch >> ]
- equal: [main, << pipeline.parameters.preview_deletion_branch >>]
- equal: [dev, << pipeline.parameters.preview_deletion_branch >>]
steps:
- run:
name: 'Canceling job, invalid configuration << pipeline.parameters.preview_deletion_branch >>'
Expand Down Expand Up @@ -648,18 +705,21 @@ commands:
- restore_cache:
keys:
- << pipeline.parameters.cache_version >>-pnpm-{{ checksum "<< pipeline.parameters.lockfile >>" }}
- run:
name: 'Fetch dependencies'
command: pnpm install --virtual-store-dir << pipeline.parameters.virtual_store_dir >> --frozen-lockfile

create_dotenv_file:
steps:
- run:
name: "Create .env file from .env.dist"
name: 'Create .env file from .env.dist'
command: |
cp .env.dist .env

add_secrets_to_dotenv_file:
steps:
- run:
name: "Add secrets to .env"
name: 'Add secrets to .env'
command: |
SCW_ACCESS_KEY=$CI_SCW_ACCESS_KEY SCW_SECRET_KEY=$CI_SCW_SECRET_KEY pnpm --silent cli dotenv:from-secrets

Expand All @@ -673,14 +733,13 @@ commands:
setup_docker_web_env:
steps:
- run:
name: "Set docker env vars"
name: 'Set docker env vars'
command: |
echo "export WEB_APP_DOCKER_REGISTRY='<< pipeline.parameters.web_app_docker_registry >>'" >> ${BASH_ENV}
echo "export BRANCH='<< pipeline.git.branch >>'" >> ${BASH_ENV}
echo "export NAMESPACE=$(echo '<< pipeline.git.branch >>' | sed -e 's/\//-/g')" >> ${BASH_ENV}
echo "export IMAGE_NAME=$(echo 'stack-web-<< pipeline.git.branch >>' | sed -e 's/\//-/g')" >> ${BASH_ENV}
echo "export IMAGE_NAME=$(echo 'la-base-web-<< pipeline.git.branch >>' | sed -e 's/\//-/g')" >> ${BASH_ENV}
echo "export IMAGE_BUILD_TAG=$(echo '$WEB_APP_DOCKER_REGISTRY/$IMAGE_NAME:<< pipeline.number >>')" >> ${BASH_ENV}
echo "export IMAGE_DEPLOY_TAG=$(echo '$WEB_APP_DOCKER_REGISTRY/$IMAGE_NAME:<< pipeline.parameters.deploy_version >>')" >> ${BASH_ENV}
echo "export IMAGE_E2E_TAG=$(echo '$WEB_APP_DOCKER_REGISTRY/$IMAGE_NAME:<< pipeline.parameters.e2e_version >>')" >> ${BASH_ENV}
echo "export WEB_CONTAINER_IMAGE=$(echo '$WEB_APP_DOCKER_REGISTRY/$IMAGE_NAME:<< pipeline.number >>')" >> ${BASH_ENV}

Loading
Loading