Merge in TEA/mina-sidor-fa-web from feature/TV-825 to develop Squashed commit of the following: commit 59f27f251ae3fd1089ea252db76f161e6e1b9770 Merge: 45e6a9abeeb02c0eAuthor: Aden Hassan <aden.hassan@arbetsformedlingen.se> Date: Tue Nov 23 16:11:56 2021 +0100 Merge branch 'develop' into feature/TV-825 commit 45e6a9ab38e6bc5344852ecf50a572f37b8f9781 Merge: 54a1ca5af0354d0aAuthor: Aden Hassan <aden.hassan@arbetsformedlingen.se> Date: Mon Nov 22 09:38:22 2021 +0100 Merge branch 'develop' into feature/TV-825 commit 54a1ca5a6db81e9e1e7151443175c55334088bea Author: Aden Hassan <aden.hassan@arbetsformedlingen.se> Date: Mon Nov 22 09:36:28 2021 +0100 minor improvement, added alignment in css commit ae55377f05ac53beca5278af53fa425548eacae5 Author: Aden Hassan <aden.hassan@arbetsformedlingen.se> Date: Fri Nov 19 09:16:43 2021 +0100 added correct production-ready text for the concerned fields commit 93330168d4b0a16709bff368f76d2255688f4e22 Merge: b72558c1 10e21b26 Author: Aden Hassan <aden.hassan@arbetsformedlingen.se> Date: Fri Nov 19 09:09:09 2021 +0100 Merge branch 'feature/TV-824' into feature/TV-825 commit 10e21b2686d29af77f5234bab4c71447f4f5e214 Merge: 7e23b40ec6bbfb1bAuthor: Aden Hassan <aden.hassan@arbetsformedlingen.se> Date: Fri Nov 19 09:07:05 2021 +0100 merged in latest from develop commit b72558c1fe5763cebc9a7f34d6a37adf009163ba Merge: dfbf9b42 7e23b40e Author: Aden Hassan <aden.hassan@arbetsformedlingen.se> Date: Wed Nov 3 11:27:51 2021 +0100 Merge branch 'feature/TV-824' into feature/TV-825 commit 7e23b40eba1f830ca25d9dd62b9e77c77bbbfa18 Merge: 9162069a37cdf928Author: Aden Hassan <aden.hassan@arbetsformedlingen.se> Date: Wed Nov 3 11:26:37 2021 +0100 Merge branch 'develop' into feature/TV-824 commit dfbf9b4217446f0623daa89182ccfdcbefc5467a Author: Aden Hassan <aden.hassan@arbetsformedlingen.se> Date: Wed Nov 3 09:21:56 2021 +0100 minor corrections in descriptiontext commit 9fd39e56abef9ba333a9b99d68521d1725a3e910 Author: Aden Hassan <aden.hassan@arbetsformedlingen.se> Date: Wed Nov 3 09:18:21 2021 +0100 added static text that describes the actual field commit 8e8f74ff046490d7feef8ba5dd516d205831cfdc Merge: 5ce19c48 9162069a Author: Aden Hassan <aden.hassan@arbetsformedlingen.se> Date: Wed Nov 3 09:13:02 2021 +0100 Merge branch 'feature/TV-824' into feature/TV-825 commit 9162069a4b1940a1e57eccf4709ca7474b4cf13b Author: Aden Hassan <aden.hassan@arbetsformedlingen.se> Date: Wed Nov 3 09:10:49 2021 +0100 added static text that describes the actual field commit 29105e241801964fdd2aff6ade66b2a93c6f99e5 Merge: bb75411be8791556Author: Aden Hassan <aden.hassan@arbetsformedlingen.se> Date: Wed Nov 3 08:57:34 2021 +0100 Merge branch 'develop' into feature/TV-824 commit 5ce19c48914ba9085eba40a368bcce3e00e5850c Author: Aden Hassan <aden.hassan@arbetsformedlingen.se> Date: Mon Nov 1 12:49:57 2021 +0100 corrected a misstake commit 3c2ba93b79ffaf1b47874ad21c0700e5f55e9ffd Merge: be0601c9 bb75411b Author: Aden Hassan <aden.hassan@arbetsformedlingen.se> Date: Mon Nov 1 12:49:03 2021 +0100 Merge branch 'feature/TV-824' into feature/TV-825 commit bb75411bd0c986f3bff86b96503060c8f929c074 Author: Aden Hassan <aden.hassan@arbetsformedlingen.se> Date: Mon Nov 1 12:48:27 2021 +0100 corrected some mistakes commit be0601c93c176e1f67ad5022e0bbcd79934cbae6 Merge: 49976736 2c1522d7 Author: Aden Hassan <aden.hassan@arbetsformedlingen.se> Date: Mon Nov 1 12:35:14 2021 +0100 Merge branch 'feature/TV-824' into feature/TV-825 commit 2c1522d74e99a24ec5712947a95bd9a0c0937ab0 Author: Aden Hassan <aden.hassan@arbetsformedlingen.se> Date: Mon Nov 1 12:34:41 2021 +0100 removed unnecessary ngIf commit 49976736968261b450f86c5810070acf3723e150 Author: Aden Hassan <aden.hassan@arbetsformedlingen.se> Date: Mon Nov 1 12:32:49 2021 +0100 added info-box popover for genomforandereferens commit d9dcc9d5297f784aacecba1a9f44f28fedd726da Author: Aden Hassan <aden.hassan@arbetsformedlingen.se> Date: Mon Nov 1 12:20:35 2021 +0100 minor css improvement ... and 1 more commit
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.