feat: init sonarqube infra as code state
This commit is contained in:
Executable
+32
@@ -0,0 +1,32 @@
|
||||
FROM sonarqube:25.9.0.112764-community
|
||||
|
||||
# Установка дополнительных плагинов. Ставим и настраиваем под рутом
|
||||
USER root
|
||||
|
||||
# Скачиваем все плагины одной командой для минимизации слоев
|
||||
RUN apt-get update && apt-get install -y unzip && \
|
||||
wget -O /opt/sonarqube/extensions/plugins/sonar-auth-oidc-plugin-3.0.0.jar \
|
||||
https://github.com/vaulttec/sonar-auth-oidc/releases/download/v3.0.0/sonar-auth-oidc-plugin-3.0.0.jar && \
|
||||
wget -O /opt/sonarqube/extensions/plugins/sonar-cxx-plugin-2.2.2.1332.jar \
|
||||
https://github.com/SonarOpenCommunity/sonar-cxx/releases/download/cxx-2.2.1/sonar-cxx-plugin-2.2.1.1248.jar && \
|
||||
wget -O /opt/sonarqube/extensions/plugins/sonarqube-community-branch-plugin-25.9.0.jar \
|
||||
https://github.com/mc1arke/sonarqube-community-branch-plugin/releases/download/25.9.0/sonarqube-community-branch-plugin-25.9.0.jar && \
|
||||
wget -O /opt/sonarqube/extensions/plugins/sonar-cnes-report-5.0.2.jar \
|
||||
https://github.com/cnescatlab/sonar-cnes-report/releases/download/5.0.2/sonar-cnes-report-5.0.2.jar && \
|
||||
wget -O /opt/sonarqube/extensions/plugins/sonar-zpa-plugin-4.0.0.jar \
|
||||
https://github.com/felipebz/zpa/releases/download/4.0.0/sonar-zpa-plugin-4.0.0.jar && \
|
||||
# Скачиваем и распаковываем webapp для branch plugin
|
||||
wget -O /tmp/sonarqube-webapp.zip \
|
||||
https://github.com/mc1arke/sonarqube-community-branch-plugin/releases/download/25.9.0/sonarqube-webapp.zip && \
|
||||
unzip -o /tmp/sonarqube-webapp.zip -d /tmp/webapp && \
|
||||
rm -rf /opt/sonarqube/web/* && \
|
||||
cp -r /tmp/webapp/* /opt/sonarqube/web/ && \
|
||||
rm -rf /tmp/webapp /tmp/sonarqube-webapp.zip && \
|
||||
# Чистим кэш apt и удаляем unzip
|
||||
apt-get remove -y unzip && \
|
||||
apt-get autoremove -y && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Возвращаем к пользователю по умолчанию для продакшена
|
||||
USER sonarqube
|
||||
Reference in New Issue
Block a user