[nexus] section is taken from -s "server" passed to release job.
The "https://" part of passed url is stripped before match.
example:
lftools nexus release -s https://nexus.example.com
Would require auth section in lftools.ini of
[nexus.example.org]
username=
password=
Issue: RELENG-2129
Issue: RELENG-1666
Change-Id: I64ab0a18a4d0e9060f1273f5acc1971fcffe497c
Signed-off-by: Aric Gardner <agardner@linuxfoundation.org>
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
-------
.. program-output:: lftools nexus release --help
+
+While a settings.yaml file is still supported for ``nexus release`` commands,
+the preferred way to login is to use an lftools.ini file, and provide the
+server address using the ``--server`` option. The config file should be at
+$HOME/.config/lftools/lftools.ini.
+Requires an [nexus.example.com] for each Nexus repositories in
+~/.config/lftools/lftools.ini:
+
+.. code-block:: bash
+
+ [nexus.example.com]
+ username=
+ password=
# Linkcheck Options
linkcheck_ignore= [
r'https://testing\.googleblog\.com/.*',
+ r'https://nexus\.example\.com',
]
return settings
elif url:
try:
- user = config.get_setting("nexus", "username")
- password = config.get_setting("nexus", "password")
+ auth_url = url.replace("https://", "")
+ user = config.get_setting(auth_url, "username")
+ password = config.get_setting(auth_url, "password")
except (configparser.NoOptionError,
configparser.NoSectionError):
log.info("Failed to get nexus credentials; using empty username "
--- /dev/null
+---
+features:
+ - |
+ Support multiple nexus sections in lftools.ini
+
+ In the format:
+
+ .. code-block:: none
+
+ [nexus.example.org]
+ username=
+ password=
+
+ [nexus.example1.org]
+ username=
+ password=
+
+ [nexus] section is taken from -s "server" passed to release job.
+ https part of passed url is stripped before match.
+upgrade:
+ - |
+ current [nexus] section of lftools.ini must be changed to
+ [nexus.example.com]
+
+ where nexus.example.com matches the "server" string passed to
+ lftools nexus release -s https://nexus.example.com
+ The https part of passed url is stripped before match.
+ example provided would require auth section in lftools.ini of
+ [nexus.example.org]