github.hscsec.cn/openshift/source-to-image@v1.2.0/pkg/api/constants/labels.go (about)

     1  package constants
     2  
     3  // Docker image label constants
     4  const (
     5  	// OpenshiftNamespace is the namespace for Docker image labels used by OpenShift Origin.
     6  	OpenshiftNamespace = "io.openshift."
     7  
     8  	// DefaultNamespace is the default namespace for Docker image labels used and produced by S2I.
     9  	DefaultNamespace = OpenshiftNamespace + "s2i."
    10  
    11  	// KubernetesNamespace is the namespace for Docker image labels used by Kubernetes.
    12  	KubernetesNamespace = "io.k8s."
    13  
    14  	// KubernetesDescriptionLabel is the Docker image LABEL that provides an image description to Kubernetes.
    15  	KubernetesDescriptionLabel = KubernetesNamespace + "description"
    16  
    17  	// KubernetesDisplayNameLabel is the Docker image LABEL that provides a human-readable name for the image to Kubernetes.
    18  	KubernetesDisplayNameLabel = KubernetesNamespace + "display-name"
    19  
    20  	// AssembleInputFilesLabel is the Docker image LABEL that tells S2I which files wil be copied from builder to a runtime image.
    21  	AssembleInputFilesLabel = DefaultNamespace + "assemble-input-files"
    22  
    23  	// AssembleRuntimeUserLabel is the Docker image label that tells S2I which user should execute the assemble-runtime scripts.
    24  	AssembleRuntimeUserLabel = DefaultNamespace + "assemble-runtime-user"
    25  
    26  	// AssembleUserLabel is the Docker image label that tells S2I which user should execute the assemble scripts.
    27  	AssembleUserLabel = DefaultNamespace + "assemble-user"
    28  
    29  	buildNamespace = DefaultNamespace + "build."
    30  
    31  	// BuildCommitRefLabel is the Docker image LABEL that S2I uses to record the source commit used to produce the S2I image.
    32  	//
    33  	// During a rebuild, this label is used by S2I to check out the appropriate commit from the source repository.
    34  	BuildCommitRefLabel = buildNamespace + "commit.ref"
    35  
    36  	// BuildImageLabel is the Docker image LABEL that S2I uses to record the builder image used to produce the S2I image.
    37  	//
    38  	// During a rebuild, this label is used by S2I to pull the appropriate builder image.
    39  	BuildImageLabel = buildNamespace + "image"
    40  
    41  	// BuildSourceLocationLabel is the Docker image LABEL that S2I uses to record the URL of the source repository used to produce the S2I image.
    42  	//
    43  	// During a rebuild, this label is used by S2I to clone the appropriate source code repository.
    44  	BuildSourceLocationLabel = buildNamespace + "source-location"
    45  
    46  	// BuildSourceContextDir is the Docker image LABEL that S2I uses to record the context directory in the source code repository to use for the  build.
    47  	//
    48  	// During a rebuild, this label is used by S2I to set the context directory within the source code for the S2I build.
    49  	BuildSourceContextDirLabel = buildNamespace + "source-context-dir"
    50  
    51  	// TODO: Deprecate BuilderVersionLabel?
    52  
    53  	// BuilderBaseVersionLabel is the Docker image LABEL that tells S2I the version of the base image used by the builder image.
    54  	BuilderBaseVersionLabel = OpenshiftNamespace + "builder-base-version"
    55  
    56  	// BuilderVersionLable is the  Docker image LABEL that tells S2I the version of the builder image.
    57  	BuilderVersionLabel = OpenshiftNamespace + "builder-version"
    58  
    59  	// DestinationLabel is the Docker image LABEL that tells S2I where to place the artifacts (scripts, sources) in the builder image.
    60  	DestinationLabel = DefaultNamespace + "destination"
    61  
    62  	// ScriptsURLLabel is the Docker image LABEL that tells S2I where to look for the S2I scripts.
    63  	// This label is also copied into the output image.
    64  	ScriptsURLLabel = DefaultNamespace + "scripts-url"
    65  )
    66  
    67  // Deprecated Docker image labels
    68  const (
    69  	// DeprecatedScriptsURLLabel is the Docker image LABEL that previously told S2I where to look for the S2I scripts.
    70  	//
    71  	// DEPRECATED - use ScriptsURLLabel instead.
    72  	DeprecatedScriptsURLLabel = "io.s2i.scripts-url"
    73  
    74  	// DeprecatedDestinationLabel is the Docker image LABEL that previously told S2I where to place the artifacts in the builder image.
    75  	//
    76  	// DEPRECATED - use DestinationLabel instead.
    77  	DeprecatedDestinationLabel = "io.s2i.destination"
    78  )