UNCLASSIFIED - NO CUI

Skip to content
Snippets Groups Projects
Commit e5e87beb authored by sean.melissari's avatar sean.melissari
Browse files

vendor scripts

parent d561a60b
No related branches found
No related tags found
2 merge requests!10Development,!4Update sonarqube Docker tag to v8.4
Pipeline #27178 failed
ARG BASE_REGISTRY=registry.access.redhat.com
ARG BASE_IMAGE=ubi8
ARG BASE_TAG=8.2
ARG BASE_REGISTRY=nexus-docker-secure.levelup-dev.io
ARG BASE_IMAGE=redhat/openjdk/openjdk11
ARG BASE_TAG=1.11
FROM sonarqube:8.4-enterprise AS build
FROM ${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG}
ARG SONARQUBE_VERSION=8.3.0.34182
LABEL org.opencontainers.image.title="SonarQube" \
org.opencontainers.image.description="SonarQube is an automatic code review tool to detect bugs, vulnerabilities and code smells in your code." \
org.opencontainers.image.licenses="LGPL-3.0-only" \
org.opencontainers.image.version="8.4-enterprise" \
maintainer="SonarSource"
ARG SONARQUBE_VERSION=8.4.0.35506
ENV SONAR_VERSION="${SONARQUBE_VERSION}" \
SONARQUBE_HOME="/opt/sonarqube" \
SQ_DATA_DIR="/opt/sonarqube/data" \
SQ_EXTENSIONS_DIR="/opt/sonarqube/extensions" \
SQ_LOGS_DIR="/opt/sonarqube/logs" \
SQ_TEMP_DIR="/opt/sonarqube/temp" \
ES_TMPDIR="/opt/sonarqube/temp" \
JAVA_HOME="/usr/lib/jvm/jre"
ES_TMPDIR="/opt/sonarqube/temp"
USER root
RUN set -ex \
&& groupadd -r -g 1000 sonarqube \
&& useradd -r -u 1000 -g sonarqube sonarqube \
&& dnf update -y \
&& dnf install -y java-11-openjdk-headless fontconfig freetype \
&& dnf install -y fontconfig freetype \
&& dnf clean all \
&& rm -rf /var/cache/dnf \
&& sed --in-place --expression="s?securerandom.source=file:/dev/random?securerandom.source=file:/dev/urandom?g" "${JAVA_HOME}/conf/security/java.security"
COPY --chown=sonarqube:sonarqube --from=build ${SONARQUBE_HOME} ${SONARQUBE_HOME}
COPY --chown=sonarqube:sonarqube scripts/*.sh ${SONARQUBE_HOME}/bin/
USER sonarqube
WORKDIR ${SONARQUBE_HOME}
EXPOSE 9000
HEALTHCHECK --start-period=180s CMD curl -f 127.0.0.1:9000
ENTRYPOINT ["bin/run.sh"]
CMD ["bin/sonar.sh"]
@Library('DCCSCR@master') _
dccscrPipeline(version: "8.3-enterprise")
dccscrPipeline(version: "8.4-enterprise")
#!/usr/bin/env bash
set -euo pipefail
declare -a sq_opts=()
set_prop_from_deprecated_env_var() {
if [ "$2" ]; then
sq_opts+=("-D$1=$2")
fi
}
# if nothing is passed, assume we want to run sonarqube server
if [ "$#" == 0 ]; then
set -- bin/sonar.sh
fi
# if first arg looks like a flag, assume we want to run sonarqube server with flags
if [ "${1:0:1}" = '-' ]; then
set -- bin/sonar.sh "$@"
fi
if [[ "$1" = 'bin/sonar.sh' ]]; then
chown -R "$(id -u):$(id -g)" "${SQ_DATA_DIR}" "${SQ_EXTENSIONS_DIR}" "${SQ_LOGS_DIR}" "${SQ_TEMP_DIR}" 2>/dev/null || :
chmod -R 700 "${SQ_DATA_DIR}" "${SQ_EXTENSIONS_DIR}" "${SQ_LOGS_DIR}" "${SQ_TEMP_DIR}" 2>/dev/null || :
# Allow the container to be started with `--user`
if [[ "$(id -u)" = '0' ]]; then
chown -R sonarqube:sonarqube "${SQ_DATA_DIR}" "${SQ_EXTENSIONS_DIR}" "${SQ_LOGS_DIR}" "${SQ_TEMP_DIR}"
exec su-exec sonarqube "$0" "$@"
fi
#
# Deprecated way to pass settings to SonarQube that will be removed in future versions.
# Please use environment variables (https://docs.sonarqube.org/latest/setup/environment-variables/)
# instead to customize SonarQube.
#
while IFS='=' read -r envvar_key envvar_value
do
if [[ "$envvar_key" =~ sonar.* ]] || [[ "$envvar_key" =~ ldap.* ]]; then
sq_opts+=("-D${envvar_key}=${envvar_value}")
fi
done < <(env)
#
# Deprecated environment variable mapping that will be removed in future versions.
# Please use environment variables from https://docs.sonarqube.org/latest/setup/environment-variables/
# instead of using these 4 environment variables below.
#
set_prop_from_deprecated_env_var "sonar.jdbc.username" "${SONARQUBE_JDBC_USERNAME:-}"
set_prop_from_deprecated_env_var "sonar.jdbc.password" "${SONARQUBE_JDBC_PASSWORD:-}"
set_prop_from_deprecated_env_var "sonar.jdbc.url" "${SONARQUBE_JDBC_URL:-}"
set_prop_from_deprecated_env_var "sonar.web.javaAdditionalOpts" "${SONARQUBE_WEB_JVM_OPTS:-}"
if [ ${#sq_opts[@]} -ne 0 ]; then
set -- "$@" "${sq_opts[@]}"
fi
fi
exec "$@"
#!/usr/bin/env bash
exec java -jar lib/sonar-application-"${SONAR_VERSION}".jar -Dsonar.log.console=true "$@"
  • jenkins-gitlab @jenkins-gitlab ·

    Pipeline Status: FAILURE
    FAILURE Stage: Build
    Branch: renovate/docker-sonarqube-8.x

    graph LR
      0([setup]):::INTERNAL_SUCCESS --> 1([Import Artifacts]):::NOT_BUILT --> 2((/)):::INTERNAL_SUCCESS --> 3([Stage Artifacts]):::NOT_BUILT --> 4((/)):::INTERNAL_SUCCESS --> 5([Build]):::FAILURE --> 6([Publish, Scan & Report]):::INTERNAL_FAILURE
    
    classDef SUCCESS font-size:10px
    classDef FAILURE fill:#f44, font-size:10px
    classDef SKIPPED font-size:10px
    classDef ABORTED fill:#889, font-size:10px
    classDef INTERNAL_SUCCESS font-size:10px, stroke-dasharray: 2, 1
    classDef INTERNAL_FAILURE fill:#f44, font-size:10px, stroke-dasharray: 2, 1
    classDef INTERNAL_SKIPPED font-size:10px, stroke-dasharray: 2, 1
    classDef INTERNAL_ABORTED fill:#889, font-size:10px, stroke-dasharray: 2, 1
    

    Error Log:

    + buildah bud --tls-verify=false --format=docker --loglevel=3 --storage-driver=vfs --build-arg BASE_REGISTRY=**** --build-arg BASE_IMAGE=redhat/openjdk/openjdk11 --build-arg BASE_TAG=1.11 -t ****/sonarsource/sonarqube/sonarqube8-enterprise:8.4-enterprise-testing --label dccscr.git.commit.id=e5e87beb48a2551e6cb0c1db535b79518ef3ec33 --label dccscr.git.commit.url=https://dccscr.dsop.io/dsop/sonarsource/sonarqube/sonarqube8-enterprise/tree/e5e87beb48a2551e6cb0c1db535b79518ef3ec33 --label dccscr.git.url=https://repo1.dsop.io/dsop/sonarsource/sonarqube/sonarqube8-enterprise.git --label dccscr.git.branch=renovate/docker-sonarqube-8.x --label dccscr.image.version=8.4-enterprise --label 'dccscr.image.build.date=Tue Jul  7 14:32:35 UTC 2020
    ' --label dccscr.image.build.id=2 --label dccscr.image.name=sonarqube8-enterprise --label dccscr.ironbank.approval.status=notapproved --label dccscr.ironbank.approval.url=TBD --label dccscr.ironbank.url=TBD --label dcar_status=notapproved .
    cannot find Containerfile or Dockerfile in context directory: stat /tmp/workspace/se_renovate_docker-sonarqube-8.x/Dockerfile: no such file or directory
    script returned exit code 1
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment