| 1 |
# ============================================================================== |
| 2 |
# Copyright (C) Intel Corporation |
| 3 |
# |
| 4 |
# SPDX-License-Identifier: MIT |
| 5 |
# ============================================================================== |
| 6 |
|
| 7 |
ARG DOCKER_REGISTRY |
| 8 |
|
| 9 |
FROM ${DOCKER_REGISTRY}maven:3-jdk-11 AS coverity_install |
| 10 |
|
| 11 |
SHELL ["/bin/bash", "-xo", "pipefail", "-c"] |
| 12 |
|
| 13 |
ARG COV_ANALYSIS_LINUX_URL |
| 14 |
ARG COV_REPORTS_LINUX_URL |
| 15 |
ARG COV_LICENSE_URL |
| 16 |
|
| 17 |
RUN mkdir /opt/coverity \ |
| 18 |
&& curl --silent --show-error -o /tmp/cov-analysis-linux64.sh \ |
| 19 |
-k ${COV_ANALYSIS_LINUX_URL} \ |
| 20 |
&& curl --silent --show-error -o /tmp/cov-reports-linux64.sh \ |
| 21 |
-k ${COV_REPORTS_LINUX_URL} \ |
| 22 |
&& curl --silent --show-error -o /opt/coverity/license.dat \ |
| 23 |
-k ${COV_LICENSE_URL} \ |
| 24 |
&& chmod 777 /tmp/*.sh \ |
| 25 |
&& /tmp/cov-reports-linux64.sh -q \ |
| 26 |
--installation.dir=/opt/coverity/reports/ \ |
| 27 |
&& /tmp/cov-analysis-linux64.sh -q \ |
| 28 |
--installation.dir=/opt/coverity/analysis/ \ |
| 29 |
--license.agreement=agree \ |
| 30 |
--license.region=0 \ |
| 31 |
--license.type.choice=0 \ |
| 32 |
--license.cov.path=/opt/coverity/license.dat \ |
| 33 |
--component.sdk=false \ |
| 34 |
--component.skip.documentation=true |
| 35 |
|
| 36 |
ARG DOCKER_REGISTRY |
| 37 |
|
| 38 |
HEALTHCHECK CMD ls /opt/coverity || exit 1 |
| 39 |
|
| 40 |
FROM ${DOCKER_REGISTRY}vpl_build:ubuntu |
| 41 |
|
| 42 |
WORKDIR /setup |
| 43 |
COPY packages.txt packages.txt |
| 44 |
|
| 45 |
ARG DEBIAN_FRONTEND=noninteractive |
| 46 |
|
| 47 |
RUN apt-get update \ |
| 48 |
&& xargs -a packages.txt apt-get install -y --no-install-recommends \ |
| 49 |
&& rm -rf /var/lib/apt/lists/* |
| 50 |
ENV PATH="/opt/coverity/analysis/bin:/opt/coverity/reports/bin:${PATH}" |
| 51 |
COPY --from=coverity_install /opt/coverity /opt/coverity |
| 52 |
|
| 53 |
ARG COV_TOOLS_URL |
| 54 |
ARG COV_REPORT_TOOL |
| 55 |
RUN pipx install --pip-args="--extra-index-url ${COV_TOOLS_URL}" ${COV_REPORT_TOOL} |
| 56 |
ENV PATH="${PATH}:/root/.local/bin" |
| 57 |
|
| 58 |
HEALTHCHECK CMD gcc --version || exit 1 |