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
66f53ee2
Commit
66f53ee2
authored
6 years ago
by
André Anjos
Browse files
Options
Downloads
Patches
Plain Diff
[scripts][ci] Fix PyPI upload
parent
a288a201
No related branches found
No related tags found
No related merge requests found
Pipeline
#26234
passed
6 years ago
Stage: build
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bob/devtools/scripts/ci.py
+4
-5
4 additions, 5 deletions
bob/devtools/scripts/ci.py
with
4 additions
and
5 deletions
bob/devtools/scripts/ci.py
+
4
−
5
View file @
66f53ee2
...
@@ -192,7 +192,7 @@ Examples:
...
@@ -192,7 +192,7 @@ Examples:
'
printing to help you understand what will be done
'
)
'
printing to help you understand what will be done
'
)
@verbosity_option
()
@verbosity_option
()
@bdt.raise_on_error
@bdt.raise_on_error
def
pypi
(
dry_run
):
def
pypi
(
package
,
dry_run
):
"""
Deploys build artifacts (python packages to PyPI)
"""
Deploys build artifacts (python packages to PyPI)
Deployment is only allowed for packages in which the visibility is
Deployment is only allowed for packages in which the visibility is
...
@@ -204,8 +204,6 @@ def pypi(dry_run):
...
@@ -204,8 +204,6 @@ def pypi(dry_run):
logger
.
warn
(
'
!!!! DRY RUN MODE !!!!
'
)
logger
.
warn
(
'
!!!! DRY RUN MODE !!!!
'
)
logger
.
warn
(
'
Nothing is being deployed to server
'
)
logger
.
warn
(
'
Nothing is being deployed to server
'
)
package
=
os
.
environ
[
'
CI_PROJECT_PATH
'
]
# determine project visibility
# determine project visibility
visible
=
(
os
.
environ
[
'
CI_PROJECT_VISIBILITY
'
]
==
'
public
'
)
visible
=
(
os
.
environ
[
'
CI_PROJECT_VISIBILITY
'
]
==
'
public
'
)
...
@@ -213,7 +211,8 @@ def pypi(dry_run):
...
@@ -213,7 +211,8 @@ def pypi(dry_run):
raise
RuntimeError
(
'
The repository %s is not public - a package
'
\
raise
RuntimeError
(
'
The repository %s is not public - a package
'
\
'
deriving from it therefore, CANNOT be published to PyPI.
'
\
'
deriving from it therefore, CANNOT be published to PyPI.
'
\
'
You must follow the relevant software disclosure procedures
'
\
'
You must follow the relevant software disclosure procedures
'
\
'
and set this repository to
"
public
"
before trying again.
'
%
package
)
'
and set this repository to
"
public
"
before trying again.
'
%
\
os
.
environ
[
'
CI_PROJECT_PATH
'
])
from
..constants
import
CACERT
from
..constants
import
CACERT
from
twine.settings
import
Settings
from
twine.settings
import
Settings
...
@@ -228,7 +227,7 @@ def pypi(dry_run):
...
@@ -228,7 +227,7 @@ def pypi(dry_run):
if
not
dry_run
:
if
not
dry_run
:
from
twine.commands.upload
import
upload
from
twine.commands.upload
import
upload
for
k
in
package
s
:
for
k
in
package
:
logger
.
info
(
'
Deploying python package %s to PyPI
'
,
k
)
logger
.
info
(
'
Deploying python package %s to PyPI
'
,
k
)
upload
(
settings
,
[
k
])
upload
(
settings
,
[
k
])
...
...
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