Skip to content

Commit

Permalink
Determine upstream actual tagging date rather than the commit for dai…
Browse files Browse the repository at this point in the history
…ly build status (#944)

* Use taggerdate for determining daily status build age

Signed-off-by: Andrew Leonard <anleonar@redhat.com>

* Use taggerdate for determining daily status build age

Signed-off-by: Andrew Leonard <anleonar@redhat.com>

* Use taggerdate for determining daily status build age

Signed-off-by: Andrew Leonard <anleonar@redhat.com>

* Use taggerdate for determining daily status build age

Signed-off-by: Andrew Leonard <anleonar@redhat.com>

* Use taggerdate for determining daily status build age

Signed-off-by: Andrew Leonard <anleonar@redhat.com>

* Use taggerdate for determining daily status build age

Signed-off-by: Andrew Leonard <anleonar@redhat.com>

---------

Signed-off-by: Andrew Leonard <anleonar@redhat.com>
  • Loading branch information
andrew-m-leonard authored Feb 28, 2024
1 parent ae3f0c6 commit d666e33
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/nightly_build_and_test_stats.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ def getOpenjdkBuildTagAge(String version, String tag) {
openjdkRepo = "https://github.com/openjdk/jdk8u.git"
}

def date = sh(returnStdout: true, script:"(rm -rf tmpRepo; git clone --depth 1 --branch ${tag} ${openjdkRepo} tmpRepo; cd tmpRepo; git log --tags --simplify-by-decoration --pretty=\"format:PUBLISH_DATE=%cI\") | grep PUBLISH_DATE | cut -d\"=\" -f2 | tr -d '\\n'")
def date = sh(returnStdout: true, script:"(rm -rf tmpRepo; git clone ${openjdkRepo} tmpRepo; cd tmpRepo; git for-each-ref --format=\"%(refname:short) %(taggerdate:format:%Y-%m-%dT%H:%M:%S%z)\" \"refs/tags/*\"; cd ..; rm -rf tmpRepo) | grep \"${tag}\" | cut -d\" \" -f2 | sed -e 's/.\\{22\\}/&:/1' | tr -d '\\n'")

def tagTs = Instant.parse(date).atZone(ZoneId.of('UTC'))
def now = ZonedDateTime.now(ZoneId.of('UTC'))
def days = ChronoUnit.DAYS.between(tagTs, now)
Expand Down

0 comments on commit d666e33

Please sign in to comment.