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
d5b15f3d
Commit
d5b15f3d
authored
Jun 03, 2021
by
Guilhem Saurel
Browse files
get builds gitlab
parent
9b20840a
Pipeline
#14808
failed with stage
in 3 minutes and 7 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
rainboard/models.py
View file @
d5b15f3d
...
...
@@ -345,7 +345,9 @@ class Project(Links, NamedModel, TimeStampedModel):
return
self
.
repo_set
.
get
(
forge__source
=
SOURCES
.
gitlab
,
namespace
=
self
.
main_namespace
)
def
ci_jobs
(
self
):
self
.
main_gitlab_repo
().
get_jobs_gitlab
()
r
=
self
.
main_gitlab_repo
()
r
.
get_jobs_gitlab
()
r
.
get_builds_gitlab
()
def
update
(
self
,
only_main_branches
=
True
):
if
self
.
main_namespace
is
None
:
...
...
@@ -591,7 +593,7 @@ class Repo(TimeStampedModel):
return
getattr
(
self
,
f
'get_builds_
{
self
.
forge
.
get_source_display
()
}
'
)()
def
get_builds_gitlab
(
self
):
for
pipeline
in
self
.
api_list
(
'/pipelines'
):
for
pipeline
in
self
.
api_list
(
'/pipelines'
,
limit
=
2
):
pid
,
ref
=
pipeline
[
'id'
],
pipeline
[
'ref'
]
if
self
.
project
.
tag_set
.
filter
(
name
=
ref
).
exists
():
continue
...
...
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