public final class ArtifactUtils
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
createRunId()
Creates a unique id for the run.
|
static com.google.cloud.storage.Storage |
createStorageClient(com.google.auth.Credentials credentials)
Creates a client for GCS with the given credentials.
|
static java.lang.String |
getFullGcsPath(java.lang.String... pathParts)
Returns the full GCS path given a list of path parts.
|
public static java.lang.String createRunId()
public static java.lang.String getFullGcsPath(java.lang.String... pathParts)
"path parts" refers to the bucket, directories, and file. Only the bucket is mandatory and must be the first value provided.
pathParts
- everything that makes up the path, minus the separators. There must be at
least one value, and none of them can be emptypublic static com.google.cloud.storage.Storage createStorageClient(com.google.auth.Credentials credentials)
credentials
- credentials to use for connecting. If not chosen, then this will use the
system credentials. Using system credentials is intended only for local testing. Otherwise,
it is best to pass in a short-lived access token.Storage
client for running GCS operations