File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -336,17 +336,22 @@ pipeline {
336
336
apt -qq list --installed | awk "{print \$ 1,\$ 2}" > /tmp/package_versions.txt && \
337
337
chmod 777 /tmp/package_versions.txt'
338
338
fi
339
- if [ "$(md5sum ${TEMPDIR}/package_versions.txt | cut -c1-8 )" != "${PACKAGE_TAG}" ]; then
339
+ NEW_PACKAGE_TAG=$(md5sum ${TEMPDIR}/package_versions.txt | cut -c1-8 )
340
+ echo "Package tag sha from current packages in buit container is ${NEW_PACKAGE_TAG} comparing to old ${PACKAGE_TAG} from github"
341
+ if [ "${NEW_PACKAGE_TAG}" != "${PACKAGE_TAG}" ]; then
340
342
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/${LS_REPO}
341
343
git --git-dir ${TEMPDIR}/${LS_REPO}/.git checkout -f master
342
344
cp ${TEMPDIR}/package_versions.txt ${TEMPDIR}/${LS_REPO}/
343
345
cd ${TEMPDIR}/${LS_REPO}/
344
- git --git-dir ${TEMPDIR}/${LS_REPO}/.git add package_versions.txt
345
- git --git-dir ${TEMPDIR}/${LS_REPO}/.git commit -m 'Bot Updating Package Versions'
346
- git --git-dir ${TEMPDIR}/${LS_REPO}/.git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git --all
346
+ wait
347
+ git add package_versions.txt
348
+ git commit -m 'Bot Updating Package Versions'
349
+ git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git --all
347
350
echo "true" > /tmp/packages-${COMMIT_SHA}-${BUILD_NUMBER}
351
+ echo "Package tag updated, stopping build process"
348
352
else
349
353
echo "false" > /tmp/packages-${COMMIT_SHA}-${BUILD_NUMBER}
354
+ echo "Package tag is same as previous continue with build process"
350
355
fi
351
356
rm -Rf ${TEMPDIR}'''
352
357
script{
You can’t perform that action at this time.
0 commit comments