part ·
![PRs Welcome](https://camo.githubusercontent.com/d88d8d77fa79e828eea397f75a1ebd114d13488aeec4747477ffbd2274de95ed/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5052732d77656c636f6d652d627269676874677265656e2e737667)
Publish to artifactory as a cli
Part is a simple cli that take some command line parameters (part -h for documentation) and an artifact (zip, jar, etc). It then creates a maven pom and publishes it and the artifact to artifactory. This allows for easy publishing of artifacts that can be found via Maven GAVC (Group, Artifact, Version, Classifier) style searches via the artifactory rest api. See the maven pom reference for more details about gavc coordinates generally and the artifactory rest documentation for artifactory GAVC searches.
If you are using this as part of a golang build process, just install via standard go tools:
go install -a github.com/MediaMath/part
Otherwise you can download the latest zip package of it:
wget https://artifactory.mediamath.com/artifactory/libs-release-global/com/mediamath/part/[RELEASE]/part-[RELEASE].zip
The artifactory rest api endpoint must be provided either on the command line via the -h flag or via the ARTIFACTORY_HOST parameter. This should be the fully formed REST API endpoint, not just the host domain. (e.g. https://artifactory.mediamath.com/artifactory).
Part allows for the publishing to artifactory via basic auth via one of the following 3 mechanisms.
If a filename is passed in via the -credentials flag with the .json file extension, it will be parsed as a json object expected to be of the form:
{
"user":"username",
"password":"password"
}
If a filename is passed in via the -credentials flag without the .json file extension, it will be parsed as a limited ini file of the form:
user=username
password=password
If no filename is passed in via the -credentials flag part will look for the ARTIFACTORY_USER and ARTIFACTORY_PASSWORD environment variables for authentication.
If no filename is passed and both environment variables are not provided, part will attempt to publish without authentication.