Skip to content
This repository was archived by the owner on Mar 21, 2025. It is now read-only.

Commit 6d2f321

Browse files
author
Michael Sauter
authored
Merge pull request #726 from opendevstack/task/sonar-fixes-and-scanner-updates
Task/sonar fixes and scanner updates
2 parents 4858539 + c1a0786 commit 6d2f321

File tree

3 files changed

+27
-8
lines changed

3 files changed

+27
-8
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ listed in the changelog.
1717

1818
- sonar-scanner invocations stderr not captured ([#719](https://github.com/opendevstack/ods-pipeline/issues/719))
1919

20+
- sonar-scanner does not start properly: java is lacking tzdb.dat ([#723](https://github.com/opendevstack/ods-pipeline/issues/723))
21+
22+
- update sonar-scanner and cnes-report ([#725](https://github.com/opendevstack/ods-pipeline/issues/725))
23+
24+
- SonarQube doesn't scan FE-related code ([#716](https://github.com/opendevstack/ods-pipeline/issues/716))
25+
2026
## [0.13.2] - 2023-07-18
2127

2228
### Fixed

build/package/Dockerfile.sonar

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]
44
USER root
55
WORKDIR /usr/src/app
66

7-
ENV SONAR_SCANNER_VERSION=4.6.2.2472 \
8-
CNES_REPORT_VERSION=4.0.0
7+
ENV SONAR_SCANNER_VERSION=4.8.0.2856 \
8+
CNES_REPORT_VERSION=4.2.0
99

1010
# Build Go binary.
1111
COPY go.mod .
@@ -31,12 +31,25 @@ RUN cd /tmp \
3131
&& chmod +x /usr/local/cnes/cnesreport.jar
3232

3333
# Final image
34-
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.4
34+
FROM registry.access.redhat.com/ubi8/nodejs-18:1
35+
36+
ENV NPM_CONFIG_PREFIX=$HOME/.npm-global \
37+
LANG=en_US.UTF-8 \
38+
LC_ALL=en_US.UTF-8
39+
40+
RUN echo id: $(id) && \
41+
echo node version: $(node --version) && \
42+
echo npm version: $(npm --version) && \
43+
echo npx version: $(npx --version)
3544

3645
ENV SONAR_EDITION="community" \
3746
JAVA_HOME=/usr/lib/jvm/jre-11
3847

39-
RUN microdnf install --nodocs java-11-openjdk-headless which && microdnf clean all
48+
USER root
49+
RUN INSTALL_PKGS="java-11-openjdk-headless which" && \
50+
yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \
51+
rpm -V $INSTALL_PKGS && \
52+
yum -y clean all --enablerepo='*'
4053

4154
COPY --from=builder /usr/local/bin/sonar /usr/local/bin/sonar
4255
COPY --from=builder /usr/local/sonar-scanner-cli /usr/local/sonar-scanner-cli

docs/design/software-design-specification.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ As described in the architecture, the system is installed into local namespaces.
2828
|===
2929
| SDS-SHARED-1
3030
| `ods-sonar` container image
31-
| Container image for SQ scanning. Based on `ubi8/ubi-minimal` (SDS-EXT-2), includes software to analyze source code statically (SDS-SHARED-2, SDS-EXT-7, SDS-EXT-8 and SDS-EXT-30).
31+
| Container image for SQ scanning. Based on `ubi8/nodejs-18` (SDS-EXT-32), includes software to analyze source code statically (SDS-SHARED-2, SDS-EXT-7, SDS-EXT-8 and SDS-EXT-30).
3232

3333
| SDS-SHARED-2
3434
| `sonar` binary
@@ -380,7 +380,7 @@ If the Aqua scanner is installed in the base image, the pushed image shall be sc
380380

381381
Processes tags specified in the `extra-tags` parameter to add tags to the image in the target registry:
382382

383-
* If an artifact for the tagged image exists, the tag is not further processed.
383+
* If an artifact for the tagged image exists, the tag is not further processed.
384384
* If there is no artifact for the tagged image:
385385
* Adds the tag using skopeo (SDS-EXT-17) to the image in the target registry.
386386
* The resulting tagged image artifact is placed into `.ods/artifacts`.
@@ -557,13 +557,13 @@ a| The script installs the Helm chart located in `deploy/ods-pipeline`. Further,
557557

558558
| SDS-EXT-7
559559
| sonar-scanner
560-
| 4.6
560+
| 4.8
561561
| General purpose SonarQube scanner
562562
| https://github.com/SonarSource/sonar-scanner-cli
563563

564564
| SDS-EXT-8
565565
| cnes-report
566-
| 4.0
566+
| 4.2
567567
| Exports code analysis from a SonarQube server in various file formats.
568568
| https://github.com/cnescatlab/sonar-cnes-report
569569

0 commit comments

Comments
 (0)