Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DojoBackend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dojo Project (HES-SO)
Projects
Backend
DojoBackend
Commits
d57c2344
Commit
d57c2344
authored
1 year ago
by
michael.minelli
Browse files
Options
Downloads
Plain Diff
Merge branch 'add-sonar-integration'
parents
7819f93a
196cf0bf
No related branches found
No related tags found
No related merge requests found
Pipeline
#31625
passed
1 year ago
Stage: code_quality
Stage: deploy
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+28
-1
28 additions, 1 deletion
.gitlab-ci.yml
API
+1
-1
1 addition, 1 deletion
API
sonar-project.properties
+3
-0
3 additions, 0 deletions
sonar-project.properties
with
32 additions
and
2 deletions
.gitlab-ci.yml
+
28
−
1
View file @
d57c2344
...
...
@@ -5,9 +5,32 @@ variables:
stages
:
-
code_quality
-
deploy
code_quality:sonarqube
:
stage
:
code_quality
tags
:
-
code_quality
image
:
name
:
leadrien/isc-sonar-scanner-cli
entrypoint
:
[
"
"
]
variables
:
GIT_SUBMODULE_STRATEGY
:
recursive
GIT_SUBMODULE_FORCE_HTTPS
:
"
true"
SONAR_USER_HOME
:
"
${CI_PROJECT_DIR}/.sonar"
# Defines the location of the analysis task cache
GIT_DEPTH
:
"
0"
# Tells git to fetch all the branches of the project, required by the analysis task
cache
:
key
:
"
${CI_JOB_NAME}"
paths
:
-
.sonar/cache
script
:
-
sonar-scanner
rules
:
-
if
:
'
$CI_COMMIT_TAG
=~
"/^$/"'
deploy
:
image
:
docker:latest
stage
:
deploy
...
...
@@ -22,7 +45,11 @@ deploy:
# Get env file
-
|
echo "Decrypt production env vars" # Do not remove this line because it is used for hide the production key from the ci/cd console
npx dotenv-vault local decrypt "${DOTENV_PROD_KEY}" > ../../.env
echo "DOTENV_KEY_PRODUCTION=\"${DOTENV_PROD_KEY}\"" > .env.keys
npx @dotenvx/dotenvx decrypt
mv .env.production ../../.env
rm .env.keys
cp ../../.env ../.env
# Deploy
...
...
This diff is collapsed.
Click to expand it.
API
@
cc047073
Compare
54c0e2bf
...
cc047073
Subproject commit
54c0e2bf0bf2631d072d56d3ec4685c7bcbc6763
Subproject commit
cc0470731fcfac6d44308c71c797fbf3a2052d9c
This diff is collapsed.
Click to expand it.
sonar-project.properties
0 → 100644
+
3
−
0
View file @
d57c2344
sonar.projectKey
=
DojoBackend
sonar.qualitygate.wait
=
true
sonar.exclusions
=
API/**, Frontend/**
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment