Skip to content

Commit 312fba7

Browse files
Bot Updating Templated Files
1 parent 3b94387 commit 312fba7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Jenkinsfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,11 @@ pipeline {
9494
env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.DOCKERHUB_IMAGE + '/tags/'
9595
env.PULL_REQUEST = env.CHANGE_ID
9696
env.TEMPLATED_FILES = 'Jenkinsfile README.md LICENSE .editorconfig ./.github/CONTRIBUTING.md ./.github/FUNDING.yml ./.github/ISSUE_TEMPLATE/config.yml ./.github/ISSUE_TEMPLATE/issue.bug.yml ./.github/ISSUE_TEMPLATE/issue.feature.yml ./.github/PULL_REQUEST_TEMPLATE.md ./.github/workflows/external_trigger_scheduler.yml ./.github/workflows/greetings.yml ./.github/workflows/package_trigger_scheduler.yml ./.github/workflows/call_issue_pr_tracker.yml ./.github/workflows/call_issues_cron.yml ./.github/workflows/permissions.yml ./.github/workflows/external_trigger.yml'
97+
if ( env.SYFT_IMAGE_TAG == null ) {
98+
env.SYFT_IMAGE_TAG = 'latest'
99+
}
97100
}
101+
echo "Using syft image tag ${SYFT_IMAGE_TAG}"
98102
sh '''#! /bin/bash
99103
echo "The default github branch detected as ${GH_DEFAULT_BRANCH}" '''
100104
script{
@@ -778,7 +782,7 @@ pipeline {
778782
docker run --rm \
779783
-v /var/run/docker.sock:/var/run/docker.sock:ro \
780784
-v ${TEMPDIR}:/tmp \
781-
ghcr.io/anchore/syft:latest \
785+
ghcr.io/anchore/syft:${SYFT_IMAGE_TAG} \
782786
${LOCAL_CONTAINER} -o table=/tmp/package_versions.txt
783787
NEW_PACKAGE_TAG=$(md5sum ${TEMPDIR}/package_versions.txt | cut -c1-8 )
784788
echo "Package tag sha from current packages in buit container is ${NEW_PACKAGE_TAG} comparing to old ${PACKAGE_TAG} from github"
@@ -888,6 +892,7 @@ pipeline {
888892
-e WEB_AUTH=\"${CI_AUTH}\" \
889893
-e WEB_PATH=\"${CI_WEBPATH}\" \
890894
-e NODE_NAME=\"${NODE_NAME}\" \
895+
-e SYFT_IMAGE_TAG=\"${CI_SYFT_IMAGE_TAG:-${SYFT_IMAGE_TAG}}\" \
891896
-t ghcr.io/linuxserver/ci:latest \
892897
python3 test_build.py'''
893898
}

0 commit comments

Comments
 (0)