Documentation
¶
Index ¶
- type CopyOptions
- type Exporter
- func (e *Exporter) ExportOutput(key, value string) error
- func (e *Exporter) ExportOutputDir(envKey, srcDir, dstDir string) error
- func (e *Exporter) ExportOutputFile(key, sourcePath, destinationPath string) error
- func (e *Exporter) ExportOutputFilesZip(key string, sourcePaths []string, zipPath string) error
- func (e *Exporter) ExportOutputNoExpand(key, value string) error
- func (e *Exporter) ExportSecretOutput(key, value string) error
- func (e *Exporter) ExportStringToFileOutput(envKey, content, dst string) error
- func (e *Exporter) ExportStringToFileOutputAndReturnLastNLines(envKey, content, dst string, lines int) (string, error)
- type FileManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CopyOptions ¶
type CopyOptions = fileutil.CopyOptions
CopyOptions configures a [FileManager.CopyFile] operation. A nil pointer means default behavior.
type Exporter ¶
type Exporter struct {
// contains filtered or unexported fields
}
Exporter ...
func NewExporter ¶
func NewExporter(cmdFactory command.Factory, fm FileManager) Exporter
NewExporter ...
func (*Exporter) ExportOutput ¶
ExportOutput is used for exposing values for other steps. Regular env vars are isolated between steps, so instead of calling `os.Setenv()`, use this to explicitly expose a value for subsequent steps.
func (*Exporter) ExportOutputDir ¶
ExportOutputDir is a convenience method for copying sourceDir to destinationDir and then exporting the absolute destination dir with ExportOutput() Note: symlinks are preserved during the copy operation
Attention: This method will overwrite the dstDir if existing prior to calling this; this is intentional. No errors or warnings will be returned for this.
func (*Exporter) ExportOutputFile ¶
ExportOutputFile is a convenience method for copying sourcePath to destinationPath and then exporting the absolute destination path with ExportOutput().
Attention: This method will overwrite the destinationPath if existing prior to calling this; this is intentional. No errors or warnings will be returned for this.
func (*Exporter) ExportOutputFilesZip ¶
ExportOutputFilesZip is a convenience method for creating a ZIP archive from sourcePaths at zipPath and then exporting the absolute path of the ZIP with ExportOutput()
Attention: This method will overwrite the zipPath if existing prior to calling this; this is intentional. No errors or warnings will be returned for this.
func (*Exporter) ExportOutputNoExpand ¶
ExportOutputNoExpand works like ExportOutput but does not expand environment variables in the value. This can be used when the value is unstrusted or is beyond the control of the step.
func (*Exporter) ExportSecretOutput ¶
ExportSecretOutput is used for exposing secret values for other steps. Regular env vars are isolated between steps, so instead of calling `os.Setenv()`, use this to explicitly expose a secret value for subsequent steps.
func (*Exporter) ExportStringToFileOutput ¶
ExportStringToFileOutput is a convenience method for writing content to dst and then exporting the absolute dst path with ExportOutputFile()
Attention: This method will overwrite the dst if existing prior to calling this; this is intentional. No errors or warnings will be returned for this.
func (*Exporter) ExportStringToFileOutputAndReturnLastNLines ¶
func (e *Exporter) ExportStringToFileOutputAndReturnLastNLines(envKey, content, dst string, lines int) (string, error)
ExportStringToFileOutputAndReturnLastNLines is similar to ExportStringToFileOutput but it also returns the last N lines of the content.
Attention: This method will overwrite the dst if existing prior to calling this; this is intentional. No errors or warnings will be returned for this.
type FileManager ¶
type FileManager = fileutil.FileManager
FileManager defines file management operations.
func NewFileManager ¶
func NewFileManager() FileManager
NewFileManager creates a new FileManager instance.