Skip to content

Commit 1d6c1ce

Browse files
Copilotchefgs
andauthored
Audit and refresh devcontainer install URLs
Agent-Logs-Url: https://github.com/cloudengine-labs/devops_os/sessions/5a7ec5cb-5911-4929-a875-d57261636b95 Co-authored-by: chefgs <7605658+chefgs@users.noreply.github.com>
1 parent d48f0ae commit 1d6c1ce

1 file changed

Lines changed: 13 additions & 9 deletions

File tree

.devcontainer/Dockerfile

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ ARG INSTALL_KUBESEAL=true
3030
ARG INSTALL_FLUX=true
3131
ARG FLUX_VERSION=2.1.2
3232
ARG INSTALL_KIND=true
33+
ARG KIND_VERSION=0.20.0
3334
ARG INSTALL_MINIKUBE=true
3435
ARG INSTALL_OPENSHIFT_CLI=false
3536

@@ -42,8 +43,10 @@ ARG INSTALL_CMAKE=true
4243

4344
# Code analysis tools
4445
ARG INSTALL_SONARQUBE=true
46+
ARG SONAR_SCANNER_VERSION=4.8.0.2856
4547
ARG INSTALL_CHECKSTYLE=true
4648
ARG INSTALL_PMD=true
49+
ARG PMD_VERSION=7.0.0-rc3
4750
ARG INSTALL_ESLINT=true
4851
ARG INSTALL_PYLINT=true
4952

@@ -193,7 +196,7 @@ RUN if [ "$INSTALL_FLUX" = "true" ]; then \
193196

194197
# Install KinD if requested
195198
RUN if [ "$INSTALL_KIND" = "true" ]; then \
196-
curl -Lo /usr/local/bin/kind "https://kind.sigs.k8s.io/dl/v0.20.0/kind-$(uname)-amd64" \
199+
curl -fsSLo /usr/local/bin/kind "https://github.com/kubernetes-sigs/kind/releases/download/v${KIND_VERSION}/kind-${TARGETOS}-${TARGETARCH}" \
197200
&& chmod +x /usr/local/bin/kind; \
198201
fi
199202

@@ -245,11 +248,12 @@ RUN if [ "$INSTALL_ANT" = "true" ]; then \
245248

246249
# SonarQube Scanner
247250
RUN if [ "$INSTALL_SONARQUBE" = "true" ]; then \
248-
mkdir -p /opt/sonar-scanner \
249-
&& curl -sSLo /opt/sonar-scanner-cli.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.8.0.2856-linux.zip \
250-
&& unzip /opt/sonar-scanner-cli.zip -d /opt \
251-
&& mv /opt/sonar-scanner-* /opt/sonar-scanner \
252-
&& rm /opt/sonar-scanner-cli.zip \
251+
curl -fsSLo /tmp/sonar-scanner-cli.zip "https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-${SONAR_SCANNER_VERSION}-linux.zip" \
252+
&& rm -rf /opt/sonar-scanner /tmp/sonar-scanner \
253+
&& mkdir -p /tmp/sonar-scanner \
254+
&& unzip /tmp/sonar-scanner-cli.zip -d /tmp/sonar-scanner \
255+
&& mv "/tmp/sonar-scanner/sonar-scanner-${SONAR_SCANNER_VERSION}-linux" /opt/sonar-scanner \
256+
&& rm -rf /tmp/sonar-scanner /tmp/sonar-scanner-cli.zip \
253257
&& echo 'export PATH=$PATH:/opt/sonar-scanner/bin' >> /etc/bash.bashrc; \
254258
fi
255259

@@ -264,7 +268,7 @@ RUN if [ "$INSTALL_CHECKSTYLE" = "true" ]; then \
264268
# PMD
265269
RUN if [ "$INSTALL_PMD" = "true" ]; then \
266270
mkdir -p /opt/pmd \
267-
&& curl -sSLo /opt/pmd.zip https://github.com/pmd/pmd/releases/download/pmd_releases%2F7.0.0-rc3/pmd-bin-7.0.0-rc3.zip \
271+
&& curl -fsSLo /opt/pmd.zip "https://github.com/pmd/pmd/releases/download/pmd_releases/${PMD_VERSION}/pmd-dist-${PMD_VERSION}-bin.zip" \
268272
&& unzip /opt/pmd.zip -d /opt \
269273
&& mv /opt/pmd-bin-* /opt/pmd \
270274
&& rm /opt/pmd.zip \
@@ -308,8 +312,8 @@ RUN if [ "$INSTALL_PROMETHEUS" = "true" ]; then \
308312

309313
# Grafana
310314
RUN if [ "$INSTALL_GRAFANA" = "true" ]; then \
311-
wget -q -O - https://packages.grafana.com/gpg.key | gpg --dearmor | tee /usr/share/keyrings/grafana.gpg > /dev/null \
312-
&& echo "deb [signed-by=/usr/share/keyrings/grafana.gpg] https://packages.grafana.com/oss/deb stable main" | tee -a /etc/apt/sources.list.d/grafana.list \
315+
wget -q -O - https://apt.grafana.com/gpg.key | gpg --dearmor | tee /usr/share/keyrings/grafana.gpg > /dev/null \
316+
&& echo "deb [signed-by=/usr/share/keyrings/grafana.gpg] https://apt.grafana.com stable main" | tee -a /etc/apt/sources.list.d/grafana.list \
313317
&& apt-get update \
314318
&& apt-get install -y grafana; \
315319
fi

0 commit comments

Comments
 (0)