resource

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package resource is a Concourse resource to update the GitHub status.

See the README file for additional information.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildInfo

func BuildInfo() string

BuildInfo returns human-readable build information (tag, git commit, date, ...). This is useful to understand in the Concourse UI and logs which resource it is, since log output in Concourse doesn't mention the name of the resource (or task) generating it.

func GitCommit added in v0.2.0

func GitCommit(repoPath string) (string, error)

GitCommit looks into a git repository and extracts the commit SHA of the HEAD.

Types

type Resource

type Resource struct{}

Resource satisfies the ofcourse.Resource interface.

func (*Resource) Check

func (r *Resource) Check(
	source oc.Source,
	version oc.Version,
	env oc.Environment,
	log *oc.Logger,
) ([]oc.Version, error)

Check satisfies ofcourse.Resource.Check(), corresponding to the /opt/resource/check command.

func (*Resource) In

func (r *Resource) In(
	outputDirectory string,
	source oc.Source,
	params oc.Params,
	version oc.Version,
	env oc.Environment,
	log *oc.Logger,
) (oc.Version, oc.Metadata, error)

In satisfies ofcourse.Resource.In(), corresponding to the /opt/resource/in command.

func (*Resource) Out

func (r *Resource) Out(
	inputDirectory string,
	source oc.Source,
	params oc.Params,
	env oc.Environment,
	log *oc.Logger,
) (oc.Version, oc.Metadata, error)

Out satisfies ofcourse.Resource.Out(), corresponding to the /opt/resource/out command.

Jump to

Keyboard shortcuts

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