Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
| en:modul:m324_aws:topics:11 [2026/01/07 13:54] – dgaravaldi | en:modul:m324_aws:topics:11 [2026/01/10 10:21] (aktuell) – [Getting started] dgaravaldi | ||
|---|---|---|---|
| Zeile 54: | Zeile 54: | ||
| * Save the generated token and handle it as password. | * Save the generated token and handle it as password. | ||
| * Hit the button '' | * Hit the button '' | ||
| - | * Run analysis on your project: '' | + | * Run analysis on your project: '' |
| + | |||
| \\ | \\ | ||
| === Step 4: Download and unzip the scanner === | === Step 4: Download and unzip the scanner === | ||
| * Download the scanner for your platform. | * Download the scanner for your platform. | ||
| - | | + | |
| - | * Add the '' | + | {{: |
| + | {{: | ||
| + | |||
| + | | ||
| + | Example for Linux on AWS EC2 | ||
| + | < | ||
| + | wget -N https:// | ||
| + | sudo apt install unzip | ||
| + | unzip -o sonar-scanner-cli-< | ||
| + | </ | ||
| + | |||
| + | * Add the '' | ||
| + | < | ||
| + | whereis sonar-scanner | ||
| + | sonar-scanner: | ||
| + | </ | ||
| * Check before running code coverage that your target app (i.e. traffic light api) has the following node package are installed. | * Check before running code coverage that your target app (i.e. traffic light api) has the following node package are installed. | ||
| Zeile 95: | Zeile 112: | ||
| \\ | \\ | ||
| === Step 5: Run the tests === | === Step 5: Run the tests === | ||
| + | * On Linux: Install jest with '' | ||
| * Run first the code coverage with jest. | * Run first the code coverage with jest. | ||
| Zeile 102: | Zeile 120: | ||
| * Execute the scanner as shown. | * Execute the scanner as shown. | ||
| - | In the example the scanner binaries are stored in the project folder. The path to the scanner is used in a bash script. | ||
| < | < | ||
| - | #!/usr/bin/env bash | + | # |
| + | # Attention: | ||
| + | # Change CRLF (Windows) to LF (Unix on AWS) in your Editor | ||
| # | # | ||
| - | # set tool variable | + | sonar-scanner |
| - | tool=??/ | + | |
| - | # run tool | + | |
| - | $tool | + | |
| + | -Dsonar.token=< | ||
| + | -Dproject.settings=./ | ||
| </ | </ | ||
| * Analyse the generated report in SonarQube | * Analyse the generated report in SonarQube | ||
| - | --- | + | {{: |
| - | Based on this [[https:// | ||
| ---- | ---- | ||
| + | Source: [[https:// | ||
| [[https:// | [[https:// | ||