From: Lott, Christopher (cl778h) Date: Thu, 3 Oct 2019 13:54:28 +0000 (-0400) Subject: Change PyPI merge repo default and fix doc URL X-Git-Tag: v0.45.0~4^2 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=3c806b766837f247cdce1c8b60012059aacc6aff;p=releng%2Fglobal-jjb.git Change PyPI merge repo default and fix doc URL Correct doc .pypirc test URL to https://test.pypi.org/legacy/ Change doc .pypirc to use API tokens instead of username/password. Use pypi-test as the default repository name in the PyPI merge template (instead of "staging") to match established ONAP practice. Change-Id: Id8a6f253f05a7c15790f45979d7dc47039aaf5cd Signed-off-by: Lott, Christopher (cl778h) --- diff --git a/docs/jjb/lf-python-jobs.rst b/docs/jjb/lf-python-jobs.rst index e6e86b26..13047edf 100644 --- a/docs/jjb/lf-python-jobs.rst +++ b/docs/jjb/lf-python-jobs.rst @@ -43,7 +43,7 @@ Jenkins server must have a configuration file ".pypirc". :Required Parameters: :pypi-repo: PyPI repository key in .pypirc configuration file; - e.g., "staging" or "pypi". + e.g., "pypi-test" or "pypi". lf-infra-tox-install -------------------- @@ -396,7 +396,7 @@ PyPI Merge Creates and uploads distribution files on merge of a patch set. Runs tox, builds a source distribution and (optionally) a binary distribution, and uploads the distribution(s) to a PyPI repository. -This job should be configured to use a staging PyPI repository like +This job should be configured to use a test PyPI repository like testpypi.python.org, not a public release area like the global PyPI repository. Like the verify job, this requires a setup.py file for packaging the component. @@ -412,25 +412,23 @@ pyenv variables before running. export PATH="$PYENV_ROOT/bin:$PATH" -Requires a .pypirc configuration file in the Jenkins builder home -directory, an example appears next. +Requires a .pypirc configuration file in the Jenkins builder home directory, +an example appears next that uses API tokens. No repository is needed in the +PyPI section. .. code-block:: bash [distutils] # this tells distutils what package indexes you can push to - index-servers = - staging - pypi + index-servers = pypi-test pypi - [staging] - repository: https://testpypi.python.org/pypi - username: your_username - password: your_password + [pypi-test] + repository: https://test.pypi.org/legacy/ + username: __token__ + password: pypi-test-api-token-goes-here [pypi] - repository: https://pypi.python.org/pypi - username: your_username - password: your_password + username: __token__ + password: pypi-api-token-goes-here :Template Names: @@ -463,7 +461,7 @@ directory, an example appears next. :pre-build-script: Shell script to execute before the tox builder. For example, install system prerequisites. (default: a shell comment) :pypi-repo: Key for PyPI repository parameters in the .pypirc file. - Merge jobs should use a server like testpypi.python.org. (default: staging) + Merge jobs should use a server like testpypi.python.org. (default: pypi-test) :python-version: Python version to invoke pip install of tox-pyenv (default: python3) :stream: Keyword representing a release code-name. diff --git a/jjb/lf-python-jobs.yaml b/jjb/lf-python-jobs.yaml index 5a2d193d..baf68f15 100644 --- a/jjb/lf-python-jobs.yaml +++ b/jjb/lf-python-jobs.yaml @@ -844,7 +844,7 @@ <<: *lf_pypi_merge_builders cron: "" - pypi-repo: staging + pypi-repo: pypi-test gerrit_merge_triggers: - change-merged-event @@ -884,7 +884,7 @@ <<: *lf_pypi_merge_builders cron: "" - pypi-repo: staging + pypi-repo: pypi-test properties: - github: diff --git a/releasenotes/notes/set-pypi-test-in-merge-4b2047944dfbc34c.yaml b/releasenotes/notes/set-pypi-test-in-merge-4b2047944dfbc34c.yaml new file mode 100644 index 00000000..d43457e2 --- /dev/null +++ b/releasenotes/notes/set-pypi-test-in-merge-4b2047944dfbc34c.yaml @@ -0,0 +1,7 @@ +--- +fixes: + - | + Correct doc .pypirc test URL to https://test.pypi.org/legacy/ + Change doc .pypirc to use API tokens instead of username/password. + Use pypi-test as the default repository name in the PyPI merge template + (instead of "staging") to match established ONAP practice.