aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--scripts/Dockerfile.sonarcloud3
-rw-r--r--scripts/build-sonar.sh5
-rw-r--r--scripts/docker-compose-sonar.yml2
3 files changed, 8 insertions, 2 deletions
diff --git a/scripts/Dockerfile.sonarcloud b/scripts/Dockerfile.sonarcloud
index ad8b30ef7..edfe986a0 100644
--- a/scripts/Dockerfile.sonarcloud
+++ b/scripts/Dockerfile.sonarcloud
@@ -1,4 +1,5 @@
-FROM ubuntu:focal
+FROM --platform=linux/amd64 ubuntu:focal
+
ENV DEBIAN_FRONTEND=noninteractive
WORKDIR /workspace
COPY Makefile versions.cmake ./
diff --git a/scripts/build-sonar.sh b/scripts/build-sonar.sh
index 7177fbc74..80ae38175 100644
--- a/scripts/build-sonar.sh
+++ b/scripts/build-sonar.sh
@@ -13,7 +13,12 @@
#!/bin/bash
+# Download docker compose
sudo curl -L "https://github.com/docker/compose/releases/download/1.23.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
+# Update/Init submodules
+git submodule update --init --recursive
+
+# Run sonarscanner
docker-compose -f docker-compose-sonar.yml up
diff --git a/scripts/docker-compose-sonar.yml b/scripts/docker-compose-sonar.yml
index d400d7517..198490546 100644
--- a/scripts/docker-compose-sonar.yml
+++ b/scripts/docker-compose-sonar.yml
@@ -12,7 +12,7 @@ services:
PROJECT_KEY: $PROJECT_KEY
PROJECT_ORGANIZATION: $PROJECT_ORGANIZATION
volumes:
- - ..:/workspace
+ - ..:/workspace:z
command:
- |
/workspace/scripts/run-sonar.sh \ No newline at end of file