Merge pull request #3015 from Vogtinator/bcipublishstrat

Attempt to publish BCI repos more often
This commit is contained in:
Dirk Mueller 2023-09-12 11:26:33 +02:00 committed by GitHub
commit 75e93b714f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 5 deletions

View File

@ -131,7 +131,7 @@ pipelines:
group: BCI
lock_behavior: unlockWhenFinished
timer:
spec: 0 23 9 ? * *
spec: 0 23 * ? * *
only_on_changes: false
materials:
git:
@ -239,7 +239,7 @@ pipelines:
group: BCI
lock_behavior: unlockWhenFinished
timer:
spec: 0 23 9 ? * *
spec: 0 23 * ? * *
only_on_changes: false
materials:
git:
@ -347,7 +347,7 @@ pipelines:
group: BCI
lock_behavior: unlockWhenFinished
timer:
spec: 0 23 9 ? * *
spec: 0 23 * ? * *
only_on_changes: false
materials:
git:
@ -455,7 +455,7 @@ pipelines:
group: BCI
lock_behavior: unlockWhenFinished
timer:
spec: 0 23 9 ? * *
spec: 0 23 * ? * *
only_on_changes: false
materials:
git:

View File

@ -131,7 +131,7 @@ pipelines:
group: BCI
lock_behavior: unlockWhenFinished
timer:
spec: 0 23 9 ? * *
spec: 0 23 * ? * *
only_on_changes: false
materials:
git:

View File

@ -120,6 +120,14 @@ class BCIRepoPublisher(ToolBase.ToolBase):
self.logger.info('Current build already published, nothing to do.')
return
# If the last published build is less than a day old, don't publish
newest_published_mtime = max([int(pkg['published_mtime']) for pkg in packages])
published_build_age_hours = int(time.time() - newest_published_mtime) // (60 * 60)
if published_build_age_hours < 24:
self.logger.info('Current published build less than a day old '
f'({published_build_age_hours}h).')
return
# Check openQA results
openqa_passed = True
for pkg in packages: