Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AQL ¶
type AQL struct { Raw string `json:"raw,omitempty"` // Raw AQL to filter versions on Repo string `json:"repo,omitempty"` // Repo within Artifactory to search Image string `json:"image,omitempty"` // Image to match Tag string `json:"tag,omitempty"` // Tag of image to match, defaults to `latest` }
AQL provides the version query structure
func (*AQL) SetModifiedTime ¶
SetModifiedTime appends the version modified time to the raw AQL query
func (*AQL) UnmarshalJSON ¶
UnmarshalJSON custom unmarshaller to convert PR number
type CheckRequest ¶
CheckRequest is the data struct received from Concoruse by the resource check operation
func (*CheckRequest) Read ¶
func (r *CheckRequest) Read(input []byte) error
Read will read the json response from Concourse via stdin
type CheckResponse ¶
type CheckResponse []Version
CheckResponse is the data struct returned to Concourse by the resource check operation
func Check ¶
func Check(req CheckRequest) (CheckResponse, error)
Check performs the check operation for the resource
func (CheckResponse) Len ¶
func (r CheckResponse) Len() int
Len returns the number of versions in the response
func (CheckResponse) Write ¶
func (r CheckResponse) Write() error
Write will write the json response to stdout for Concourse to parse
type GetParameters ¶
type GetParameters struct { Format string `json:"format"` // Format defaults to `rootfs` (used for task steps), to write image to tarball, use `oci` SkipDownload bool `json:"skip_download"` // SkipDownload is used with `put` steps to skip `get` step that Concourse runs by default }
GetParameters is the configuration for a resource step
type GetRequest ¶
type GetRequest struct { Source Source `json:"source"` Version Version `json:"version"` Params GetParameters `json:"params"` }
GetRequest is the data struct received from Concoruse by the resource get operation
func (*GetRequest) OCIRepository ¶
func (r *GetRequest) OCIRepository() string
OCIRepository uses Source & Version to generate container registry compliant url
func (*GetRequest) Read ¶
func (r *GetRequest) Read(input []byte) error
Read will read the json response from Concourse via stdin
type GetResponse ¶
type GetResponse struct { Version Version `json:"version"` Metadata m.Metadata `json:"metadata,omitempty"` }
GetResponse ...
func Get ¶
func Get(req GetRequest, dir string) (GetResponse, error)
Get performs the get operation for the resource
func Put ¶
func Put(req PutRequest, dir string) (GetResponse, error)
Put performs the Put operation for the resource
func (GetResponse) Write ¶
func (r GetResponse) Write() error
Write will write the json response to stdout for Concourse to parse
type PutParameters ¶
type PutParameters struct { Pattern string `json:"pattern"` // Pattern to search inputs for image tarbull to push in GLOB form, e.g. `input/image.tar` Image string `json:"image"` // Image to push, e.g. owner/image Target string `json:"target,omitempty"` // Target Artifactory repository, required if not using a Proxy Tags []string `json:"tags,omitempty"` // Tags is the list of tags to apply to the image Properties string `json:"properties,omitempty"` // Properties is file path containing image properties in `key=value\n` form Params string `json:"params,omitempty"` // Params is a file path containing the Image struct in json syntax for dynamic workflows BuildEnv string `json:"build_env,omitempty"` // BuildEnv is path to file containing build environment values in `key=value\n` form, e.g. `env > env.txt` EnvInclude string `json:"env_include,omitempty"` // EnvInclude case insensitive patterns in the form of "value1;value2;..." will be included EnvExclude string `json:"env_exclude,omitempty"` // EnvExclude case insensitive patterns in the form of "value1;value2;..." will be excluded, defaults to `*password*;*psw*;*secret*;*key*;*token*` RepositoryPath string `json:"repo_path,omitempty"` // RepositoryPath sets the path to the input containing the repository (git support only) Repository string `json:"repo,omitempty"` // Repository set the Git repository url explicitly for compatibility with the Git resource Get GetParameters `json:"get,omitempty"` // Get parameters for explicit get step after put }
PutParameters for the resource
func (*PutParameters) Parse ¶
func (p *PutParameters) Parse() error
Parse reads a file and unmarshals into itself
type PutRequest ¶
type PutRequest struct { Source Source `json:"source"` Params PutParameters `json:"params"` }
PutRequest is the data struct received from Concoruse by the resource put operation
func (*PutRequest) OCIRepository ¶
func (r *PutRequest) OCIRepository() string
OCIRepository uses Source & Params to generate container registry compliant url
func (*PutRequest) Read ¶
func (r *PutRequest) Read(input []byte) error
Read will read the json response from Concourse via stdin
type Source ¶
type Source struct { Endpoint string `json:"endpoint"` // Endpoint for Artifactory AQL API (leave blank for cloud) User string `json:"user,omitempty"` // User for Artifactory API with permissions to Repository Password string `json:"password,omitempty"` // Password for Artifactory API with permissions to Repository AccessToken string `json:"access_token"` // AccessToken for Artifactory API with permissions to Repository APIKey string `json:"api_key,omitempty"` // APIKey for Artifactory API with permissions to Repository Host string `json:"host"` // Host is used to get / put the image via the Docker v2 registry api AQL AQL `json:"aql"` // AQL details to search for Proxy bool `json:"proxy,omitempty"` // Proxy if you are using a proxy, defaults to false & direct access, see: https://www.jfrog.com/confluence/display/JFROG/HTTP+Settings#HTTPSettings-DockerReverseProxySettings }
Source represents the configuration for the resource
type Version ¶
type Version struct { Repo string `json:"repo,omitempty"` Image string `json:"image,omitempty"` Tag string `json:"tag,omitempty"` Digest string `json:"digest,omitempty"` Modified time.Time `json:"modified,omitempty"` }
Version contains the version data Concourse uses to determine if a build should run
func (*Version) ArtifactoryPath ¶
ArtifactoryPath builds the internal path for an manifest based on the version