Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
NodeClientSharedCode
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
Shared
NodeClientSharedCode
Commits
a4d25ec9
Commit
a4d25ec9
authored
10 months ago
by
joel.vonderwe
Committed by
michael.minelli
1 month ago
Browse files
Options
Downloads
Patches
Plain Diff
Add allowSonarFailure
parent
cd789d8c
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
helpers/Dojo/AssignmentValidator.ts
+9
-4
9 additions, 4 deletions
helpers/Dojo/AssignmentValidator.ts
models/Assignment.ts
+1
-0
1 addition, 0 deletions
models/Assignment.ts
with
10 additions
and
4 deletions
helpers/Dojo/AssignmentValidator.ts
+
9
−
4
View file @
a4d25ec9
...
...
@@ -314,12 +314,17 @@ class AssignmentValidator {
const
runSuccess
=
SonarAnalyzer
.
runAnalysis
(
this
.
assignment
.
sonarKey
,
this
.
assignment
.
language
,
this
.
assignmentFile
.
buildLine
);
if
(
runSuccess
)
{
this
.
emitError
(
`Sonar gate failed`
,
'
Sonar analysis failure
'
,
AssignmentCheckerError
.
SONAR_ANALYSIS_FAILED
);
throw
new
Error
();
if
(
!
this
.
assignment
.
allowSonarFailure
)
{
this
.
emitError
(
`Sonar gate failed`
,
'
Sonar analysis failure
'
,
AssignmentCheckerError
.
SONAR_ANALYSIS_FAILED
);
return
;
}
else
{
this
.
endSubStep
(
'
Sonar gate failed, you should check the sonar project
'
,
false
);
}
}
else
{
this
.
endSubStep
(
'
Sonar gate passed
'
,
false
);
}
this
.
endSubStep
(
'
Sonar gate passed
'
,
false
);
this
.
endStep
(
'
Sonar analysis
success
'
,
false
);
this
.
endStep
(
'
Sonar analysis
finished
'
,
false
);
}
}
...
...
This diff is collapsed.
Click to expand it.
models/Assignment.ts
+
1
−
0
View file @
a4d25ec9
...
...
@@ -13,6 +13,7 @@ interface Assignment {
gitlabLastInfoDate
:
string
;
published
:
boolean
;
useSonar
:
boolean
;
allowSonarFailure
:
boolean
;
sonarKey
:
string
;
sonarCreationInfo
:
SonarProjectCreation
;
language
:
Language
;
...
...
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