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
0d3cb434
Commit
0d3cb434
authored
6 years ago
by
André Anjos
Browse files
Options
Downloads
Patches
Plain Diff
[deploy] Fixes unknown variable "arch" issue
parent
d2eb0b09
No related branches found
No related tags found
No related merge requests found
Pipeline
#27712
failed
6 years ago
Stage: build
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bob/devtools/deploy.py
+5
-1
5 additions, 1 deletion
bob/devtools/deploy.py
bob/devtools/scripts/ci.py
+15
-15
15 additions, 15 deletions
bob/devtools/scripts/ci.py
with
20 additions
and
16 deletions
bob/devtools/deploy.py
+
5
−
1
View file @
0d3cb434
...
...
@@ -26,13 +26,16 @@ def _setup_webdav_client(server, root, username, password):
return
retval
def
deploy_conda_package
(
package
,
stable
,
public
,
username
,
password
,
def
deploy_conda_package
(
package
,
arch
,
stable
,
public
,
username
,
password
,
overwrite
,
dry_run
):
'''
Deploys a single conda package on the appropriate path
Args:
package (str): Path leading to the conda package to be deployed
arch (str): The conda architecture to deploy to (``linux-64``, ``osx-64``,
``noarch``, or ``None`` - in which case the architecture is going to be
guessed from the directory where the package sits)
stable (bool): Indicates if the package should be deployed on a stable
(``True``) or beta (``False``) channel
public (bool): Indicates if the package is supposed to be distributed
...
...
@@ -56,6 +59,7 @@ def deploy_conda_package(package, stable, public, username, password,
server_info
[
'
root
'
],
server_info
[
'
conda
'
])
basename
=
os
.
path
.
basename
(
package
)
arch
=
arch
or
os
.
path
.
basename
(
os
.
path
.
dirname
(
package
))
remote_path
=
'
%s/%s/%s
'
%
(
server_info
[
'
conda
'
],
arch
,
basename
)
if
davclient
.
check
(
remote_path
):
...
...
This diff is collapsed.
Click to expand it.
bob/devtools/scripts/ci.py
+
15
−
15
View file @
0d3cb434
...
...
@@ -75,7 +75,7 @@ def base_deploy(dry_run):
logger
.
debug
(
'
Skipping deploying of %s - not a base package
'
,
k
)
continue
deploy_conda_package
(
k
,
stable
=
True
,
public
=
True
,
deploy_conda_package
(
k
,
arch
=
arch
,
stable
=
True
,
public
=
True
,
username
=
os
.
environ
[
'
DOCUSER
'
],
password
=
os
.
environ
[
'
DOCPASS
'
],
overwrite
=
False
,
dry_run
=
dry_run
)
...
...
@@ -125,7 +125,7 @@ def deploy(dry_run):
name
+
'
*.tar.bz2
'
)
deploy_packages
=
glob
.
glob
(
package_path
)
for
k
in
deploy_packages
:
deploy_conda_package
(
k
,
stable
=
stable
,
public
=
public
,
deploy_conda_package
(
k
,
arch
=
arch
,
stable
=
stable
,
public
=
public
,
username
=
os
.
environ
[
'
DOCUSER
'
],
password
=
os
.
environ
[
'
DOCPASS
'
],
overwrite
=
False
,
dry_run
=
dry_run
)
...
...
@@ -509,11 +509,23 @@ def nightlies(ctx, order, dry_run):
ci
=
True
,
)
local_docs
=
os
.
path
.
join
(
os
.
environ
[
'
CI_PROJECT_DIR
'
],
'
sphinx
'
)
is_master
=
os
.
environ
[
'
CI_COMMIT_REF_NAME
'
]
==
'
master
'
# re-deploys a new conda package if it was rebuilt and it is the master
# branch
# n.b.: can only arrive here if dry_run was ``False`` (no need to check
# again)
if
'
BDT_REBUILD
'
in
os
.
environ
and
is_master
:
tarball
=
os
.
environ
[
'
BDT_REBUILD
'
]
del
os
.
environ
[
'
BDT_REBUILD
'
]
deploy_conda_package
(
tarball
,
arch
=
None
,
stable
=
stable
,
public
=
(
not
private
),
username
=
os
.
environ
[
'
DOCUSER
'
],
password
=
os
.
environ
[
'
DOCPASS
'
],
overwrite
=
False
,
dry_run
=
dry_run
)
# re-deploys freshly built documentation if we're on the master branch
# otherwise, removes the documentation
local_docs
=
os
.
path
.
join
(
os
.
environ
[
'
CI_PROJECT_DIR
'
],
'
sphinx
'
)
if
is_master
:
deploy_documentation
(
local_docs
,
package
,
stable
=
stable
,
public
=
(
not
private
),
branch
=
'
master
'
,
tag
=
None
,
...
...
@@ -523,15 +535,3 @@ def nightlies(ctx, order, dry_run):
logger
.
debug
(
'
Sphinx output was generated during test/rebuild
'
\
'
of %s - Erasing...
'
,
package
)
shutil
.
rmtree
(
local_docs
)
# re-deploys a new conda package if it was rebuilt and it is the master
# branch
# n.b.: can only arrive here if dry_run was ``False`` (no need to check
# again)
if
'
BDT_REBUILD
'
in
os
.
environ
and
is_master
:
tarball
=
os
.
environ
[
'
BDT_REBUILD
'
]
del
os
.
environ
[
'
BDT_REBUILD
'
]
deploy_conda_package
(
tarball
,
stable
=
stable
,
public
=
(
not
private
),
username
=
os
.
environ
[
'
DOCUSER
'
],
password
=
os
.
environ
[
'
DOCPASS
'
],
overwrite
=
False
,
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