Adding on the sonar-scanner cli

This commit is contained in:
James Jones
2024-02-14 18:28:40 -05:00
parent bbc14f7a39
commit 32fe4b1aee

View File

@@ -1,6 +1,9 @@
ARG ARTIFACTORY ARG ARTIFACTORY
FROM ${ARTIFACTORY}/podman/stable:latest FROM ${ARTIFACTORY}/podman/stable:latest
ENV SONAR_SCANNER_VERSION=5.0.1.3006
ENV SONAR_SCANNER_HOME=/opt/sonar-scanner
RUN dnf install -y --nogpgcheck \ RUN dnf install -y --nogpgcheck \
https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm \ https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm \
https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm && \ https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm && \
@@ -32,6 +35,14 @@ RUN dnf install -y podman-docker buildah skopeo \
&& mv /tmp/eksctl /usr/bin \ && mv /tmp/eksctl /usr/bin \
&& touch /etc/containers/nodocker && touch /etc/containers/nodocker
RUN curl -L -o sonar-scanner.zip \
"https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-${SONAR_SCANNER_VERSION}-linux.zip" && \
unzip sonar-scanner.zip -d /opt && \
rm -f sonar-scanner.zip && \
mv /opt/sonar-scanner* "$SONAR_SCANNER_HOME"
ENV PATH=$SONAR_SCANNER_HOME/bin:$PATH
# Adding some Ansible Key and Timeout setting as well as accepting ssh-rsa # Adding some Ansible Key and Timeout setting as well as accepting ssh-rsa
ENV ANSIBLE_HOST_KEY_CHECKING=False \ ENV ANSIBLE_HOST_KEY_CHECKING=False \
ANSIBLE_TIMEOUT=120 \ ANSIBLE_TIMEOUT=120 \