Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.devtools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bob
bob.devtools
Commits
1ab17b5b
Commit
1ab17b5b
authored
5 years ago
by
André Anjos
Browse files
Options
Downloads
Patches
Plain Diff
[scripts/ci] Fix interpretation of packages file
parent
ebc85631
No related branches found
No related tags found
No related merge requests found
Pipeline
#30419
passed
5 years ago
Stage: build
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bob/devtools/data/gitlab-ci/docs.yaml
+1
-1
1 addition, 1 deletion
bob/devtools/data/gitlab-ci/docs.yaml
bob/devtools/scripts/ci.py
+24
-12
24 additions, 12 deletions
bob/devtools/scripts/ci.py
with
25 additions
and
13 deletions
bob/devtools/data/gitlab-ci/docs.yaml
+
1
−
1
View file @
1ab17b5b
...
@@ -23,7 +23,7 @@ stages:
...
@@ -23,7 +23,7 @@ stages:
-
python3 bootstrap.py -vv channel base
-
python3 bootstrap.py -vv channel base
-
source ${CONDA_ROOT}/etc/profile.d/conda.sh
-
source ${CONDA_ROOT}/etc/profile.d/conda.sh
-
conda activate base
-
conda activate base
-
bdt ci docs -vv
requirement
s.txt
-
bdt ci docs -vv
package
s.txt
-
bdt ci clean -vv
-
bdt ci clean -vv
cache
:
&build_caches
cache
:
&build_caches
paths
:
paths
:
...
...
This diff is collapsed.
Click to expand it.
bob/devtools/scripts/ci.py
+
24
−
12
View file @
1ab17b5b
...
@@ -651,10 +651,11 @@ def docs(ctx, requirement, dry_run):
...
@@ -651,10 +651,11 @@ def docs(ctx, requirement, dry_run):
"""
Prepares documentation build
"""
Prepares documentation build
This command:
This command:
1. Clones all the necessary packages necessary to build the bob documentation
1. Clones all the necessary packages necessary to build the bob/beat
documentation
2. Generates the `extra-intersphinx.txt` and `nitpick-exceptions.txt` file
2. Generates the `extra-intersphinx.txt` and `nitpick-exceptions.txt` file
This command is supposed to be run
before
`bdt ci build...`
This command is supposed to be run
**instead** of
`bdt ci build...`
"""
"""
...
@@ -662,7 +663,6 @@ def docs(ctx, requirement, dry_run):
...
@@ -662,7 +663,6 @@ def docs(ctx, requirement, dry_run):
import
git
import
git
token
=
os
.
environ
[
'
CI_JOB_TOKEN
'
]
token
=
os
.
environ
[
'
CI_JOB_TOKEN
'
]
group
=
os
.
environ
[
'
CI_PROJECT_NAMESPACE
'
]
# loaded all recipes, now cycle through them implementing what is described
# loaded all recipes, now cycle through them implementing what is described
# in the documentation of this function
# in the documentation of this function
...
@@ -677,7 +677,9 @@ def docs(ctx, requirement, dry_run):
...
@@ -677,7 +677,9 @@ def docs(ctx, requirement, dry_run):
len
(
packages
)))
len
(
packages
)))
echo_normal
((
80
*
'
=
'
)
+
'
\n
'
)
echo_normal
((
80
*
'
=
'
)
+
'
\n
'
)
clone_to
=
os
.
path
.
join
(
doc_path
,
package
)
group
,
name
=
package
.
split
(
'
/
'
,
1
)
clone_to
=
os
.
path
.
join
(
doc_path
,
group
,
name
)
dirname
=
os
.
path
.
dirname
(
clone_to
)
dirname
=
os
.
path
.
dirname
(
clone_to
)
if
not
os
.
path
.
exists
(
dirname
):
if
not
os
.
path
.
exists
(
dirname
):
os
.
makedirs
(
dirname
)
os
.
makedirs
(
dirname
)
...
@@ -687,12 +689,13 @@ def docs(ctx, requirement, dry_run):
...
@@ -687,12 +689,13 @@ def docs(ctx, requirement, dry_run):
logger
.
info
(
'
Cloning
"
%s
"
, branch
"
%s
"
(depth=1)...
'
,
package
,
branch
)
logger
.
info
(
'
Cloning
"
%s
"
, branch
"
%s
"
(depth=1)...
'
,
package
,
branch
)
else
:
else
:
if
os
.
path
.
exists
(
clone_to
):
if
os
.
path
.
exists
(
clone_to
):
logger
.
info
(
'
Repo
"
%s
"
, already cloned; pulling from master...
'
,
package
)
logger
.
info
(
'
Repo
"
%s
"
, already cloned; pulling from master...
'
,
package
)
git
.
Git
(
clone_to
).
pull
(
"
origin
"
,
branch
)
git
.
Git
(
clone_to
).
pull
(
"
origin
"
,
branch
)
else
:
else
:
logger
.
info
(
'
Cloning
"
%s
"
, branch
"
%s
"
(depth=1)...
'
,
package
,
branch
)
logger
.
info
(
'
Cloning
"
%s
"
, branch
"
%s
"
(depth=1)...
'
,
package
,
branch
)
git
.
Repo
.
clone_from
(
'
https://gitlab-ci-token:%s@gitlab.idiap.ch/%s
'
%
\
git
.
Repo
.
clone_from
(
'
https://gitlab-ci-token:%s@gitlab.idiap.ch/%s
'
%
\
(
token
,
group
+
"
/
"
+
package
),
clone_to
,
branch
=
branch
,
depth
=
1
)
(
token
,
package
),
clone_to
,
branch
=
branch
,
depth
=
1
)
# Copying the content from extra_intersphinx
# Copying the content from extra_intersphinx
extra_intersphinx_path
=
os
.
path
.
join
(
clone_to
,
"
doc
"
,
extra_intersphinx_path
=
os
.
path
.
join
(
clone_to
,
"
doc
"
,
...
@@ -716,14 +719,23 @@ def docs(ctx, requirement, dry_run):
...
@@ -716,14 +719,23 @@ def docs(ctx, requirement, dry_run):
logger
.
info
(
'
Generating sphinx files...
'
)
logger
.
info
(
'
Generating sphinx files...
'
)
# Making unique lists and removing all bob references
# Making unique lists and removing all bob
/beat
references
if
not
dry_run
:
if
not
dry_run
:
extra_intersphinx
=
list
(
set
([
e
for
e
in
extra_intersphinx
if
group
not
in
e
]))
nitpick
=
list
(
set
([
e
for
e
in
nitpick
]))
# Removing projects that are part of the group
# extra requirements for sphinx
open
(
os
.
path
.
join
(
doc_path
,
"
extra-intersphinx.txt
"
),
"
w
"
).
writelines
(
extra_intersphinx
)
group
=
os
.
environ
[
'
CI_PROJECT_NAMESPACE
'
]
open
(
os
.
path
.
join
(
doc_path
,
"
nitpick-exceptions.txt
"
),
"
w
"
).
writelines
(
nitpick
)
extra_intersphinx
=
set
([
k
.
strip
()
for
k
in
extra_intersphinx
\
if
not
k
.
strip
().
startswith
(
group
)])
logger
.
info
(
'
Contents of
"
doc/extra-intersphinx.txt
"
:
\n
%s
'
,
extra_intersphinx
)
with
open
(
os
.
path
.
join
(
doc_path
,
'
extra-intersphinx.txt
'
),
'
w
'
)
as
f
:
f
.
writelines
(
extra_intersphinx
)
# nitpick exceptions
logger
.
info
(
'
Contents of
"
doc/nitpick-exceptions.txt
"
:
\n
%s
'
,
nitpick
)
with
open
(
os
.
path
.
join
(
doc_path
,
"
nitpick-exceptions.txt
"
),
"
w
"
)
as
f
:
f
.
writelines
(
set
([
k
.
strip
()
for
k
in
nitpick
]))
logger
.
info
(
'
Building documentation...
'
)
logger
.
info
(
'
Building documentation...
'
)
ctx
.
invoke
(
build
,
dry_run
=
dry_run
)
ctx
.
invoke
(
build
,
dry_run
=
dry_run
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment