Code Monkey home page Code Monkey logo

go-artifactory's Introduction

go-artifactory

Build Status Go library and utilities for interacting with Artifactory

Usage

There are two ways to use this:

  • as a library
  • via the bundled utilities

as a library

package main

import (
	"fmt"

	artifactory "github.com/ttekin/go-artifactory/src/artifactory.v401"
)

func main() {
	/*
		NewClientFromEnv requires three environement variables:
		- ARTIFACTORY_URL (i.e. https://myartifactory.domain.com/artifactory)
		- ARTIFACTORY_USERNAME
    - ARTIFACTORY_PASSWORD
	*/
	client := artifactory.NewClientFromEnv()
	data, err := client.GetUsers()
	if err != nil {
		fmt.Println(err)
	} else {
		fmt.Printf("%+v\n", data)
	}
}

bundled utilities

git clone https://github.com/ttekin/go-artifactory.git
cd go-artifactory
make all
ARTIFACTORY_URL=https://artifactory.domain.com/artifactory ARTIFACTORY_USERNAME=foo ARTIFACTORY_PASSWORD=bar bin/artif-list-repos
+---------------------------------+---------+--------------------------------+------------------------------------------------------------------------+
|               KEY               |  TYPE   |          DESCRIPTION           |                                  URL                                   |
+---------------------------------+---------+--------------------------------+------------------------------------------------------------------------+
| dev-docker-local                | LOCAL   | Development Docker Registry    | https://artifactory/artifactory/dev-docker-local       |
| docker-local-v2                 | LOCAL   | Production Docker Repository   | https://artifactory/artifactory/docker-local-v2        |
| ext-release-local               | LOCAL   | Local repository for third     | https://artifactory/artifactory/ext-release-local      |
|                                 |         | party libraries                |                                                                        |
| ext-snapshot-local              | LOCAL   | Local repository for third     | https://artifactory/artifactory/ext-snapshot-local     |
|                                 |         | party snapshots                |                                                                        |
| libs-release-local              | LOCAL   | Local repository for in-house  | https://artifactory/artifactory/libs-release-local     |
|                                 |         | libraries                      |                                                                        |
| libs-snapshot-local             | LOCAL   | Local repository for in-house  | https://artifactory/artifactory/libs-snapshot-local    |
|                                 |         | snapshots                      |                                                                        |
| plugins-release-local           | LOCAL   | Local repository for plugins   | https://artifactory/artifactory/plugins-release-local  |
| plugins-snapshot-local          | LOCAL   | Local repository for plugins   | https://artifactory/artifactory/plugins-snapshot-local |
|                                 |         | snapshots                      |                                                                        |
| bower-remote                    | REMOTE  |                                | https://github.com/                                                    |
| docker-remote                   | REMOTE  |                                | https://registry-1.docker.io/                                          |
| jcenter                         | REMOTE  | Bintray Central Java           | http://jcenter.bintray.com                                             |
|                                 |         | repository                     |                                                                        |
| npm-remote                      | REMOTE  |                                | https://registry.npmjs.org                                             |
| nuget-remote                    | REMOTE  |                                | https://www.nuget.org/                                                 |
| pypi-remote                     | REMOTE  |                                | https://pypi.python.org                                                |
| rubygems-remote                 | REMOTE  |                                | https://rubygems.org/                                                  |
| nexus-releases-remote 	  | REMOTE  |                                | https://nexus/content/repositories/releases/        |
| libs-release                    | VIRTUAL |                                | https://artifactory/artifactory/libs-release           |
| libs-snapshot                   | VIRTUAL |                                | https://artifactory/artifactory/libs-snapshot          |
| plugins-release                 | VIRTUAL |                                | https://artifactory/artifactory/plugins-release        |
| plugins-snapshot                | VIRTUAL |                                | https://artifactory/artifactory/plugins-snapshot       |
| remote-repos                    | VIRTUAL |                                | https://artifactory/artifactory/remote-repos           |
+---------------------------------+---------+--------------------------------+------------------------------------------------------------------------+

TODO

  • Flesh out more tests
  • More utilities
  • Wrapper cli for sub-utilities

go-artifactory's People

Contributors

lusis avatar ttekin avatar jblaine avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.