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
Olivier Stasse
Gepetto Utils
Commits
3d25b2b3
Commit
3d25b2b3
authored
Apr 06, 2018
by
Guilhem Saurel
Browse files
doc.py get projects from rainboard
parent
ff82bb68
Changes
1
Hide whitespace changes
Inline
Side-by-side
scripts/doc.py
View file @
3d25b2b3
...
...
@@ -8,21 +8,18 @@ import requests
DOC
=
Path
(
'/net/cetus/data/gepetto/Doc'
)
GITLAB
=
'https://gepgitlab.laas.fr'
RAINBOARD
=
'http://rainboard.laas.fr'
VERSION
=
'16.04'
PR_NS_BR
=
[
(
'pinocchio'
,
[
(
'gsaurel'
,
[
'autodeploy-doc'
,
]),
]),
]
for
project
,
namespaces
in
PR_NS_BR
:
for
namespace
,
branches
in
namespaces
:
for
branch
in
branches
:
if
__name__
==
'__main__'
:
for
project
,
namespace
,
branch
in
requests
.
get
(
f
'
{
RAINBOARD
}
/doc'
).
json
()[
'ret'
]:
r
=
requests
.
get
(
f
'
{
GITLAB
}
/
{
namespace
}
/
{
project
}
/-/jobs/artifacts/
{
branch
}
/download'
,
{
'job'
:
f
'robotpkg-
{
project
}
-
{
VERSION
}
'
},
stream
=
True
)
try
:
z
=
ZipFile
(
BytesIO
(
r
.
content
))
path
=
DOC
/
namespace
/
project
/
branch
path
.
mkdir
(
parents
=
True
,
exist_ok
=
True
)
r
=
requests
.
get
(
f
'
{
GITLAB
}
/
{
namespace
}
/
{
project
}
/-/jobs/artifacts/
{
branch
}
/download'
,
{
'job'
:
f
'robotpkg-
{
project
}
-
{
VERSION
}
'
},
stream
=
True
)
ZipFile
(
BytesIO
(
r
.
content
)).
extractall
(
str
(
path
))
z
.
extractall
(
str
(
path
))
except
:
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