Exit and entry gate rules enforce specific requirements. One or more rules can be configured within a single gate. The execution order for multiple rules can be modified within a gate. By default, gate rules run sequentially. To run in parallel, combine them into a group.
About gate rule functions
Gates in CloudBees CloudBees CD/RO encompass rules that must be satisfied before a pipeline can progress.
-
Entry gate rules control whether a stage may begin and its tasks may be executed.
-
Exit gate rules control whether the stage may be completed and the pipeline may progress.
Access gates in CloudBees CloudBees CD/RO from the Pipeline editor window using one of the following methods:
-
Navigate to Release Orchestration > Pipeline. Then, select the pipeline
namelink. -
Navigate to Release Orchestration > Pipeline Runs. Then, select the pipeline run instance
namelink. The pipeline editor window opens.
The following image of a three-stage pipeline shows entry and exit gates and their rules. The gates for the QA stage are shown collapsed.
-
Access gate rule functions.
-
Select
on the desired gate to define a new rule. -
Use Add rule to create a new rule.
-
Copy rule makes a duplicate rule and adds it to the gate.
-
Access gate rule properties, conditions, access control and change history by selecting
three-dots. -
Select the rule and
to delete a rule. -
Create a rule grouping by selecting one or more rules and
. -
Collapse the gate rule window by selecting
.
-
-
Manage rule configuration.
-
Use
to open an existing gate indicated by dark gray shading on either side of the stage. -
Modify gate group settings by selecting Group
three-dots.View gate group settings.
-
Details: Configure attributes on the Details, Definition, and Conditions tabs within the Edit group panel.
-
Run from group: Start the pipeline from the group location on the stage.
-
Make Serial or Make Parallel: Set grouped rule(s) to run all at once or sequentially.
-
Conditions: Use to configure group Run if, Wait until and Wait dependency, and New dependency settings.
-
Remove from group: Remove selected rule(s) from group.
-
Delete: Remove the rules and the group.
-
-
Edit rule details, definition, or conditions using the rule
namelink. -
The rule
three-dots opens the rule settings context menu.View rule settings.
-
Details: Configure attributes on the Details, Definition, and Conditions tabs within the Edit Rule panel.
-
Properties: Use to modify rule Properties.
-
Conditions: Use to configure rule Run if, Wait until and Wait Dependency, and New dependency settings.
-
Access Control: Configure access privileges for the rule.
-
Change History: View when changes were made to the rule, by whom, and the type of change performed.
-
Delete: Remove the rule.
-
-
The Rule type displays with an associated icon indicating the type of rule defined. Selecting the
Rule typelink opens the appropriate editor based on the type of rule. -
Enable
by hovering over the Rule type title. Select it to disable/enable the rule, view the project title, and error handling.
-
Create a gate rule
Navigate to the Pipeline Editor window:
-
Release Orchestreation > Pipelines. The pipelines window opens.
-
Select a pipeline
name. The pipeline editor window opens, displaying the pipeline. -
Select the Gate
on either side of the stage. -
Select Add rule.
-
Type in a
namefor the rule, such as“PreStageConfig”or“PostStageCleanup.” -
Continue configuring using one of the following methods:
-
Apply details, definitions, and conditions in the Edit rule panel by selecting Define.
-
Add the rule to the stage, but configure it later select Add.
The Edit rule panel opens on the Definition tab.
-
-
Select a Rule type:
-
Approval: Use when an approver must physically select the approval to move to the next rule or stage.
View Approval rule type options.
-
The Assignee field holds the name of the users or groups authorized to approve this rule. It can hold assignees and one or more users or one or more groups.
-
Use the $[ ] parameter notation to parameterize this field, for example, $[myGroup/userName]. Use the $[ ] parameter notation for the approver’s definition, so that only users and groups can be resolved from the property as rule approvers.
-
Emails are sent to email addresses in the property field, any user receiving the email can approve a rule If there are email addresses and user/group name(s) in the property, emails are sent to those addresses to resolve users/groups, but only users/groups are able to approve a rule.
-
(Optional) settings:
-
Minimum users to approve: Enter a positive integer.
-
Use approver’s permissions for the further Pipeline execution: Override access control already defined for the rule.
-
Allow to skip this rule: If selected, rule approval options include Skipped and Completed (or custom labels, if so configured) instead of Rejected and Completed. Use when rejecting a rule is not necessary or appropriate; a skipped rule does not record an error.
-
Instructions: Provide instructions to the approver for completing this task.
The Instructions field for all manual tasks supports using Markdown syntax. The following table provides the basic supported syntax:
Supported Markdown syntax
Table 1. Supported Markdown syntax Markdown syntax Supported? Example Bullet
- item1 - item2Character code
|Code
``` jobs: build: steps: - Compile ```Image
Formatting
**bold text** _italics_ ~~strike through~~Headings
# H1 HeaderHTML/Color
Hyperlink
[backend.tar](https://ourcompany.com/repo/backend.tar)Line break
The first paragraph of content. The next paragraph of content.Quotes section
> Quoted textTable
| Test | Results | |--------|---------| | Test 1 | PASS | | Test 2 | FAIL | | Test 3 | PASS | -
Use Custom Labels: If selected, define custom labels for Completed, Failed, and Skipped approval choices that match the rule.
-
Notification: If this is on, select a Default Manual rule notification template from the pulldown. Edit and create notification templates from here. Delete notification templates directly from the property page, /server/ec_deploy/ec_pipelineNotifierTemplates, available from User Menu > Server > Custom Server Properties.
-
Advanced Email Configuration: Select the email configuration corresponding to the context of the notifier you wish the notification to have. This feature requires one or more email configurations defined for your CloudBees CD/RO site. Refer to Email Configuration—create new or edit existing email configuration for further information.
-
-
-
Procedure: Use to run a set of best practices, subroutines, modules, or functions that you can create and reuse at the platform level. Examples are scripts, command sets, or other automation logic objects.
View Procedure rule type options.
-
Search: Locate an existing procedure.
-
Project: This field may auto-populate when selecting a procedure. Do one of the following to populate or modify:
-
Select the field to view and locate a project for the rule.
-
Type the name of a new object in the field. The
Create: "name"link appears. -
Select the
Create: "name"link. The
is enabled. -
Select
to access the object-specific editor to define the new project.
-
-
Procedure: This field may be auto-populated when selecting a procedure. Do one of the following to populate or modify:
-
Select the field to view and locate a procedure for the rule.
-
Type the name of a new object in the field. The
Create: "name"link appears.-
Select the
Create: "name"link. The
is enabled. -
Select
to access the object-specific editor to define the new project.
-
-
-
-
Custom: Use to define custom gate conditions. Refer to the section "Condition-Based Criteria" within Entry and exit gates for more information.
-
Plugin: Run third-party procedures that interface with external systems.
View plugin settings.
-
Search: Locate a plugin by the procedure name.
-
Search field: (Optional) Selecting a procedure name will auto-populate the Plugin name field and the procedure field.
-
Plugin: Select an available plugin.
-
Procedure: Select an available procedure.
-
Configurations: Select a configuration if available.
-
Input Parameters: Add required input and optional parameters.
-
Output Parameters: Add output parameters if available.
-
Assign Resources or Resource Pool: Select the resource where this stage executes.
-
-
-
Continue to the Details or Conditions tab to further customize the rule.
-
Apply all modifications and select Save changes.
Configure a rule group
Group rules together within a gate to organize, control and optimize the execution of rules within a pipeline. Rules that are grouped will run in parallel by default.
To group rules:
-
Within a gate, select one or more rules and Group
. The selected rules now appear within a Group window in the gate. -
Manage configurations by selecting Group
. The Group context menu opens. -
Configure group rules as needed. Refer to Pipeline UI for more details.
By default grouped rules are set to run in parallel. To run sequentially, select Group
three-dots and Make Serial.
Move rules or rule groups
Rules can be moved to change rule order within a gate or group or move a rule to a different group or a different gate.
To move a rule:
-
Select the rule to be moved.
-
Drag the rule to a new location within any gate, or rule group in the pipeline.
To move a rule group:
-
Select the group to be moved.
-
Drag the rule group to any exit or entry gate within the pipeline.