constants

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: Apache-2.0 Imports: 1 Imported by: 25

Documentation

Overview

Package constants provides constants used across s2i.

Index

Constants

View Source
const (
	// LocationEnvironment is the environment variable that specifies where to place artifacts in a builder image.
	//
	// DEPRECATED - use DestinationLabel instead.
	LocationEnvironment = "STI_LOCATION"
	// ScriptsURLEnvironment is the environment variable name that specifies where to look for S2I scripts.
	//
	// DEPRECATED - use ScriptsURLLabel instead.
	ScriptsURLEnvironment = "STI_SCRIPTS_URL"
)

Deprecated Docker ENV variables

View Source
const (
	// OpenshiftNamespace is the namespace for Docker image labels used by OpenShift Origin.
	OpenshiftNamespace = "io.openshift."

	// DefaultNamespace is the default namespace for Docker image labels used and produced by S2I.
	DefaultNamespace = OpenshiftNamespace + "s2i."

	// KubernetesNamespace is the namespace for Docker image labels used by Kubernetes.
	KubernetesNamespace = "io.k8s."

	// KubernetesDescriptionLabel is the Docker image LABEL that provides an image description to Kubernetes.
	KubernetesDescriptionLabel = KubernetesNamespace + "description"

	// KubernetesDisplayNameLabel is the Docker image LABEL that provides a human-readable name for the image to Kubernetes.
	KubernetesDisplayNameLabel = KubernetesNamespace + "display-name"

	// AssembleInputFilesLabel is the Docker image LABEL that tells S2I which files wil be copied from builder to a runtime image.
	AssembleInputFilesLabel = DefaultNamespace + "assemble-input-files"

	// AssembleRuntimeUserLabel is the Docker image label that tells S2I which user should execute the assemble-runtime scripts.
	AssembleRuntimeUserLabel = DefaultNamespace + "assemble-runtime-user"

	// AssembleUserLabel is the Docker image label that tells S2I which user should execute the assemble scripts.
	AssembleUserLabel = DefaultNamespace + "assemble-user"

	// BuildCommitRefLabel is the Docker image LABEL that S2I uses to record the source commit used to produce the S2I image.
	//
	// During a rebuild, this label is used by S2I to check out the appropriate commit from the source repository.
	BuildCommitRefLabel = buildNamespace + "commit.ref"

	// BuildImageLabel is the Docker image LABEL that S2I uses to record the builder image used to produce the S2I image.
	//
	// During a rebuild, this label is used by S2I to pull the appropriate builder image.
	BuildImageLabel = buildNamespace + "image"

	// BuildSourceLocationLabel is the Docker image LABEL that S2I uses to record the URL of the source repository used to produce the S2I image.
	//
	// During a rebuild, this label is used by S2I to clone the appropriate source code repository.
	BuildSourceLocationLabel = buildNamespace + "source-location"

	// BuildSourceContextDir is the Docker image LABEL that S2I uses to record the context directory in the source code repository to use for the  build.
	//
	// During a rebuild, this label is used by S2I to set the context directory within the source code for the S2I build.
	BuildSourceContextDirLabel = buildNamespace + "source-context-dir"

	// BuilderBaseVersionLabel is the Docker image LABEL that tells S2I the version of the base image used by the builder image.
	BuilderBaseVersionLabel = OpenshiftNamespace + "builder-base-version"

	// BuilderVersionLable is the  Docker image LABEL that tells S2I the version of the builder image.
	BuilderVersionLabel = OpenshiftNamespace + "builder-version"

	// DestinationLabel is the Docker image LABEL that tells S2I where to place the artifacts (scripts, sources) in the builder image.
	DestinationLabel = DefaultNamespace + "destination"

	// ScriptsURLLabel is the Docker image LABEL that tells S2I where to look for the S2I scripts.
	// This label is also copied into the output image.
	ScriptsURLLabel = DefaultNamespace + "scripts-url"
)

Docker image label constants

View Source
const (
	// DeprecatedScriptsURLLabel is the Docker image LABEL that previously told S2I where to look for the S2I scripts.
	//
	// DEPRECATED - use ScriptsURLLabel instead.
	DeprecatedScriptsURLLabel = "io.s2i.scripts-url"

	// DeprecatedDestinationLabel is the Docker image LABEL that previously told S2I where to place the artifacts in the builder image.
	//
	// DEPRECATED - use DestinationLabel instead.
	DeprecatedDestinationLabel = "io.s2i.destination"
)

Deprecated Docker image labels

View Source
const (
	// Assemble is the name of the script responsible for the build process of the resulting image.
	Assemble = "assemble"

	// AssembleRuntime is the name of the script responsible for the preparation process of the resulting image.
	AssembleRuntime = "assemble-runtime"

	// Run is the name of the script responsible for running the final application.
	Run = "run"

	// SaveArtifacts is the name of the script responsible for storing dependencies etc. between builds.
	SaveArtifacts = "save-artifacts"

	// Usage is the name of the script responsible for printing the builder image's short info.
	Usage = "usage"

	// Environment contains list of key value pairs that will be set during the STI build.
	// Users can use this file to provide extra configuration depending on the builder image used.
	Environment = "environment"

	// UserScripts is the location of scripts downloaded from user provided URL (-s flag).
	UserScripts = "downloads" + string(os.PathSeparator) + "scripts"

	// DefaultScripts is the location of scripts downloaded from default location (io.openshift.s2i.scripts-url label).
	DefaultScripts = "downloads" + string(os.PathSeparator) + "defaultScripts"

	// SourceScripts is the location of scripts downloaded with application sources.
	SourceScripts = "upload" + string(os.PathSeparator) + "src" + string(os.PathSeparator) + ".s2i" + string(os.PathSeparator) + "bin"

	// UploadScripts is the location of scripts that will be uploaded to the image during STI build.
	UploadScripts = "upload" + string(os.PathSeparator) + "scripts"

	// Source is the location of application sources.
	Source = "upload" + string(os.PathSeparator) + "src"

	// Injections is the location of injection content (configmaps+secrets).
	Injections = "upload" + string(os.PathSeparator) + "injections"

	// ContextTmp is the location of applications sources off of a supplied context dir
	ContextTmp = "upload" + string(os.PathSeparator) + "tmp"

	// RuntimeArtifactsDir is the location of application artifacts and scripts that will be copied into a runtime image.
	RuntimeArtifactsDir = "upload" + string(os.PathSeparator) + "runtimeArtifacts"

	// IgnoreFile is the s2i version for ignore files like we see with .gitignore or .dockerignore .. initial impl mirrors documented .dockerignore capabilities
	IgnoreFile = ".s2iignore"
)

Variables

This section is empty.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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