Configuring Parameters

Parameters are names of placeholders that exist in DevOps resources. They are available to all resources within the pipeline.

To configure a pipeline parameter, you must have a build pipeline or a deployment pipeline.

All parameters used in the pipeline must have a value before the pipeline is run. When the pipeline is run, you have the option to override the default value of the parameter with an argument value for that particular run. If a parameter has both argument and default value, then the argument value takes precedence.

A pipeline parameter name can be used in a placeholder that exists in DevOps resources and certain API fields. Placeholders are special strings with a unique format, ${parameterName}. When a pipeline is run, the placeholder is substituted with the value of the corresponding pipeline parameter.

Placeholders can be used as input in DevOps resources such as pipeline, stage, or artifact resource. For example, a placeholder can be used while adding a DevOps artifact resource such as in the artifact version or a Container Registry tag. Any placeholders in the artifacts are substituted by the corresponding parameter values by choosing "Yes, substitute parameter" in the artifact configuration. For more details, see Managing Artifacts.

Placeholders can also be used in the content of an artifact, such as instance group deployment specification or a Kubernetes manifest. Consider the following two examples where you can use placeholders:
  • In Kubernetes manifest, you can define the replicas as replicas: ${nginxReplicaCount}.
  • In the instance group deployment specification, you can set an environment variable version as version: ${appVersion}. For more details, see deployment configuration file.

Here's how you can define pipeline parameters using the Console:

For accessing DevOps using the Oracle Cloud Console, REST API, and CLI, see Accessing DevOps.

  1. Open the navigation menu and click Developer Services. Under DevOps, click Projects.
  2. Select a project and a pipeline (build or deployment) associated with that project.
  3. Click the Parameters tab.
  4. Enter a name for the parameter.

    Parameter names are case-sensitive, and can consist of letters, numbers, or underscores. Example: appVersion.

  5. (Optional) Enter a default value for the parameter. Example: 1.2
  6. Enter a description of the parameter. Example: This is the version of application hello_world.
  7. To save the parameter, click the + icon.

Before starting the pipeline run, use the default value of the parameter or override with an argument value.