golem

package module
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2018 License: MIT Imports: 8 Imported by: 0

README

golem

GoDoc CircleCI Go Report Card

Get artifacts from CircleCI

Usage

Download all artifacts to current directory.

$ golem -vcs github -user ushios -repository golem -branch master

Get private repository's artifacts using token (using -token option).

$ golem -token xxxxxxxx -vcs github -user ushios -repository golem -branch master
options
Usage of /usr/local/bin/golem:
  -branch string
    	branch name (default "master")
  -output string
    	output files destination directory (default "./")
  -prefix string
    	download file's prefix
  -repository string
    	respository name
  -token string
    	circle ci artifact build token
  -user string
    	github or bitbucket user name
  -vcs string
    	github or bitbucket (default "github")

Development

Get dependencies.

$ make dep

Testing

$ make test

Build Dockerfile for docker hub

$ make docker

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBuildNotFound = errors.New("build not found")
)
View Source
var (
	ErrVersionControlSystemNotFound = errors.New("version control system not found")
)

Functions

This section is empty.

Types

type Artifact

type Artifact interface {
	Path() string
	URL() url.URL
}

Artifact .

type CircleCIArtifact

type CircleCIArtifact struct {
	// contains filtered or unexported fields
}

func (*CircleCIArtifact) Path

func (c *CircleCIArtifact) Path() string

Path to artifact

func (*CircleCIArtifact) URL

func (c *CircleCIArtifact) URL() url.URL

URL of artifact

type Client

type Client interface {
	GetLatestSucceededBuildNum(v VersionControlSystem, acc, repo, branch string) (int, error)
	ListArtifacts(v VersionControlSystem, acc, repo string, buildNum int) ([]Artifact, error)
	GetArtifact(a Artifact) (io.ReadCloser, error)
}

Client interface for golem

func NewClient

func NewClient(token string) Client

NewClient interface for golem

type VersionControlSystem

type VersionControlSystem string
const (
	Github    VersionControlSystem = "github"
	BitBucket VersionControlSystem = "bitbucket"
)

func NewVersionControlSystemFromString

func NewVersionControlSystemFromString(s string) (VersionControlSystem, error)

func (VersionControlSystem) String

func (v VersionControlSystem) String() string

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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