Nexus¶
Usage: lftools nexus [OPTIONS] COMMAND [ARGS]...
(Deprecated) Use the Nexus2 API Interface.
Provide an interface to Nexus.
Options:
--help Show this message and exit.
Commands:
create Create resources in Nexus.
docker Docker repos in Nexus.
release Release one or more staging repositories.
reorder-staged-repos Reorder staging repositories in Nexus.
Commands¶
create¶
Usage: lftools nexus create [OPTIONS] COMMAND [ARGS]...
Create resources in Nexus.
Options:
--help Show this message and exit.
Commands:
repo Create a Nexus repository as defined by a repo-config.yaml file.
role Create a Nexus role as defined by a role-config.yaml file.
repo¶
Usage: lftools nexus create repo [OPTIONS]
Create a Nexus repository as defined by a repo-config.yaml file.
Options:
-c, --configfile TEXT Repo config file for how the Nexus repository should
be created. [required]
-s, --settings TEXT Optional config file containing administrative
settings.
-u, --url TEXT Nexus server URL. In the format https:// Can also be
set as NEXUS_URL in the environment.This will
override any URL set in settings.yaml.
--help Show this message and exit.
For details and examples, please see Create Nexus2 repos with lftools
role¶
Usage: lftools nexus create role [OPTIONS]
Create a Nexus role as defined by a role-config.yaml file.
Options:
-c, --config TEXT Role config file for how the Nexus role should be
created. [required]
-s, --settings TEXT Config file containing administrative settings.
[required]
--help Show this message and exit.
# Example role-config.yaml. The top-level keys will be the role's id.
---
# Minimal config
lf-deployment:
name: LF Deployment Role
roles: # Roles can be defined by ID or by Name
- nx-deployment
- analytics
# Full config with privileges (by name only) and description defined.
LF Deployment By Name:
name: LF Dep Role
privileges:
- Status - (read)
- Login to UI
roles:
- Nexus Deployment Role
- Analytics
description: "A role where I defined its contained roles by name"
reorder-staged-repos¶
Usage: lftools nexus reorder-staged-repos [OPTIONS]
Reorder staging repositories in Nexus.
Reorders staging repositories in Nexus such that the newest repository gets
priority in the aggregate repo.
Options:
-s, --settings TEXT [required]
--help Show this message and exit.
docker¶
Usage: lftools nexus docker [OPTIONS] COMMAND [ARGS]...
Docker repos in Nexus.
Options:
--help Show this message and exit.
Commands:
delete Delete all images matching the PATTERN.
list List images matching the PATTERN.
releasedockerhub Find missing repos in Docker Hub, Copy from Nexus3.
While a settings.yaml file is still supported for nexus docker
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.
delete¶
Usage: lftools nexus docker delete [OPTIONS] [PATTERN] REPO
Delete all images matching the PATTERN.
By default, prints to console only. Use '*' for wildcard, or begin with '!'
to delete images NOT matching the string.
Options:
-s, --server TEXT Nexus server URL. Can also be set as NEXUS_URL in the
environment. This will override any URL set in
settings.yaml.
--settings TEXT Yaml file containing "nexus" (url), "user", and
"password" definitions.
-y, --yes Answer yes to all prompts
--help Show this message and exit.
list¶
Usage: lftools nexus docker list [OPTIONS] [PATTERN] REPO
List images matching the PATTERN.
Use '*' for wildcard, or begin with '!' to search for images NOT matching
the string.
Options:
-s, --server TEXT Nexus server URL. Can also be set as NEXUS_URL in the
environment. This will override any URL set in
settings.yaml.
--settings TEXT Yaml file containing "nexus" (url), "user", and
"password" definitions.
--csv FILE Write a csv file of the search results to PATH.
--help Show this message and exit.
release¶
Usage: lftools nexus release [OPTIONS] [REPOS]...
Release one or more staging repositories.
Options:
-v, --verify-only
-s, --server TEXT Nexus server URL. Can also be set as NEXUS_URL in the
environment. This will override any URL set in
settings.yaml.
--help Show this message and exit.
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:
[nexus.example.com]
username=
password=