The Jenkins pipeline that installs, builds, tests, validates, and analyzes the workbench, plus the separate code coverage job.
dist folders must be added to the backend security config.The graphdb-workbench project uses a Jenkins pipeline to automate installation, testing, building, validation, and SonarQube analysis.
The pipeline is configured to execute the following steps:
If new static folders are created in the dist folder to be published (or old ones are renamed), they must be added to the BE Spring Security configuration. Failure to do so will prevent the server from serving these resources, causing the Workbench to malfunction.
nodejs-22 Jenkins tool)SONAR_ENVIRONMENT=SonarCloudaws-large nodesnpm run install:cinpm run build in the same Dockerized environmentnpm run lintnpm run validatetranslation-report.json regardless of outcomemaster: regular scannpm run testpackages/shared-componentsdocker-compose.yaml)master branche2e-tests/fixturesdocker-compose-test.yamlThe project is public on SonarCloud (key Ontotext-AD_WB_migration_workbench, from sonar-project.js), so its
Web API answers without a token. For PR N:
K=Ontotext-AD_WB_migration_workbench
# Quality gate: each condition with its threshold and actual value
curl -s "https://sonarcloud.io/api/qualitygates/project_status?projectKey=$K&pullRequest=N"
# Open issues on new code: rule, file, line, message
curl -s "https://sonarcloud.io/api/issues/search?componentKeys=$K&pullRequest=N&resolved=false"
# Duplication per file (the gate fails above 3% on new code)
curl -s "https://sonarcloud.io/api/measures/component_tree?component=$K&pullRequest=N&metricKeys=new_duplicated_lines_density&qualifiers=FIL"
The gate fails on any new bug, code smell or vulnerability, and on more than 3% duplicated lines in new code.
It does not block merging: the only required check on master is continuous-integration/jenkins/pr-head.
configFileProviderCode coverage is run in a separate Jenkins job, which is triggered manually on demand, typically for feature branches.
Find the graphdb-workbench-coverage job in Jenkins.
Start it using the Build with Parameters option, specifying the Git branch you want to analyze.
After the job completes, the final HTML report with the results is available as a build artifact in Jenkins.
See also: Developers Guide