Skip to content

Commit 5304b54

Browse files
Bot Updating Templated Files
1 parent 3e6dc58 commit 5304b54

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

Jenkinsfile

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,10 @@ pipeline {
8181
script{
8282
env.PACKAGE_TAG = sh(
8383
script: '''#!/bin/bash
84-
http_code=$(curl --write-out %{http_code} -s -o /dev/null \
85-
https://raw.githubusercontent.com/${LS_USER}/${LS_REPO}/master/package_versions.txt)
86-
if [[ "${http_code}" -ne 200 ]] ; then
87-
echo none
84+
if [ -e package_versions.txt ] ; then
85+
cat package_versions.txt | md5sum | cut -c1-8
8886
else
89-
curl -s \
90-
https://raw.githubusercontent.com/${LS_USER}/${LS_REPO}/master/package_versions.txt \
91-
| md5sum | cut -c1-8
87+
echo none
9288
fi''',
9389
returnStdout: true).trim()
9490
}
@@ -112,7 +108,7 @@ pipeline {
112108
steps{
113109
script{
114110
env.EXT_RELEASE_CLEAN = sh(
115-
script: '''echo ${EXT_RELEASE} | sed 's/[~,%@+;:]//g' ''',
111+
script: '''echo ${EXT_RELEASE} | sed 's/[~,%@+;:/]//g' ''',
116112
returnStdout: true).trim()
117113
}
118114
}
@@ -333,7 +329,7 @@ pipeline {
333329
chmod 777 /tmp/package_versions.txt'
334330
elif [ "${DIST_IMAGE}" == "ubuntu" ]; then
335331
docker run --rm --entrypoint '/bin/sh' -v ${TEMPDIR}:/tmp ${LOCAL_CONTAINER} -c '\
336-
apt -qq list --installed | awk "{print \$1,\$2}" > /tmp/package_versions.txt && \
332+
apt list -qq --installed > /tmp/package_versions.txt && \
337333
chmod 777 /tmp/package_versions.txt'
338334
fi
339335
NEW_PACKAGE_TAG=$(md5sum ${TEMPDIR}/package_versions.txt | cut -c1-8 )

0 commit comments

Comments
 (0)