Squashed commit of the following: commit 820ed9b501f6fe14357dc0d1e9133b7a16a257c5 Author: Daniel Appelgren <daniel.appelgren@arbetsformedlingen.se> Date: Wed Jun 30 13:11:55 2021 +0200 fixed conflicts commit c42a985cb8b7cea5f0e891e70d706d8d3cbff619 Merge: e358b596b0ac72Author: Daniel Appelgren <daniel.appelgren@arbetsformedlingen.se> Date: Wed Jun 30 13:05:22 2021 +0200 Merge branch 'develop' into TV-286-avrop-filtertaggar # Conflicts: # apps/dafa-web/src/app/app.module.ts # apps/dafa-web/src/app/pages/avrop/avrop.component.html # apps/dafa-web/src/app/pages/avrop/avrop.module.ts # apps/dafa-web/src/app/shared/models/multiselect-filter-option.ts # apps/dafa-web/src/app/shared/services/api/avrop-api.service.ts commit e358b59360186a8dcb972fae331126b0ae572436 Author: Daniel Appelgren <daniel.appelgren@arbetsformedlingen.se> Date: Wed Jun 30 11:56:48 2021 +0200 fix linting and scss __ commit 6a688c4740ff7e2575ae2f218174ce9012db8d6c Author: Daniel Appelgren <daniel.appelgren@arbetsformedlingen.se> Date: Wed Jun 30 11:50:24 2021 +0200 refactor commit 90bf83119f8f1eec4b2e63f15840fa1a943d64a4 Author: Daniel Appelgren <daniel.appelgren@arbetsformedlingen.se> Date: Wed Jun 30 11:39:13 2021 +0200 !== commit 7b06dec881c6876bbae6f37fbe462e32ae43575f Author: Daniel Appelgren <daniel.appelgren@arbetsformedlingen.se> Date: Wed Jun 30 11:32:14 2021 +0200 move to component folder commit d449edf11e88a492a2446ac8e7fda93a0836e5c7 Author: Daniel Appelgren <daniel.appelgren@arbetsformedlingen.se> Date: Wed Jun 30 11:26:17 2021 +0200 Update avrop.component.html commit 0ca49c7248186c6e56cadf1c5a92298612a4ad49 Author: Daniel Appelgren <daniel.appelgren@arbetsformedlingen.se> Date: Wed Jun 30 11:11:54 2021 +0200 . commit ec084d7b45d36bdeaec16671cb2bcbc94f7ebb70 Merge: 1b20328c06452dAuthor: Daniel Appelgren <daniel.appelgren@arbetsformedlingen.se> Date: Wed Jun 30 08:57:18 2021 +0200 Merge branch 'develop' into TV-286-avrop-filtertaggar # Conflicts: # apps/dafa-web/src/app/pages/avrop/avrop-filters/temporary-filter/temporary-filter.component.ts commit 1b203287dc18d178753c72cd3025dfd70eb56d6f Author: Daniel Appelgren <daniel.appelgren@arbetsformedlingen.se> Date: Tue Jun 29 12:10:38 2021 +0200 fix unit tests commit 320784bd3d3fbd6a7e0b8e6eb338eaec64151748 Author: Daniel Appelgren <daniel.appelgren@arbetsformedlingen.se> Date: Tue Jun 29 11:36:03 2021 +0200 add unit tests and loading-spinners commit 7ebb5ffaddcf6e3b68263eaad6a3d3de3e69811d Author: Daniel Appelgren <daniel.appelgren@arbetsformedlingen.se> Date: Mon Jun 28 17:01:02 2021 +0200 enhetstest commit dc02e6cc17999adcaa07c6e385ed69860c0b4f97 Author: Daniel Appelgren <daniel.appelgren@arbetsformedlingen.se> Date: Mon Jun 28 15:15:13 2021 +0200 Fix reset to step 1 commit e4759c0a59ebd090248f9765d23fdf3c5f8aea03 Author: Daniel Appelgren <daniel.appelgren@arbetsformedlingen.se> Date: Mon Jun 28 13:52:03 2021 +0200 Clicking tags will remove selection commit 0acdff3c137477b2422b2c8aba9f895990a37fc9 Author: Daniel Appelgren <daniel.appelgren@arbetsformedlingen.se> Date: Mon Jun 28 13:48:07 2021 +0200 wip commit 4e7a87134edb95c9d522514140dcf8ff8b5c9bfa Merge: c586d676f97f51Author: Daniel Appelgren <daniel.appelgren@arbetsformedlingen.se> Date: Mon Jun 28 09:12:35 2021 +0200 Merge branch 'develop' into refactor/stricter-eslint # Conflicts: # apps/dafa-web/src/app/pages/administration/pages/employee-form/employee-form.component.ts commit c586d675ced7a0dd4bd88599f62dd7a72fe39723 Author: Daniel Appelgren <daniel.appelgren@arbetsformedlingen.se> Date: Wed Jun 23 16:24:37 2021 +0200 Fix linting of avrop commit 70aa93e06c7677ce6b2e5068c74709ef5f9feecc Merge: ace99504afe9b5Author: Daniel Appelgren <daniel.appelgren@arbetsformedlingen.se> Date: Wed Jun 23 16:12:30 2021 +0200 Merge branch 'develop' into refactor/stricter-eslint # Conflicts: # apps/dafa-web/src/app/pages/avrop/avrop.component.spec.ts # apps/dafa-web/src/app/pages/ciam-landing/ciam-landing.component.spec.ts # apps/dafa-web/src/app/pages/logout/logout.component.spec.ts commit ace9950d3dc9517d8fe4e4b53af6813b6b175720 Author: Daniel Appelgren <daniel.appelgren@arbetsformedlingen.se> Date: Wed Jun 23 10:53:00 2021 +0200 Fix remaining linting warnings/errors commit c15b0a4b8a62604928871d45095d9ad257add0a8 Author: Daniel Appelgren <daniel.appelgren@arbetsformedlingen.se> Date: Wed Jun 23 10:44:32 2021 +0200 fix more linting errors and warnings ... and 3 more commits
DAFA-web
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 DAFA-web
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 @dafa-web-monorepo/mylib.
Code scaffolding
Run npm run new-component my-component --project=my-app to generate a new component.
Build DAFA-web
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.
Dotnet API
Run npm run build:api to build the project using the Dotnet API.
Running unit tests on DAFA-web
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 DAFA-web
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/dafa-web-monorepo/commits/commit-hash))
-
-
Upon merge, Open Shift will deploy the application to AUTO and TEST.
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 TEST.nextis automatically deployed to SYS.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 SYS
To deploy the application to SYS 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 SYS.
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.