Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Gepetto
dashboard
Commits
a6688d8b
Commit
a6688d8b
authored
Feb 11, 2019
by
Guilhem Saurel
Browse files
allow_failure when no image has been succesffully built in a week
parent
b0d509d3
Pipeline
#2761
passed with stages
in 1 minute and 18 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
rainboard/models.py
View file @
a6688d8b
...
...
@@ -9,6 +9,7 @@ from django.db.models import Q
from
django.db.models.functions
import
Length
from
django.db.utils
import
DataError
from
django.template.loader
import
get_template
from
django.utils
import
timezone
from
django.utils.dateparse
import
parse_datetime
from
django.utils.safestring
import
mark_safe
...
...
@@ -819,6 +820,9 @@ class Image(models.Model):
self
.
image
=
r
.
json
()[
'fsLayers'
][
0
][
'blobSum'
].
split
(
':'
)[
1
][:
12
]
self
.
created
=
parse_datetime
(
json
.
loads
(
r
.
json
()[
'history'
][
0
][
'v1Compatibility'
])[
'created'
])
self
.
save
()
if
not
self
.
allow_failure
and
(
timezone
.
now
()
-
self
.
created
).
days
>
7
:
self
.
allow_failure
=
True
self
.
save
()
class
CIBuild
(
models
.
Model
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment