Documentation ¶
Index ¶
Constants ¶
const ( // PROJECT represents project in command line arguments for push, pull and yank commands. PROJECT = "project" // WORKFLOW represents workflow in command line arguments for push, pull and yank commands. WORKFLOW = "workflow" // JOB represents job in command line arguments for push, pull and yank commands. JOB = "job" // ExpirePrefix is where object expires are stored in the same bucket. ExpirePrefix = "var/expires-in/" )
Variables ¶
Functions ¶
func InitPathID ¶
InitPathID initiates path category ID. The default is an empty string, in that case the ID is read from environment variable. Otherwise it comes from command-line argument --job-id or --workflow-id.
func PathFromSource ¶
PathFromSource returns a path where destination filename can be empty. If it's empty, the name is gained from the source filename.
func PrefixedPath ¶
PrefixedPath returns paths for Google Cloud Storage. For project files, it returns like: artifacts/projects/<SEMAPHORE_PROJECT_ID>/x.zip For workflow files, it returns like: artifacts/workflows/<SEMAPHORE_WORKFLOW_ID>/x.zip For job files, it returns like: artifacts/jobs/<SEMAPHORE_JOB_ID>/x.zip
func PrefixedPathFromSource ¶
PrefixedPathFromSource returns a path for Google Cloud Storage, where destination filename can be empty. In this case filename is gained from source filename, eg. uploading /from/this/path/x.zip with empty --destination to the project will return artifacts/projects/<SEMAPHORE_PROJECT_ID>/x.zip, but with --destination=y.zip will result in artifacts/projects/<SEMAPHORE_PROJECT_ID>/y.zip .
func ToRelative ¶
ToRelative removes all ./, ../ etc prefixes from the string.
Types ¶
This section is empty.