Deployment Targets YAML
This page describes the YAML syntax used to configure deployment targets (environments).
Overview
Deployment targets enable the enforcement of strict conditions for triggering pipeline promotions.
You can restrict who and when a promotion can be triggered. By integrating promotions with Deployment Targets, you can establish secure Continuous Deployment pipelines that seamlessly align with your current setup.
A deployment target is created within a project and exclusively employed for multiple promotions.
apiVersion
Indicates the version of the syntax used.
The only supported value is: v1alpha
kind
Determines the type of resource to create.
For deployment targets, the value is: DeploymentTarget
metadata
Defines metadata properties for the deployment target.
Contains the following values:
id
This property is automatically generated. It is a unique identification for the deployment target.
name
A descriptive name for the deployment target.
The name should only include alphanumerical characters, dashes, underscores, and dots.
project_id
This property identifies the project to attach this deployment target. The value must be a valid project ID.
organization_id
This property identifies the organization to which this deployment target belongs. The value must be a valid organization ID.
created_by
The unique ID for the individual that created the deployment target.
created_at
The UTC time when the deployment target was created. Automatically populated by Semaphore.
updated_by
The unique ID for the individual that last updated the deployment target.
updated_at
The UTC time when the deployment target was last updated. Automatically populated by Semaphore.
description
A string to describe the deployment target.
url
A URL string associated with the deployment target.
spec
The spec
property contains a list of deployment target properties.
state
state_message
active
env_vars
files
bookmark_parameter1
bookmark_parameter2
bookmark_parameter3
subject_rules
object_rules
state
Indicates the state of the deployment target. The value should not be modified.
Possible values are:
SYNCING
USABLE
UNUSABLE
CORDONED
state_message
Provides a string message associated with the deployment target state
.
active
A boolean value indicates if the deployment target is active. It should not be modified.
bookmark_parameter1
This property can hold values to be used as filters for the deployment history.
For instance, if you set the parameter value to environment
and then create a parameterized promotion with environment: ['staging', 'production']
, you can use the filtering function in the Semaphore website to view deployment history per environment.
bookmark_parameter2
This property can hold values to be used to filter the deployment history. Works just like bookmark_parameter1
.
bookmark_parameter3
This property can hold values to be used to filter the deployment history. Works just like bookmark_parameter1
.
env_vars
A list of environment variables for the deployment target.
Each item list consists of a pair of properties:
name
: the name of the environment variablevalue
: the value of the variable
files
This property consists of a list of files to be used in the deployment target.
Each item in the list consists of these properties:
path
: path to the file in the job environmentcontent
: base64 encoded content of the file. If the value includes the suffix[md5]
, this indicates that a hashed value has been received for security reasonssource
: represents the path on your host machine of the file you want to assign to the deployment target. It is only used when creating or updating the file property
subject_rules
The subject_rules
property holds a list of subject rules that determine who
can trigger promotions when the deployment target is associated with them.
Each item in the list can contain these properties:
type
Used to define subject rules in the deployment target. The contents of this property are a list with rules to allow deployment targets to be used.
Semaphore processes the rules in the supplied order and allows the promotion when one rule is matched.
The type
property can take the following values:
ANY
: all users can trigger the promotionUSER
: a specific user can trigger the promotionROLE
: the role that can trigger the promotion. Users with this rule are allowedAUTO
: allows auto-promotion conditions to trigger the promotion