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
Compare revisions
d15be9b16181f5f172d51b13966e0e44bd34f55d to 047bc2e9e1c2ef6eed1c04806c2cba8e08bb1c3e
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
dojo_project/projects/shared/nodeclientsharedcode
Select target project
No results found
047bc2e9e1c2ef6eed1c04806c2cba8e08bb1c3e
Select Git revision
Branches
ask-user-to-delete-exercises-on-duplicates
jw_sonar
jw_sonar_backup
main
move-to-esm-only
open_tool_for_self_hosting
v5.0
v6.0
Tags
v4.1
v4.2
10 results
Swap
Target
dojo_project/projects/shared/nodeclientsharedcode
Select target project
dojo_project/projects/shared/nodeclientsharedcode
1 result
d15be9b16181f5f172d51b13966e0e44bd34f55d
Select Git revision
Branches
ask-user-to-delete-exercises-on-duplicates
jw_sonar
jw_sonar_backup
main
move-to-esm-only
open_tool_for_self_hosting
v5.0
v6.0
Tags
v4.1
v4.2
10 results
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (2)
Add allowSonarFailure
· 8957b259
joel.vonderwe
authored
11 months ago
8957b259
Fix sonar success bug
· 047bc2e9
joel.vonderwe
authored
11 months ago
047bc2e9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
helpers/Dojo/AssignmentValidator.ts
+10
-5
10 additions, 5 deletions
helpers/Dojo/AssignmentValidator.ts
models/Assignment.ts
+1
-0
1 addition, 0 deletions
models/Assignment.ts
with
11 additions
and
5 deletions
helpers/Dojo/AssignmentValidator.ts
View file @
047bc2e9
...
@@ -300,13 +300,18 @@ class AssignmentValidator {
...
@@ -300,13 +300,18 @@ class AssignmentValidator {
this
.
newSubStep
(
'
SONAR_RUN
'
,
'
Run sonar analysis
'
);
this
.
newSubStep
(
'
SONAR_RUN
'
,
'
Run sonar analysis
'
);
const
runSuccess
=
SonarAnalyzer
.
runAnalysis
(
assignment
.
sonarKey
,
assignment
.
language
,
assignmentFile
.
buildLine
);
const
runSuccess
=
SonarAnalyzer
.
runAnalysis
(
assignment
.
sonarKey
,
assignment
.
language
,
assignmentFile
.
buildLine
);
if
(
runSuccess
)
{
if
(
!
runSuccess
)
{
this
.
emitError
(
`Sonar gate failed`
,
'
Sonar analysis failure
'
,
AssignmentCheckerError
.
SONAR_ANALYSIS_FAILED
);
if
(
!
assignment
.
allowSonarFailure
)
{
return
;
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
View file @
047bc2e9
...
@@ -13,6 +13,7 @@ interface Assignment {
...
@@ -13,6 +13,7 @@ interface Assignment {
gitlabLastInfoDate
:
string
;
gitlabLastInfoDate
:
string
;
published
:
boolean
;
published
:
boolean
;
useSonar
:
boolean
;
useSonar
:
boolean
;
allowSonarFailure
:
boolean
;
sonarKey
:
string
;
sonarKey
:
string
;
sonarCreationInfo
:
SonarProjectCreation
;
sonarCreationInfo
:
SonarProjectCreation
;
language
:
Language
;
language
:
Language
;
...
...
This diff is collapsed.
Click to expand it.