Skip to content
Snippets Groups Projects
Commit 0a9459d0 authored by Jürgen Wischer's avatar Jürgen Wischer
Browse files

add sonarqube job

parent c11653c7
No related branches found
No related tags found
No related merge requests found
......@@ -40,7 +40,6 @@ build:
- npm config set proxy http://${PROXY_HOST}:${PROXY_PORT}
- npm config set https-proxy http://${PROXY_HOST}:${PROXY_PORT}
- npm run build
- chmod +x tools/scripts/package.sh
- tools/scripts/package.sh
artifacts:
paths: ["./dist"]
......@@ -53,6 +52,22 @@ astro_check:
script:
- npm run check
sonarqube:
stage: analysis
image: $DOCKER_REGISTRY/devlab-images/sonar-scanner-cli:latest
cache: []
before_script:
- echo "no default before script"
script:
- |
if [[ $CI_COMMIT_BRANCH = main ]]
then
DEV_VERSION=""
else
DEV_VERSION="-dev"
fi
- ./tools/scripts/sonar.sh $DEV_VERSION
nexus_publish:
stage: publish
needs:
......@@ -61,8 +76,6 @@ nexus_publish:
variables:
USER: $S_BWMESSENGER_ID
PASS: $S_BWMESSENGER_PASSWORD
before_script:
- chmod +x tools/scripts/nexus_upload.sh
script:
- cd $BUILD_DIR
- ../tools/scripts/nexus_upload.sh
......
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
#!/bin/bash
set -x
APP_VERSION=`sed -n 's/.*"version":.*"\([0-9]*\.[0-9]*\.[0-9]*\)".*/\1/p' package.json`
DEV_VERSION=$1
sonar-scanner \
-Dsonar.projectKey=bwmessenger_$CI_PROJECT_NAME \
-Dsonar.sources=src \
-Dsonar.host.url=$SONAR_URL \
-Dsonar.token=$DSONAR_LOGIN \
-Dsonar.projectVersion=$APP_VERSION$DEV_VERSION \
-Dsonar.qualitygate.wait=true \
-Dsonar.typescript.tsconfigPath=./tsconfig.json || exit 0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment

Consent

On this website, we use the web analytics service Matomo to analyze and review the use of our website. Through the collected statistics, we can improve our offerings and make them more appealing for you. Here, you can decide whether to allow us to process your data and set corresponding cookies for these purposes, in addition to technically necessary cookies. Further information on data protection—especially regarding "cookies" and "Matomo"—can be found in our privacy policy. You can withdraw your consent at any time.