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
d002e0ea
Commit
d002e0ea
authored
Jul 11, 2018
by
Guilhem Saurel
Browse files
graph view, & use test make target instead of check
parent
9759f9d6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Dockerfile
View file @
d002e0ea
...
...
@@ -10,6 +10,7 @@ ADD requirements.txt ./
RUN
apt-get update
-qq
&&
apt-get
install
-qqy
\
apt-transport-https
\
git
\
graphviz
\
libpq-dev
\
netcat-openbsd
\
ssmtp
\
...
...
rainboard/models.py
View file @
d002e0ea
...
...
@@ -758,7 +758,7 @@ class Dependency(models.Model):
unique_together
=
(
'project'
,
'library'
)
def
__str__
(
self
):
return
'{self.project} depends on {self.library}: {self.robotpkg:d} {self.cmake:d}'
return
f
'
{
self
.
project
}
depends on
{
self
.
library
}
:
{
self
.
robotpkg
:
d
}
{
self
.
cmake
:
d
}
'
def
get_default_forge
(
project
):
...
...
rainboard/templates/rainboard/gitlab-ci.yml
View file @
d002e0ea
...
...
@@ -18,7 +18,7 @@ cache:
-
make checkout MASTER_REPOSITORY="dir ${CI_PROJECT_DIR}"
-
make install
-
cd work.$(hostname)/$(make show-var VARNAME=DISTNAME)
{
%
if project.tests %
}
- make
check
{
%
if project.tests %
}
- make
test
{
%
endif %
}
{
%
for image in robotpkg.valid_images %
}{{
image.get_job_name
}}
:
<<
:
*robotpkg-
{{
robotpkg
}}
...
...
rainboard/views.py
View file @
d002e0ea
...
...
@@ -105,3 +105,16 @@ def docker(request):
cmd
=
filters
.
pop
(
'cmd'
)
images
=
models
.
Image
.
objects
.
filter
(
**
filters
)
return
HttpResponse
(
'
\n
'
.
join
([
' '
.
join
(
getattr
(
image
,
cmd
)())
for
image
in
images
]),
content_type
=
"text/plain"
)
def
graph
(
request
):
with
open
(
'/tmp/graph'
,
'w'
)
as
f
:
print
(
'digraph {'
,
file
=
f
)
for
project
in
Project
.
objects
.
all
():
print
(
f
'{{I
{
project
.
pk
}
[label="
{
project
}
"];}}'
,
file
=
f
)
for
dep
in
Dependency
.
objects
.
all
():
print
(
f
'I
{
dep
.
project
.
pk
}
-> I
{
dep
.
library
.
pk
}
;'
,
file
=
f
)
print
(
'}'
,
file
=
f
)
svg
=
run
([
'dot'
,
'/tmp/graph'
,
'-Tsvg'
],
capture_output
=
True
).
stdout
.
decode
()
return
HttpResponse
(
svg
,
content_type
=
'image/svg+xml'
)
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