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
bfe4672b
Commit
bfe4672b
authored
Jun 03, 2021
by
Guilhem Saurel
Browse files
pipelines results
parent
d5b15f3d
Pipeline
#14810
failed with stage
in 54 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
rainboard/models.py
View file @
bfe4672b
...
...
@@ -462,6 +462,19 @@ class Project(Links, NamedModel, TimeStampedModel):
link
=
repo
.
first
().
url
+
'/pipeline_schedules'
return
mark_safe
(
f
'<a href="
{
link
}
">
{
self
.
cron
()
}
</a>'
)
def
pipeline_results
(
self
):
""" Show state and link to latest master & devel gitlab pipelines """
repo
=
self
.
main_gitlab_repo
()
ret
=
[]
for
branch
in
[
'master'
,
'main'
,
'devel'
]:
build
=
repo
.
cibuild_set
.
filter
(
branch__name__endswith
=
branch
).
first
()
if
build
is
not
None
:
link
=
repo
.
url
+
f
'/-/pipelines/
{
build
.
build_id
}
'
sym
=
'✓'
if
build
.
passed
else
'✘'
ret
.
append
(
f
'<a href="
{
link
}
">
{
branch
}
:
{
sym
}
</a>'
)
return
mark_safe
(
'<br>'
.
join
(
ret
))
class
Repo
(
TimeStampedModel
):
name
=
models
.
CharField
(
max_length
=
200
)
...
...
rainboard/tables.py
View file @
bfe4672b
...
...
@@ -23,6 +23,7 @@ class NamespaceTable(StrippedTable):
class
ProjectTable
(
StrippedTable
):
pipeline_results
=
tables
.
Column
(
accessor
=
'pipeline_results'
,
orderable
=
False
)
commits_since
=
tables
.
Column
(
accessor
=
'commits_since'
,
orderable
=
False
)
repos
=
tables
.
Column
(
accessor
=
'repos'
,
orderable
=
False
)
issues
=
tables
.
Column
(
accessor
=
'open_issues'
,
orderable
=
False
)
...
...
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