Skip to content

Commit

Permalink
correctly handle empty CI_DOCKERENV when adding LSIO_FIRST_PARTY
Browse files Browse the repository at this point in the history
  • Loading branch information
aptalca committed Aug 21, 2024
1 parent e99bee0 commit 61181b5
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion roles/generate-jenkins/templates/Jenkinsfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -945,6 +945,14 @@ pipeline {
}
sh '''#! /bin/bash
set -e
if grep -q 'docker-baseimage' <<< "${LS_REPO}"; then
echo "Detected baseimage, setting LSIO_FIRST_PARTY=true"
if [ -n "${CI_DOCKERENV}" ]; then
CI_DOCKERENV="LSIO_FIRST_PARTY=true|${CI_DOCKERENV}"
else
CI_DOCKERENV="LSIO_FIRST_PARTY=true"
fi
fi
docker pull ghcr.io/linuxserver/ci:latest
if [ "${MULTIARCH}" == "true" ]; then
docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} --platform=arm64
Expand Down Expand Up @@ -975,7 +983,7 @@ pipeline {
-e BASE=\"${DIST_IMAGE}\" \
-e SECRET_KEY=\"${S3_SECRET}\" \
-e ACCESS_KEY=\"${S3_KEY}\" \
-e DOCKER_ENV=\"{% if "docker-baseimage" in project_repo_name %}LSIO_FIRST_PARTY=true|{% endif %}${CI_DOCKERENV}\" \
-e DOCKER_ENV=\"${CI_DOCKERENV}\" \
-e WEB_SCREENSHOT=\"${CI_WEB}\" \
-e WEB_AUTH=\"${CI_AUTH}\" \
-e WEB_PATH=\"${CI_WEBPATH}\" \
Expand Down

0 comments on commit 61181b5

Please sign in to comment.