nexus¶

                                                                                
 Usage: lftools-uv nexus [OPTIONS] COMMAND [ARGS]...                            
                                                                                
 (Deprecated) Use the Nexus2 API Interface                                      
                                                                                
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --help        <bool>  Show this message and exit.                            │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ───────────────────────────────────────────────────────────────────╮
│ release                Release one or more staging repositories.             │
│ reorder-staged-repos   Reorder staging repositories in Nexus.                │
│ create                 Create resources in Nexus.                            │
│ docker                 Docker repos in Nexus.                                │
╰──────────────────────────────────────────────────────────────────────────────╯

Commands¶

create¶

                                                                                
 Usage: lftools-uv nexus create [OPTIONS] COMMAND [ARGS]...                     
                                                                                
 Create resources in Nexus.                                                     
                                                                                
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --help        <bool>  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-uv nexus create repo [OPTIONS]                                  
                                                                                
 Create a Nexus repository as defined by a repo-config.yaml file.               
                                                                                
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ *  --configfile  -c      <str>   Repo config file for how the Nexus          │
│                                  repository should be created.               │
│                                  [required]                                  │
│    --settings    -s      <str>   Optional config file containing             │
│                                  administrative settings.                    │
│    --url         -u      <str>   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                <bool>  Show this message and exit.                 │
╰──────────────────────────────────────────────────────────────────────────────╯

For details and examples, please see the nexus2 documentation.

etc/nexus/settings.example.yaml and etc/nexus/repo-config.example.yaml show the shape of the two files. They ship with empty passwords: copy them somewhere private, restrict the copies to your own account (chmod 600 settings.yaml repo-config.yaml) and fill in the administrator password and one password per repository there. Do not commit the copies.

Before contacting Nexus, the command checks the administrator credentials and every repository password in the tree, nested ones included. If any is missing, empty, still a placeholder such as ${NEXUS_PASSWORD} or <password>, holds a ${...} placeholder anywhere, as in deploy-${NEXUS_PASSWORD}, or is not a string (YAML reads an unquoted false or 12345 as another type, so quote such values), it names the setting or repository path, provisions nothing and exits non-zero. The command does not expand placeholders, so fill in real values. nexus create role and nexus reorder-staged-repos apply the same check to the administrator credentials in their settings file.

role¶

                                                                                
 Usage: lftools-uv nexus create role [OPTIONS]                                  
                                                                                
 Create a Nexus role as defined by a role-config.yaml file.                     
                                                                                
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ *  --config    -c      <str>   Role config file for how the Nexus role       │
│                                should be created.                            │
│                                [required]                                    │
│ *  --settings  -s      <str>   Config file containing administrative         │
│                                settings.                                     │
│                                [required]                                    │
│    --help              <bool>  Show this message and exit.                   │
╰──────────────────────────────────────────────────────────────────────────────╯
# Example role-config.yaml. The top-level keys will be the role's id.
---
# Minimal config
lf-deployment:
  display_name: LF Deployment Role
  roles: # Define roles by ID or by Name
    - nx-deployment
    - analytics
# Full config with privileges (by name) and description defined.
LF Deployment By Name:
  display_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-uv 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 ────────────────────────────────────────────────────────────────────╮
│ *  --settings  -s      <str>   [required]                                    │
│    --help              <bool>  Show this message and exit.                   │
╰──────────────────────────────────────────────────────────────────────────────╯

docker¶

                                                                                
 Usage: lftools-uv nexus docker [OPTIONS] COMMAND [ARGS]...                     
                                                                                
 Docker repos in Nexus.                                                         
                                                                                
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --help        <bool>  Show this message and exit.                            │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ───────────────────────────────────────────────────────────────────╮
│ list               List images matching the PATTERN.                         │
│ delete             Delete all 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 lftools.ini, and provide the server address using the --server option.

delete¶

                                                                                
 Usage: lftools-uv 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.                                         
                                                                                
╭─ Arguments ──────────────────────────────────────────────────────────────────╮
│      PATTERN      <str>  [default: *]                                        │
│ *    REPO         <str>  [required]                                          │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --server    -s      <str>   Nexus server URL. Can also be set as NEXUS_URL   │
│                             in the environment. This will override any URL   │
│                             set in settings.yaml.                            │
│ --settings          <str>   Yaml file containing "nexus" (url), "user", and  │
│                             "password" definitions.                          │
│ --yes       -y      <bool>  Answer yes to all prompts                        │
│ --help              <bool>  Show this message and exit.                      │
╰──────────────────────────────────────────────────────────────────────────────╯

list¶

                                                                                
 Usage: lftools-uv 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.                                                                        
                                                                                
╭─ Arguments ──────────────────────────────────────────────────────────────────╮
│      PATTERN      <str>  [default: *]                                        │
│ *    REPO         <str>  [required]                                          │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --server    -s      <str>   Nexus server URL. Can also be set as NEXUS_URL   │
│                             in the environment. This will override any URL   │
│                             set in settings.yaml.                            │
│ --settings          <str>   Yaml file containing "nexus" (url), "user", and  │
│                             "password" definitions.                          │
│ --csv               <file>  Write a csv file of the search results to PATH.  │
│ --help              <bool>  Show this message and exit.                      │
╰──────────────────────────────────────────────────────────────────────────────╯

releasedockerhub¶

                                                                                
 Usage: lftools-uv nexus docker releasedockerhub [OPTIONS]                      
                                                                                
 Find missing repos in Docker Hub, Copy from Nexus3.                            
                                                                                
 Will by default list all missing repos in Docker Hub, compared to Nexus3. If   
 -c (--copy) is provided, it will copy the repos from Nexus3 to Docker Hub.     
                                                                                
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ *  --org                        -o      <str>   Specify repository           │
│                                                 organization.                │
│                                                 [required]                   │
│    --repo                       -r      <str>   Only repos containing this   │
│                                                 string will be selected.     │
│                                                 Default set to blank string, │
│                                                 which is every repo.         │
│    --exact                      -e      <bool>  Match the exact repo name.   │
│                                                 If used, --repo parameter    │
│                                                 can not be empty.            │
│    --summary                    -s      <bool>  Prints a summary of missing  │
│                                                 docker tags.                 │
│    --verbose                    -v      <bool>  Prints all collected         │
│                                                 repo/tag information.        │
│    --copy                       -c      <bool>  Copy missing tags from       │
│                                                 Nexus3 repos to Docker Hub   │
│                                                 repos.                       │
│    --progbar                    -p      <bool>  Display a progress bar for   │
│                                                 the time consuming jobs.     │
│    --repofile                   -f      <bool>  Repo Name is a file name,    │
│                                                 which contains one repo per  │
│                                                 row. Syntax: 'Nexus3         │
│                                                 docker.release repo';        │
│                                                 'dockerhub dockername'.      │
│                                                 Sample:                      │
│                                                 onap/msb/msb_apigateway;     │
│                                                 onap/msb-msb_apigateway      │
│    --version_regexp,--version…  -x      <str>   Specify a file which         │
│                                                 contains a regexp expression │
│                                                 to validate version number.  │
│                                                 File sample: ^\d+.\d+.\d+$   │
│    --help                               <bool>  Show this message and exit.  │
╰──────────────────────────────────────────────────────────────────────────────╯

The command also takes --version-regexp in place of --version_regexp.

release¶

                                                                                
 Usage: lftools-uv nexus release [OPTIONS] {repos}...                           
                                                                                
 Release one or more staging repositories.                                      
                                                                                
╭─ Arguments ──────────────────────────────────────────────────────────────────╮
│ *    repos...      <list[str]>  Staging repository IDs to release            │
│                                 [required]                                   │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --verify-only  -v      <bool>              Only verify the repositories      │
│ --server       -s      <str>               Nexus server URL. Can also be set │
│                                            as NEXUS_URL in the environment.  │
│                                            This will override any URL set in │
│                                            settings.yaml.                    │
│ --max-wait             <int range> [x>=1]  Minutes to wait for Nexus to      │
│                                            release each repository before    │
│                                            giving up.                        │
│                                            [default: 60]                     │
│ --help                 <bool>              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 lftools.ini, and provide the server address using the --server option. It requires a [nexus.example.com] section for each Nexus server:

[nexus.example.com]
username=
password=