Package io.github.cdklabs.projen.gitlab
Class Service.Builder
- java.lang.Object
-
- io.github.cdklabs.projen.gitlab.Service.Builder
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Service.Builderalias(String alias)Sets the value ofService.getAlias()Servicebuild()Builds the configured instance.Service.Buildercommand(List<String> command)Sets the value ofService.getCommand()Service.Builderentrypoint(List<String> entrypoint)Sets the value ofService.getEntrypoint()Service.Buildername(String name)Sets the value ofService.getName()Service.BuilderpullPolicy(List<? extends PullPolicy> pullPolicy)Sets the value ofService.getPullPolicy()Service.Buildervariables(Map<String,String> variables)Sets the value ofService.getVariables()
-
-
-
Method Detail
-
name
@Stability(Experimental) public Service.Builder name(String name)
Sets the value ofService.getName()- Parameters:
name- Full name of the image that should be used. This parameter is required. It should contain the Registry part if needed.- Returns:
this
-
alias
@Stability(Experimental) public Service.Builder alias(String alias)
Sets the value ofService.getAlias()- Parameters:
alias- Additional alias that can be used to access the service from the job's container. Read Accessing the services for more information.- Returns:
this
-
command
@Stability(Experimental) public Service.Builder command(List<String> command)
Sets the value ofService.getCommand()- Parameters:
command- Command or script that should be used as the container's command. It will be translated to arguments passed to Docker after the image's name. The syntax is similar to Dockerfile's CMD directive, where each shell token is a separate string in the array.- Returns:
this
-
entrypoint
@Stability(Experimental) public Service.Builder entrypoint(List<String> entrypoint)
Sets the value ofService.getEntrypoint()- Parameters:
entrypoint- Command or script that should be executed as the container's entrypoint. It will be translated to Docker's --entrypoint option while creating the container. The syntax is similar to Dockerfile's ENTRYPOINT directive, where each shell token is a separate string in the array.- Returns:
this
-
pullPolicy
@Stability(Experimental) public Service.Builder pullPolicy(List<? extends PullPolicy> pullPolicy)
Sets the value ofService.getPullPolicy()- Parameters:
pullPolicy- The pull policy that the runner uses to fetch the Docker image.- Returns:
this
-
variables
@Stability(Experimental) public Service.Builder variables(Map<String,String> variables)
Sets the value ofService.getVariables()- Parameters:
variables- Additional environment variables that are passed exclusively to the service..- Returns:
this
-
build
@Stability(Experimental) public Service build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<Service>- Returns:
- a new instance of
Service - Throws:
NullPointerException- if any required attribute was not provided
-
-