From ce1b9966b1e71ccdc930fbd13c0045e4bdf4879f Mon Sep 17 00:00:00 2001 From: "Ross Buggins (NHS)" Date: Fri, 20 Sep 2024 10:36:55 +0100 Subject: [PATCH] Sonar (#55) * Create sonar-project.properties Adding sonar project properties with env vars * Update Makefile use base url if set * default url --- docs/Makefile | 6 +++++- sonar-project.properties | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 sonar-project.properties diff --git a/docs/Makefile b/docs/Makefile index b458da2..5c7680c 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -1,4 +1,4 @@ -BASE_URL ?= "/" +BASE_URL ?= "" VERSION ?= "" SHELL = /bin/bash @@ -21,6 +21,10 @@ install: s serve: bundle exec jekyll serve --trace --livereload +define baseurlparam = +$(if $(BASE_URL),-- --baseurl $(BASE_URL),-- --baseurl "") +endef + build: version npm run build $(baseurlparam) diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..0219b68 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,3 @@ +sonar.organization=${env.SONAR_ORGANISATION_KEY} +sonar.projectKey=${env.SONAR_PROJECT_KEY} +sonar.sources=.