diff options
author | Mauro Sardara <msardara@cisco.com> | 2022-08-12 12:28:13 +0200 |
---|---|---|
committer | Mauro Sardara <msardara@cisco.com> | 2022-08-12 12:31:31 +0200 |
commit | ce15c05a8a7d01cf7d92e81357aefa1f9b86a6d0 (patch) | |
tree | 9df7aac00afc385c26626dc1065f0af7dac60f0c /scripts/build-sonar.sh | |
parent | 94884d2a70bd65f9e85018aa154daa3d517d3ca8 (diff) |
ci(sonarscan): fixes for sonar build
- Add submodule init before running the docker compose up command
- Mount workspace with the :z flag to modify the selinux label of the directory
- Build docker image with amd64 architecture, as sonar build wrapper only exists for x64
Ref: HICN-741
Signed-off-by: Mauro Sardara <msardara@cisco.com>
Change-Id: I3cc3e285ce216eec9795011f67758df590dc6fec
Signed-off-by: Mauro Sardara <msardara@cisco.com>
Diffstat (limited to 'scripts/build-sonar.sh')
-rw-r--r-- | scripts/build-sonar.sh | 5 |
1 files changed, 5 insertions, 0 deletions
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 |