Commit ff82bb68 authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

doc.{py,sh} to autodeploy doc from gepgitlab artifacts

parent 3331891a
#!/usr/bin/env python3
import os
from pathlib import Path
from zipfile import ZipFile
from io import BytesIO
import requests
DOC = Path('/net/cetus/data/gepetto/Doc')
GITLAB = 'https://gepgitlab.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:
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))
#!/bin/bash
set -e
cd /net/cetus/data/gepetto/Doc
for namespace in *; do
pushd $namespace
for project in *; do
pushd $project
for branch in *; do
pushd $branch
[[ -d doc/doxygen-html ]] || continue
cp -r doc/doxygen-html/* .
rm -r doc
popd
done
popd
done
popd
done
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment