[
https://issues.jboss.org/browse/JBIDE-22757?page=com.atlassian.jira.plugi...
]
Nick Boldt commented on JBIDE-22757:
------------------------------------
Using BUILD_ID is no longer "fine" since for 7 years it's been a
yyyy-mm-dd_HH-MM-SS timestamp and now it's the same value as BUILD_NUMBER. So you can
split hairs and say the problem is the scripts or the problem is the API in Jenkins has
changed; either way, it's a problem that NEEDS fixing.
Without the timestamps, we need another metric to decide when jbosstools-cleanup.sh should
purge old folders. I suppose we could check for creation dates, rather than using the
folder name.
Meanwhile, to purge incorrectly named build folders (eg., 1000-B1000 instead of
2016-07-20_12-34-56-B1000) & invalid 'latest' symlinks, I've used:
{code}cd ~/JBDS-ssh/10.0/snapshots/builds
for d in $(find jbosstools-* devstudio* -maxdepth 1 -mindepth 1 -regextype posix-extended
-regex '.*/[0-9]+-B[0-9]+' -type d); do echo $d; { rm -fr ${d} & } ; done
for d in $(find . -maxdepth 2 -mindepth 2 -name latest); do e=$(ls -la ${d} | grep -v
"2016-"); if [[ $e ]]; then echo $e; f=$(echo $e | sed
"s#.\+\(\./.\+/latest\).\+#\1#"); echo $f; rm -f $f;fi; done
{code}
Then again for JBT:
{code}
cd ~/TOOLS-ssh/neon/snapshots/builds
for d in $(find jbosstools-* devstudio* -maxdepth 1 -mindepth 1 -regextype posix-extended
-regex '.*/[0-9]+-B[0-9]+' -type d); do echo $d; { rm -fr ${d} & } ; done
for d in $(find . -maxdepth 2 -mindepth 2 -name latest); do e=$(ls -la ${d} | grep -v
"2016-"); if [[ $e ]]; then echo $e; f=$(echo $e | sed
"s#.\+\(\./.\+/latest\).\+#\1#"); echo $f; rm -f $f;fi; done
{code}
jenkins jobs no longer using BUILD_ID = a timestamp (Jenkins bug)
-----------------------------------------------------------------
Key: JBIDE-22757
URL:
https://issues.jboss.org/browse/JBIDE-22757
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: build
Affects Versions: 4.4.1.AM2
Reporter: Nick Boldt
Assignee: Nick Boldt
Priority: Blocker
Fix For: 4.4.1.AM2
Attachments: buildID-broken.png
Due to an upstream bug in Jenkins [1], [2], BUILD_ID now = BUILD_NUMBER.
[1]
https://issues.jenkins-ci.org/browse/JENKINS-26520
[2]
https://issues.jenkins-ci.org/browse/JENKINS-26626
So instead of timestamped build folders, we're seeing things like this:
!buildID-broken.png|thumbnail!
Workaround until fixed in Jenkins:
{code}BUILD_ID=`date -u +%Y-%m-%d_%H-%M-%S`{code}
Or, try using BUILD_TIMESTAMP instead?
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)