Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
Policy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OSDU
OSDU Data Platform
Security and Compliance
Policy
Commits
06654f7c
Commit
06654f7c
authored
5 months ago
by
Shane Hutchins
Browse files
Options
Downloads
Patches
Plain Diff
Sonar testing
parent
3cac7fd9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!536
Sonar testing
Pipeline
#287935
failed
5 months ago
Stage: review
Stage: build
Stage: containerize
Stage: scan
Stage: deploy
Stage: bootstrap
Stage: integration
Stage: publish
Changes
2
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+1
-0
1 addition, 0 deletions
.gitlab-ci.yml
sonar.yml
+35
-0
35 additions, 0 deletions
sonar.yml
with
36 additions
and
0 deletions
.gitlab-ci.yml
+
1
−
0
View file @
06654f7c
...
...
@@ -73,6 +73,7 @@ include:
-
local
:
"
/devops/gc/pipeline/override-stages.yml"
-
local
:
"
/loadtest/pipeline-loadtest.yml"
-
local
:
"
/publish.yml"
-
local
:
"
/sonar.yml"
# --------------------------------------------------------------------------------
compile-and-unit-test
:
...
...
This diff is collapsed.
Click to expand it.
sonar.yml
0 → 100644
+
35
−
0
View file @
06654f7c
sonarqube-scan-python
:
stage
:
scan
needs
:
[
"
compile-and-unit-test"
]
rules
:
-
if
:
$SONAR_CLOUD_TOKEN
# - if: $CI_COMMIT_REF_NAME == 'master' || $CI_PIPELINE_SOURCE == 'merge_request_event'
variables
:
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
image
:
name
:
sonarsource/sonar-scanner-cli:latest
entrypoint
:
[
"
"
]
cache
:
key
:
"
${CI_JOB_NAME}"
paths
:
-
.sonar/cache
script
:
-
|
SONAR_SCANNER_OPTS="
-Dsonar.host.url=${SONAR_CLOUD_URL}
-Dsonar.token=${SONAR_CLOUD_TOKEN}
-Dsonar.projectKey=org.opengroup.osdu:$CI_PROJECT_NAME
-Dsonar.organization=osdu"
if [ -n "$CI_MERGE_REQUEST_IID" ]; then
SONAR_SCANNER_OPTS="$SONAR_SCANNER_OPTS
-Dsonar.pullrequest.gitlab.api_url=https://community.opengroup.org/api/v4
-Dsonar.pullrequest.gitlab.project_id=$CI_PROJECT_ID
-Dsonar.pullrequest.key=$CI_MERGE_REQUEST_IID
-Dsonar.pullrequest.branch=$CI_COMMIT_REF_NAME
-Dsonar.pullrequest.base=$CI_MERGE_REQUEST_TARGET_BRANCH_NAME"
fi
-
sonar-scanner
allow_failure
:
true
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