use pipx to isolate python packages
All checks were successful
ci/woodpecker/pr/build-package Pipeline was successful
ci/woodpecker/pr/build-container Pipeline was successful
ci/woodpecker/pr/docs Pipeline was successful

This commit is contained in:
Robert Kaussow 2023-12-14 10:53:43 +01:00
parent 4900fddb67
commit 2803889dcd
Signed by: xoxys
GPG Key ID: 4E692A2EAECC03C0
3 changed files with 12 additions and 4 deletions

View File

@ -24,7 +24,6 @@ steps:
TRIVY_NO_PROGRESS: "true" TRIVY_NO_PROGRESS: "true"
TRIVY_SEVERITY: HIGH,CRITICAL TRIVY_SEVERITY: HIGH,CRITICAL
TRIVY_TIMEOUT: 1m TRIVY_TIMEOUT: 1m
TRIVY_SKIP_FILES: /usr/local/bin/gomplate
publish-dockerhub: publish-dockerhub:
group: container group: container

View File

@ -33,7 +33,10 @@ ENV YAMLLINT_VERSION="${YAMLLINT_VERSION:-1.33.0}"
# renovate: datasource=github-releases depName=yannh/kubeconform # renovate: datasource=github-releases depName=yannh/kubeconform
ENV KUBECONFORM_VERSION="${KUBECONFORM_VERSION:-v0.6.4}" ENV KUBECONFORM_VERSION="${KUBECONFORM_VERSION:-v0.6.4}"
RUN apk --update add --no-cache python3 py3-pip curl make tar git bash && \ ENV PIPX_HOME=/opt/pipx
ENV PIPX_BIN_DIR=/usr/local/bin
RUN apk --update add --no-cache python3 pipx curl make tar git bash && \
apk --no-cache upgrade libcrypto3 libssl3 && \ apk --no-cache upgrade libcrypto3 libssl3 && \
curl -SsfL -o /usr/local/bin/gomplate "https://github.com/hairyhenderson/gomplate/releases/download/${GOMPLATE_VERSION}/gomplate_${TARGETOS}-${TARGETARCH}${TARGETVARIANT}" && \ curl -SsfL -o /usr/local/bin/gomplate "https://github.com/hairyhenderson/gomplate/releases/download/${GOMPLATE_VERSION}/gomplate_${TARGETOS}-${TARGETARCH}${TARGETVARIANT}" && \
curl -SsfL -o /usr/local/bin/url-parser "https://github.com/thegeeklab/url-parser/releases/download/${URL_PARSER_VERSION}/url-parser-${TARGETOS}-${TARGETARCH}${TARGETVARIANT//v/-}" && \ curl -SsfL -o /usr/local/bin/url-parser "https://github.com/thegeeklab/url-parser/releases/download/${URL_PARSER_VERSION}/url-parser-${TARGETOS}-${TARGETARCH}${TARGETVARIANT//v/-}" && \
@ -45,9 +48,11 @@ RUN apk --update add --no-cache python3 py3-pip curl make tar git bash && \
"prettier@$PRETTIER_VERSION" \ "prettier@$PRETTIER_VERSION" \
"spellchecker-cli@$SPELLCHECKER_VERSION" \ "spellchecker-cli@$SPELLCHECKER_VERSION" \
"js-beautify@$JSBEAUTIFY_VERSION" && \ "js-beautify@$JSBEAUTIFY_VERSION" && \
pip install -qq --no-cache-dir yamllint=="$YAMLLINT_VERSION" && \ pipx install --include-deps yamllint=="$YAMLLINT_VERSION" && \
$PIPX_HOME/shared/bin/pip install -U pip setuptools && \
rm -rf /var/cache/apk/* && \ rm -rf /var/cache/apk/* && \
rm -rf /tmp/* rm -rf /tmp/* && \
rm -rf /root/.cache/
ADD overlay/ / ADD overlay/ /

4
trivy.yaml Normal file
View File

@ -0,0 +1,4 @@
---
scan:
skip-files:
- /usr/local/bin/gomplate