add sonar-scanner command to package json

This commit is contained in:
Alexandros Mandilaras 2024-04-23 15:41:41 +03:00
parent 8e139eb0c2
commit 1dd578fe4d
2 changed files with 6 additions and 5 deletions

View File

@ -8,7 +8,7 @@ ENV ORACLE_TOKEN=$ORACLE_TOKEN
ENV BUILD_VERSION=$BUILD_VERSION
RUN npm list -g --depth=0
RUN apt-get -y update && apt-get install -y default-jre locales && apt-get clean
RUN apt-get -y update && apt-get install -y openjdk-17-jre locales && apt-get clean
RUN mkdir -p /usr/share/man/man1/
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
locale-gen
@ -16,14 +16,14 @@ ENV LC_ALL en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
COPY oracle.local.cite.gr.crt /usr/local/share/ca-certificates/oracle.local.cite.gr.crt
RUN update-ca-certificates
# COPY oracle.local.cite.gr.crt /usr/local/share/ca-certificates/oracle.local.cite.gr.crt
# RUN update-ca-certificates
# copy the package.json to install dependencies
COPY package.json ./
# Install the dependencies and make the folder
RUN npm install sonar-scanner --save-dev
RUN npm install --legacy-peer-deps sonarqube-scanner --save-dev
RUN npm install --legacy-peer-deps && mkdir /src && mv ./node_modules ./src
WORKDIR /src

View File

@ -8,7 +8,8 @@
"build": "ng build --configuration production",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
"e2e": "ng e2e",
"sonar-scanner": "node_modules/sonar-scanner/bin/sonar-scanner"
},
"private": true,
"dependencies": {