Merge in TEA/mina-sidor-fa-web from feature/TV-874-fe-lagg-till-mojlighet-att-lagga-upp-fil-och-synka-med-be to develop Squashed commit of the following: commit 2fdc27affebd4310fa432830ae4e2cf19a3669e9 Merge: 2706cd4e609698ebAuthor: WP\holno <nikola.holst-nikolic@arbetsformedlingen.se> Date: Tue Nov 30 08:29:48 2021 +0100 Merge branch 'develop' into feature/TV-874-fe-lagg-till-mojlighet-att-lagga-upp-fil-och-synka-med-be commit 2706cd4e61b497b50d82518bdfd5e5c310dcc7aa Author: WP\holno <nikola.holst-nikolic@arbetsformedlingen.se> Date: Mon Nov 29 13:33:24 2021 +0100 Added uploaded file to submitData commit aa477af83df371e7701885aed7418a283fcf0a2d Author: WP\holno <nikola.holst-nikolic@arbetsformedlingen.se> Date: Mon Nov 29 10:12:34 2021 +0100 Amends commit 8c36a32e3d5f9c7d9530959d341d1ebf3e41be9d Merge: b49a06f385f398caAuthor: WP\holno <nikola.holst-nikolic@arbetsformedlingen.se> Date: Fri Nov 26 10:28:19 2021 +0100 Merge branch 'develop' into feature/TV-874-fe-lagg-till-mojlighet-att-lagga-upp-fil-och-synka-med-be commit b49a06f36616f2b49b62f66dfc53fb5ee7572273 Author: WP\holno <nikola.holst-nikolic@arbetsformedlingen.se> Date: Wed Nov 24 09:39:42 2021 +0100 Laddningssnurra för informativ rapport commit 1fb6b51af5325a199b86630a12769ab3ac00f70c Merge: c516a91bf0354d0aAuthor: WP\holno <nikola.holst-nikolic@arbetsformedlingen.se> Date: Mon Nov 22 14:17:14 2021 +0100 - Merge branch 'develop' into feature/TV-874-fe-lagg-till-mojlighet-att-lagga-upp-fil-och-synka-med-be - Added label text to ui-select to prevent digi-core warning in console and added display:none; to hide it. commit c516a91b8f2aabca7e2393f2ccb997447be5bedf Author: WP\holno <nikola.holst-nikolic@arbetsformedlingen.se> Date: Mon Nov 22 13:57:55 2021 +0100 Prettier, changed in-parameter type. commit d78e8e867ca3b632e86669af1780b5e5249eacd2 Merge: 1aa96b52a0d10765Author: WP\holno <nikola.holst-nikolic@arbetsformedlingen.se> Date: Mon Nov 15 09:57:13 2021 +0100 Merge branch 'develop' into feature/TV-874-fe-lagg-till-mojlighet-att-lagga-upp-fil-och-synka-med-be commit 1aa96b5275115f0d60d0c0637b34bfc3174a4b34 Author: WP\holno <nikola.holst-nikolic@arbetsformedlingen.se> Date: Fri Nov 12 11:20:51 2021 +0100 - Reset package-lock.json - Changed type from unknown to file commit abae56f4e3b9803552d2028f3c55184662181b22 Author: WP\holno <nikola.holst-nikolic@arbetsformedlingen.se> Date: Fri Nov 12 11:13:35 2021 +0100 File-upload commit b1bc6f931a6fd043573a57cf489cf964796e2943 Merge: 5fe8cace873b6a0cAuthor: WP\holno <nikola.holst-nikolic@arbetsformedlingen.se> Date: Wed Nov 10 12:49:57 2021 +0100 Merge branch 'develop' into feature/TV-874-fe-lagg-till-mojlighet-att-lagga-upp-fil-och-synka-med-be commit 5fe8cace262a75b75e4bebde6fa4c3effb11e39f Author: WP\holno <nikola.holst-nikolic@arbetsformedlingen.se> Date: Tue Nov 9 14:21:24 2021 +0100 - Fortsatt utveckling av filuppladdaren - Byt alla af till ui, digi-ng referenser till digi-core/projektets - Ersätt digiNgFormValidatioMmesage till digi-cores - Validering (Måste ha fil) (funkar inte riktigt ännu då valideringens sker på alla kategorier eftersom den finns i modellen. commit bda789b4451983ad69ab6c05a3bad1723b438c2d Author: WP\holno <nikola.holst-nikolic@arbetsformedlingen.se> Date: Mon Nov 1 16:40:16 2021 +0100 File-upload
mina-sidor-fa
The project was generated using Nx.
Quick Start & Documentation
For all commands we will refer to the npm scripts located inside package.json. When using these commands, you do not need to have @angular/cli installed globally on your computer.
To get started, clone the repository and run npm install in the root of the project, this will install all dependencies.
Development server mina-sidor-fa
Run npm start for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.
Dotnet API
Run npm run start:api to run against the Dotnet API.
Generate an application
Run npm run new-app my-app to generate an application. When using Nx, you can create multiple applications and libraries in the same workspace.
Generate a library
Run npm run new-lib my-lib to generate a library. Libraries are shareable across libraries and applications. They can be imported from @mina-sidor-fa/mylib.
Code scaffolding
Run npm run new-component my-component --project=my-app to generate a new component.
Build mina-sidor-fa
Run npm run build to build the project. The build artifacts will be stored in the dist/ directory. Use the --prod flag for a production build.
Mock-api
If you want to use the mock-api, read the README here.
Dotnet API
Run npm run build:api to build the project using the Dotnet API.
Running unit tests on mina-sidor-fa
Run npm run test to execute the unit tests via Jest.
Run npm run nx affected:test to execute the unit tests affected by a change.
Running end-to-end tests on mina-sidor-fa
Run npm run e2e to execute the end-to-end tests via Cypress.
Run npm run nx affected:e2e to execute the end-to-end tests affected by a change.
Understand your workspace
Run npm run nx dep-graph to see a diagram of the dependencies of your projects.
Git workflow
-
Use branching model Gitflow.
- Example:
feature/TV-XXXXorbugfix/TV-XXXX - A useful CLI helper tool can be used: gitflow-avh.
- Example:
-
Clone origin, create feature/bugfix branches and push back to origin.
-
Don't forget to commit and push your changes regulary!
-
Create a pull request for each feature branch.
-
When merging the pull request, follow conventional commits structure inside the merge message.
-
The merge-message, which follows conventional commits, will be added to the CHANGELOG after a release is made.
-
A commit message could look like this:
feat(startpage): Added headings and description to the startpage (TV-1234). -
The changelog would look something like this:
### Features - **startpage:** Added headings and description to the startpage ([TV-1234](https://jira.arbetsformedlingen.se/browse/TV-1234)) ([commit-hash](https://bitbucket.arbetsformedlingen.se/projects/tea/repos/mina-sidor-fa-web/commits/commit-hash))
-
-
Upon merge, Open Shift will deploy the application to AUTO and SYS.
Release and deploy
We use a semi-automated release and deploy to different test-enviroments. A release script is used in combination with semantic-release to add the correct version of the application and changes to the changelog. The deployments are made depending on which branches are updated:
developis automatically deployed to AUTO and SYS.nextis automatically deployed to TEST.mainis automatically deployed to ACC. After this is completed, a question needs to be answered whether the image should be deployed to PROD.
Deploy to TEST
To deploy the application to TEST you need to create a release. Make sure you are in the develop branch and are up-to-date with origin. Then run npm run release. This will:
- Update the CHANGELOG.md and copies the CHANGELOG to assets.
- Bump the applications version according to semantic versioning.
- Commits the CHANGELOG to
developand pushes it to origin. - Merge
developintonextand pushesnextto origin.
Open Shift will deploy the application to TEST.
Release to ACC and PROD
To release the latest version of next to ACC and eventually to PROD; a pull request should be created to merge next into main. The next branch is protected and will not be deleted upon merge.
Open Shift will deploy the application to ACC and a question inside the pipeline is asked if the application also should be deployed to PROD. This question will persist for 24 hours.