Commit 272f7129 authored by Jan Grewe's avatar Jan Grewe
Browse files

update sonar-scanner

add ansible-lint
use short hash in example
parent a9cdf6bf
Pipeline #594 failed with stages
in 3 minutes and 41 seconds
......@@ -9,4 +9,3 @@ push:
stage: push
script:
- docker push registry.faked.org/gitlab-ci/sonar-scanner:latest
FROM openjdk:8-alpine
MAINTAINER Jan Grewe <jan@faked.org>
ENV VERSION 3.0.3.778
ENV VERSION 3.3.0.1492
RUN apk add --no-cache curl grep sed unzip
RUN curl -skLo /tmp/sonar-scanner.zip https://sonarsource.bintray.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-${VERSION}-linux.zip \
RUN apk add --no-cache \
curl \
gcc \
grep \
libffi-dev \
musl-dev \
openssl-dev \
sed \
py3-pip \
python3-dev \
unzip
RUN curl -skLo /tmp/sonar-scanner.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-${VERSION}-linux.zip \
&& unzip /tmp/sonar-scanner.zip -d /opt \
&& mv /opt/sonar-scanner-${VERSION}-linux /opt/sonar-scanner \
&& rm /tmp/sonar-scanner.zip
RUN sed -i 's/use_embedded_jre=true/use_embedded_jre=false/g' /opt/sonar-scanner/bin/sonar-scanner
RUN pip3 install ansible-lint
ENV SONAR_RUNNER_HOME=/opt/sonar-scanner
ENV PATH $PATH:/opt/sonar-scanner/bin
WORKDIR /src
......@@ -11,7 +11,7 @@ sonarqube:
image: registry.faked.org/gitlab-ci/sonar-scanner
stage: test
script:
- sonar-scanner -Dsonar.projectBaseDir=$(pwd) -Dsonar.projectVersion=${CI_COMMIT_SHA}
- sonar-scanner -Dsonar.projectBaseDir=$(pwd) -Dsonar.projectVersion=${CI_COMMIT_SHORT_SHA}
```
Make sure you put a `sonar-project.properties` file into the root of your repo:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment