mirror of
https://github.com/status-im/status-mobile.git
synced 2025-02-04 21:05:18 +00:00
avoid incosistent timestamps by using parent start time if available
Signed-off-by: Jakub Sokołowski <jakub@status.im> Signed-off-by: Igor Mandrigin <i@mandrigin.ru>
This commit is contained in:
parent
256401c417
commit
bf51592496
@ -163,8 +163,15 @@ def uploadArtifact(path) {
|
|||||||
return "https://${bucket}.${domain}/${getFilename(path)}"
|
return "https://${bucket}.${domain}/${getFilename(path)}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def parentOrCurrentBuild() {
|
||||||
|
def c = currentBuild.rawBuild.getCause(hudson.model.Cause$UpstreamCause)
|
||||||
|
if (c == null) { return currentBuild }
|
||||||
|
return c.getUpstreamRun()
|
||||||
|
}
|
||||||
|
|
||||||
def timestamp() {
|
def timestamp() {
|
||||||
def now = new Date(currentBuild.timeInMillis)
|
/* we use parent if available to make timestmaps consistent */
|
||||||
|
def now = new Date(parentOrCurrentBuild().timeInMillis)
|
||||||
return now.format('yyMMdd-HHmmss', TimeZone.getTimeZone('UTC'))
|
return now.format('yyMMdd-HHmmss', TimeZone.getTimeZone('UTC'))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user