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
0f56af89
Commit
0f56af89
authored
5 years ago
by
André Anjos
Browse files
Options
Downloads
Plain Diff
Merge branch 'issue-26' into 'master'
Add option to --use-local in build/test Closes
#26
See merge request
!44
parents
60df03b9
93537528
No related branches found
No related tags found
1 merge request
!44
Add option to --use-local in build/test
Pipeline
#29407
passed
5 years ago
Stage: build
Stage: deploy
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
bob/devtools/scripts/build.py
+8
-3
8 additions, 3 deletions
bob/devtools/scripts/build.py
bob/devtools/scripts/ci.py
+6
-2
6 additions, 2 deletions
bob/devtools/scripts/ci.py
bob/devtools/scripts/test.py
+8
-3
8 additions, 3 deletions
bob/devtools/scripts/test.py
with
22 additions
and
8 deletions
bob/devtools/scripts/build.py
+
8
−
3
View file @
0f56af89
...
@@ -67,6 +67,9 @@ Examples:
...
@@ -67,6 +67,9 @@ Examples:
@click.option
(
'
-X
'
,
'
--stable/--no-stable
'
,
default
=
False
,
@click.option
(
'
-X
'
,
'
--stable/--no-stable
'
,
default
=
False
,
help
=
'
Set this to **exclude** beta channels from your build -
'
\
help
=
'
Set this to **exclude** beta channels from your build -
'
\
'
notice this option has no effect if you also pass --condarc
'
)
'
notice this option has no effect if you also pass --condarc
'
)
@click.option
(
'
-L
'
,
'
--use-local/--no-use-local
'
,
default
=
False
,
help
=
'
Set this to **include** the locally built packages on the search
'
\
'
list - notice this option has no effect if you also pass --condarc
'
)
@click.option
(
'
-d
'
,
'
--dry-run/--no-dry-run
'
,
default
=
False
,
@click.option
(
'
-d
'
,
'
--dry-run/--no-dry-run
'
,
default
=
False
,
help
=
'
Only goes through the actions, but does not execute them
'
\
help
=
'
Only goes through the actions, but does not execute them
'
\
'
(combine with the verbosity flags - e.g. ``-vvv``) to enable
'
\
'
(combine with the verbosity flags - e.g. ``-vvv``) to enable
'
\
...
@@ -76,7 +79,7 @@ Examples:
...
@@ -76,7 +79,7 @@ Examples:
@verbosity_option
()
@verbosity_option
()
@bdt.raise_on_error
@bdt.raise_on_error
def
build
(
recipe_dir
,
python
,
condarc
,
config
,
no_test
,
append_file
,
def
build
(
recipe_dir
,
python
,
condarc
,
config
,
no_test
,
append_file
,
server
,
group
,
private
,
stable
,
dry_run
,
ci
):
server
,
group
,
private
,
stable
,
use_local
,
dry_run
,
ci
):
"""
Builds package through conda-build with stock configuration
"""
Builds package through conda-build with stock configuration
This command wraps the execution of conda-build so that you use the same
This command wraps the execution of conda-build so that you use the same
...
@@ -104,10 +107,12 @@ def build(recipe_dir, python, condarc, config, no_test, append_file,
...
@@ -104,10 +107,12 @@ def build(recipe_dir, python, condarc, config, no_test, append_file,
condarc_options
=
yaml
.
load
(
f
)
condarc_options
=
yaml
.
load
(
f
)
else
:
else
:
# use default and add channels
# use default and add channels
all_channels
=
[
'
local
'
]
if
use_local
else
[]
all_channels
+=
channels
+
[
'
defaults
'
]
condarc_options
=
yaml
.
load
(
BASE_CONDARC
)
#n.b.: no channels
condarc_options
=
yaml
.
load
(
BASE_CONDARC
)
#n.b.: no channels
logger
.
info
(
'
Using the following channels during build:
\n
- %s
'
,
logger
.
info
(
'
Using the following channels during build:
\n
- %s
'
,
'
\n
-
'
.
join
(
channels
+
[
'
defaults
'
]
))
'
\n
-
'
.
join
(
all_
channels
))
condarc_options
[
'
channels
'
]
=
channels
+
[
'
defaults
'
]
condarc_options
[
'
channels
'
]
=
all_
channels
# dump packages at base environment
# dump packages at base environment
prefix
=
get_env_directory
(
os
.
environ
[
'
CONDA_EXE
'
],
'
base
'
)
prefix
=
get_env_directory
(
os
.
environ
[
'
CONDA_EXE
'
],
'
base
'
)
...
...
This diff is collapsed.
Click to expand it.
bob/devtools/scripts/ci.py
+
6
−
2
View file @
0f56af89
...
@@ -280,9 +280,10 @@ def base_build(order, group, python, dry_run):
...
@@ -280,9 +280,10 @@ def base_build(order, group, python, dry_run):
# use default and add channels
# use default and add channels
condarc_options
=
yaml
.
load
(
BASE_CONDARC
)
#n.b.: no channels
condarc_options
=
yaml
.
load
(
BASE_CONDARC
)
#n.b.: no channels
channels
=
[
'
local
'
]
+
channels
+
[
'
defaults
'
]
logger
.
info
(
'
Using the following channels during build:
\n
- %s
'
,
logger
.
info
(
'
Using the following channels during build:
\n
- %s
'
,
'
\n
-
'
.
join
(
channels
+
[
'
defaults
'
]
))
'
\n
-
'
.
join
(
channels
))
condarc_options
[
'
channels
'
]
=
channels
+
[
'
defaults
'
]
condarc_options
[
'
channels
'
]
=
channels
# dump packages at conda_root
# dump packages at conda_root
condarc_options
[
'
croot
'
]
=
os
.
path
.
join
(
os
.
environ
[
'
CONDA_ROOT
'
],
condarc_options
[
'
croot
'
]
=
os
.
path
.
join
(
os
.
environ
[
'
CONDA_ROOT
'
],
...
@@ -356,6 +357,7 @@ def test(ctx, dry_run):
...
@@ -356,6 +357,7 @@ def test(ctx, dry_run):
group
=
group
,
group
=
group
,
private
=
(
os
.
environ
[
'
CI_PROJECT_VISIBILITY
'
]
!=
'
public
'
),
private
=
(
os
.
environ
[
'
CI_PROJECT_VISIBILITY
'
]
!=
'
public
'
),
stable
=
'
CI_COMMIT_TAG
'
in
os
.
environ
,
stable
=
'
CI_COMMIT_TAG
'
in
os
.
environ
,
use_local
=
False
,
dry_run
=
dry_run
,
dry_run
=
dry_run
,
ci
=
True
,
ci
=
True
,
)
)
...
@@ -400,6 +402,7 @@ def build(ctx, dry_run):
...
@@ -400,6 +402,7 @@ def build(ctx, dry_run):
group
=
group
,
group
=
group
,
private
=
(
os
.
environ
[
'
CI_PROJECT_VISIBILITY
'
]
!=
'
public
'
),
private
=
(
os
.
environ
[
'
CI_PROJECT_VISIBILITY
'
]
!=
'
public
'
),
stable
=
'
CI_COMMIT_TAG
'
in
os
.
environ
,
stable
=
'
CI_COMMIT_TAG
'
in
os
.
environ
,
use_local
=
False
,
dry_run
=
dry_run
,
dry_run
=
dry_run
,
ci
=
True
,
ci
=
True
,
)
)
...
@@ -520,6 +523,7 @@ def nightlies(ctx, order, dry_run):
...
@@ -520,6 +523,7 @@ def nightlies(ctx, order, dry_run):
group
=
group
,
group
=
group
,
private
=
private
,
private
=
private
,
stable
=
stable
,
stable
=
stable
,
use_local
=
True
,
dry_run
=
dry_run
,
dry_run
=
dry_run
,
ci
=
True
,
ci
=
True
,
)
)
...
...
This diff is collapsed.
Click to expand it.
bob/devtools/scripts/test.py
+
8
−
3
View file @
0f56af89
...
@@ -58,6 +58,9 @@ Examples:
...
@@ -58,6 +58,9 @@ Examples:
@click.option
(
'
-X
'
,
'
--stable/--no-stable
'
,
default
=
False
,
@click.option
(
'
-X
'
,
'
--stable/--no-stable
'
,
default
=
False
,
help
=
'
Set this to **exclude** beta channels from your build -
'
\
help
=
'
Set this to **exclude** beta channels from your build -
'
\
'
notice this option has no effect if you also pass --condarc
'
)
'
notice this option has no effect if you also pass --condarc
'
)
@click.option
(
'
-L
'
,
'
--use-local/--no-use-local
'
,
default
=
False
,
help
=
'
Set this to **include** the locally built packages on the search
'
\
'
list - notice this option has no effect if you also pass --condarc
'
)
@click.option
(
'
-d
'
,
'
--dry-run/--no-dry-run
'
,
default
=
False
,
@click.option
(
'
-d
'
,
'
--dry-run/--no-dry-run
'
,
default
=
False
,
help
=
'
Only goes through the actions, but does not execute them
'
\
help
=
'
Only goes through the actions, but does not execute them
'
\
'
(combine with the verbosity flags - e.g. ``-vvv``) to enable
'
\
'
(combine with the verbosity flags - e.g. ``-vvv``) to enable
'
\
...
@@ -67,7 +70,7 @@ Examples:
...
@@ -67,7 +70,7 @@ Examples:
@verbosity_option
()
@verbosity_option
()
@bdt.raise_on_error
@bdt.raise_on_error
def
test
(
package
,
condarc
,
config
,
append_file
,
server
,
group
,
private
,
stable
,
def
test
(
package
,
condarc
,
config
,
append_file
,
server
,
group
,
private
,
stable
,
dry_run
,
ci
):
use_local
,
dry_run
,
ci
):
"""
Tests (pre-built) package through conda-build with stock configuration
"""
Tests (pre-built) package through conda-build with stock configuration
This command wraps the execution of conda-build so that you use the same
This command wraps the execution of conda-build so that you use the same
...
@@ -93,10 +96,12 @@ def test(package, condarc, config, append_file, server, group, private, stable,
...
@@ -93,10 +96,12 @@ def test(package, condarc, config, append_file, server, group, private, stable,
condarc_options
=
yaml
.
load
(
f
)
condarc_options
=
yaml
.
load
(
f
)
else
:
else
:
# use default and add channels
# use default and add channels
all_channels
=
[
'
local
'
]
if
use_local
else
[]
all_channels
+=
channels
+
[
'
defaults
'
]
condarc_options
=
yaml
.
load
(
BASE_CONDARC
)
#n.b.: no channels
condarc_options
=
yaml
.
load
(
BASE_CONDARC
)
#n.b.: no channels
logger
.
info
(
'
Using the following channels during build:
\n
- %s
'
,
logger
.
info
(
'
Using the following channels during build:
\n
- %s
'
,
'
\n
-
'
.
join
(
channels
+
[
'
defaults
'
]
))
'
\n
-
'
.
join
(
all_
channels
))
condarc_options
[
'
channels
'
]
=
channels
+
[
'
defaults
'
]
condarc_options
[
'
channels
'
]
=
all_
channels
conda_config
=
make_conda_config
(
config
,
None
,
append_file
,
conda_config
=
make_conda_config
(
config
,
None
,
append_file
,
condarc_options
)
condarc_options
)
...
...
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