nexus-artifact

command module
v0.0.0-...-3d1e82d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 21, 2023 License: MIT Imports: 10 Imported by: 0

README

nexus-artifact

Application to perform PUT and GET of artifacts in Nexus repository.

Objective

Run upload and get of artifacts in Nexus repository.

Build

Build application executable

# Build
go build -ldflags "-X 'main.version=dev' -X 'main.date=$(date '+%Y%m%d%H%M')' -X 'main.commit=$(git rev-parse HEAD)'"

# Show version
./nexus-artifact -v

Run

There should be a file list, which represent the artifacts that you want to recover or upload.

NOTE: You must have an application executable.

# GET
./nexus-artifact \
  --mode "GET" \
  --list "./artifacts.json" \
  --trust "./nexus.server.pem" \
  --parallelism 33

# PUT
./nexus-artifact \
  --mode "PUT" \
  --list "./artifacts.json" \
  --trust "./nexus.server.pem" \
  --parallelism 10 \
  --rerun-n 2 \
  --retry-failures
JSON artifacts file

PUT -> The JSON data model requires indicating url and file. Optionally contenttype.

{
  "artifacts": [
    {
      "url": "https://localhost:8443/repository/demo-raw/nexus-artifact/1.0.0/nexus-artifact",
      "file": "./demo/nexus-artifact",
      "contenttype": "text/plain"
    }
  ]
}

GET -> The JSON data model requires indicating url. Not required file and contenttype.

{
  "artifacts": [
    {
      "url": "https://localhost:8443/repository/demo-raw/nexus-artifact/1.0.0/nexus-artifact"
    }
  ]
}

Documents

DEMO

TODO

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package semerrgroup wraps a error group with a semaphore with configurable size, so you can control the number of tasks being executed simultaneously.
Package semerrgroup wraps a error group with a semaphore with configurable size, so you can control the number of tasks being executed simultaneously.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL