Documentation
¶
Index ¶
- func BuildImage(tarFile io.Reader, tags []string, labels map[string]string) (response string, err error)
- func BuildTarFromDir(sourcedir string) (tarContents *bytes.Buffer, err error)
- func FetchRepositories() ([]string, error)
- func GetCurrentSDKVersion() (string, error)
- func GetLatestTag(tags []string) (latestTag string, found bool)
- func GoBuildDir(checkDir string) error
- func GoTestDir(checkDir string) error
- func PushImage(imageName string, logger *log.Logger) (response string, err error)
- func RunCheckImage(imgName string, env []string) error
- func RunCheckReportImage(imgName string, env []string, target string, host bool) error
- type DirLastCommmit
- type ImageTagsInfo
- type ImageVersionInfo
- type RegistryConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildImage ¶
func BuildImage(tarFile io.Reader, tags []string, labels map[string]string) (response string, err error)
BuildImage builds and image given a tar, a list of tags and labels.
func BuildTarFromDir ¶
BuildTarFromDir builds a tar file in memory given a sourcedir.
func FetchRepositories ¶
FetchRepositories gets all docker repositories in artifactory. this can potentially return a lot of values but, unfortunately by now, we didn't found any way for querying artifactory only for the vulcan-checks folder.
func GetCurrentSDKVersion ¶
GetCurrentSDKVersion get the current sdk version. The function supposes the git repo of the sdk is already cloned locally.
func GetLatestTag ¶
GetLatestTag given an array of tags returns the last tag without considering alfanumerics values, for instance in for this input ["10","7","something"] will return 10. will return false if len of input is zero or no numeric values are present in the array.
func GoBuildDir ¶
GoBuildDir execute `go build .` in a process setting the Dir of the process to checkDir param. Also sets the GOOS var to linux.
func GoTestDir ¶
GoTestDir execute `go test .` in a process setting the Dir of the process to checkDir param.
func RunCheckImage ¶
RunCheckImage creates an runs a check in a container.
Types ¶
type DirLastCommmit ¶
DirLastCommmit stores information about last commit as returned by git log.
func GetLastCommitForDir ¶
func GetLastCommitForDir(dir string) (DirLastCommmit, error)
GetLastCommitForDir returns information about last commit in dir.
func GetLastCommitForDirInRepo ¶
func GetLastCommitForDirInRepo(dir, repoPath string) (DirLastCommmit, error)
GetLastCommitForDirInRepo returns information about last commit in dir.
type ImageTagsInfo ¶
ImageTagsInfo represents the info returned by "/[reponame]/[imagename]/tags/list" rest query.
func FetchImagesInfo ¶
func FetchImagesInfo(image string) (result ImageTagsInfo, err error)
FetchImagesInfo get information about images deployed in artifactory.
type ImageVersionInfo ¶
type ImageVersionInfo struct { LastModified time.Time Commit string SDKVersion string Manifest manifest.Data }
ImageVersionInfo stores the info about version of a check, that is the last commit affecting the check, and the sdk version, witch in turn, the last commit in the master branch of the sdk.
func FetchImageTagInfo ¶
func FetchImageTagInfo(image string, tag string) (ImageVersionInfo, error)
FetchImageTagInfo get information about a concrete image version deployed in artifactory.
type RegistryConfig ¶
RegistryConfig stores the name a credentials for a registry.