Creating and Editing a Pipeline Version

Creating and Editing a Pipeline Version

To create a new pipeline, navigate to the Pipelines screen through the menu, and click on the Create button. Provide a name and click on Create to continue with the configuration.

To edit an existing pipeline, click on the Pipeline Name column of the target pipeline in the list of pipelines. Creating or Editing a pipeline should open up the Pipeline Definition where Stages/Environments and their constituent Gates/Steps can be added

Pipeline Info

The Pipeline Info provides general details about the current pipeline and a list of all the Releases using the pipeline. The releases in the Used By section can be accessed directly by clicking on them.

Definition

The Definition tab provides the definition of the pipeline stages, and their constituent steps and gates.  Changes to the pipeline, like a workflow, are versioned so that changes can be published to consumers or previous versions can be reverted.

To add stages to the pipeline version, see Creating/Editing a Pipeline Stage

Once the stages are added to the pipeline version you can reorder by clicking the arrows on each stage, or delete the stage by clicking the Delete Stage option from the extended menu on each stage. In addition, for quicker configuration, you have the option to copy any number of gates/steps from one stage to another using the Copy Stage or Copy Gates/Steps option from the extended menu. Using the copy feature will add the gates or steps selected to the end of the target stage. To view/edit the stage, click on the edit button.

Click the Save Draft button to save your changes and continue with further updates. The Compare Versions button next to the version can be used to view the difference between the current and previous versions of the pipeline.  


Once all the changes are complete, use the Activate button at the bottom to activate the current pipeline version. Upon activation, the previously active version becomes inactive. Once a version has been activated it is locked from future edits, and you must click the edit button to create a new version in order to make further changes.  You can switch the editor to another version of the pipeline by selecting the desired version in the Version drop-down.

Any pipeline version which is active, or has ever been active, is locked from future edits.  You must make a copy in order to make further changes.

Roles

The Roles section in the pipeline defines a set of roles that will participate during the execution of the pipeline.  Roles assigned to the pipeline may then be used within the defined gates and steps (e.g. an approval step).  A role contains default members, which can be FlexDeploy Groups, FlexDeploy Users, or email addresses (used for notifications only).  A release that consumes the pipeline inherits the roles and default members from the pipeline and can override those members.  For example, the Release Manager members can be different across releases.

Tips

  • Pipeline role is generally used in gate or step configurations, but FlexDeploy 8.0 allows use of Groups directly in gate or step as well.  Hence creation of pipeline role is optional. If you need to provide specific permissions for skip, replay, abort, override etc. then pipeline role is required.

  • As a best practice, avoid assigning users directly to pipeline roles.  Instead, create a group with assigned users, and assign the group to the role.  This allows managing users in a centralized location, and avoids management across potentially many pipelines and releases.

  • Establish defaults in the role definitions of the pipeline, especially if team members are common across releases, to eliminate the need to configure the team on each and every release. 

In addition to members, a role defined within a pipeline also establishes various permissions.  When a release consumes the pipeline, it inherits the role's members and permissions, release can override membership for role but not permissions.  In other words, a role may have different members from release to release if necessary.

To create a new Role, click the Create button.  To edit an existing Role, click on the role name or use the Edit option from the Actions menu. 

To delete a Role, use the Delete option from the Actions menu. If a role is used in any versions of the pipeline, it can not be inactivated or deleted.

Make sure to click Save button after making all modifications.

Add FlexDeploy Group or FlexDeploy User members to the role by selecting from the possible values for each type.

Field

Description

Field

Description

Name

The name of the pipeline role.

Assigned Groups

FlexDeploy Groups assigned as members of this role.

Users in these groups will be able to approve or reject the task on the tasks screen or release screen.

Assigned Users

FlexDeploy Users assigned as members of this role.

These users will be able to approve or reject the task on the release screen only.

These tasks will not show up on the tasks screen.

Assigned Emails

List of email addresses assigned to this role.  Used for email notification only.

Skip Stage Execution

Whether or not this role has permission to skip the execution of pipeline stages when creating a release snapshot.

Manage Stage Execution

Whether or not this role has permission to perform Replay Stage, Abort Stage actions on the pipeline stages in the release dashboard.

Manage Gate Execution

Whether or not this role has permission to perform Replay Gate, Skip Gate, Abort Gate actions on the pipeline stage gates in the release dashboard. Test and Scan Gate can also be skipped if user is member of gate override role without this permission. Schedule Gate can only be overridden to run immediately if user is part of gate override role.

Manage Step Execution

Whether or not this role has permission to perform Replay Step, Skip Step, Abort Step actions on the pipeline stage steps in the release dashboard. Schedule Step can only be overridden to run immediately if user is part of step override role. Wait Step can only be overridden to run immediately if user has this permission.

Upload Execution Info

Whether or not this role has permission to upload execution information in the release dashboard (e.g. Inputs, Change Tickets, Deploy Overrides etc.).

Active

Indicates whether this pipeline role is active.  

Click the Done button to save the changes to the role (be sure to also save the pipeline, or changes will be lost).

Properties

Pipeline Properties are used to decorate a release with some context.  Values for the properties are provided on each release, or as inputs for each snapshot based on the value set for Property Type and may be used in various groovy scripts within the pipeline definition. Properties with the type set to “Property“ can be set through the properties section of the release, whereas with the type set to “Input“, the user is prompted to enter a value for the property during snapshot creation.

For example, only execute a particular step in the pipeline if the "Release Type" is "Security" and restart any associated services in the release based on the value set for “Restart Services“ for each snapshot.

To create a new Pipeline Property, click the Create button. To edit or delete an existing Pipeline Property, use the options from the Actions menu. The Edit Property wizard provides multiple options for customizing the overall behavior of the property.

image-20250318-144035.png

Field

Description

Field

Description

Code

A code for the property, as appropriate for variables within Groovy or Shell scripts.  (e.g. no spaces or special characters other than underscore.)

Display Name

A meaningful name for the property used for display.

Description

A meaningful description for the property.  

Required

Whether or not a value is required for this property.

Encrypted

Whether or not to encrypt the value, not display on screen or in the logs.  Allows selecting the default value from credentials available in the FlexDeploy instance.

Default Value

A default value to assign to the property if not specified on the release or in the snapshot input.

Validation Script

Optional Groovy Script to validate provided value.  The script should return true if the value is valid, and false otherwise.  The user-specified value is available to the script in the Value variable.  If not valid, the ValidationMessage is displayed to the user.

For example,

if ("BAD".equals(Value)) {ValidationMessage="Bad value!!"; return false;} else {return true;}

Field Data Type

The data type for this property.

List Data CSV

A comma separated list of valid values for the property. Optional, and only applicable for Text Field and Text Area data type. To provide more detail, the following format can be used for labels or descriptions: label##value##description. This can also be a groovy expression. For more information view the Using List Data section below.

Multiselect

Whether multiple values can be selected from the List Data.  Only applicable for Text Field data type, and when List Data CSV is provided.

Max Length

The maximum allowed length of the property value.  Optional, and only applicable for String data type.

Min Value

The minimum allowed property value. Optional, and only applicable for Number and Decimal data types.

Max Value

The maximum allowed property value. Optional, and only applicable for Number and Decimal data types.

Click the Done button to save the changes to the property (be sure to also save the pipeline, or changes will be lost).

Using List Data

There are multiple ways to fill out the List Data CSV field when specifying a custom property. There are a few terms to iron out before we dive in:

  • label - The label is what text will be shown on the select option.

  • value - The value is what value will be saved when selecting an option. This is not visible on the screen when selecting a value.

  • description - The description is simply a hint that will be shown below the option label.

Take for example the Field Data Type selection above:

image-20240312-162451.png

In this case “Text Field” is our label, “Generic text field” is our description and our value (again hidden) would be some id that correlates to the Text Field type.

With that out of the way let's talk about the various ways we can define the list data.

Plain Text

Plain text is the default for list data. It is simpler than Groovy but does not support as many use cases. Below are the variations which can be used for Plain Text

Variation

Notes

Variation

Notes

john, jack, jill

When specifying a CSV in this fashion, each entry will be used for BOTH label and value. This means the selection option will show “john” and when selected we will save a value of “john”. The description is omitted in this variation.

John##john, Jack##jack, Jill##jill

You can optionally separate entries with ##. When separated, we will treat the first segment as the label and the second segment as the value.

John##john##QA Analyst, Jack##jack##Software Engineer

Lastly, you can add a third segment, also separated with ## to specify the description.

Note that you can mix and match entries in the CSV. For example, if Jack did not have a role within the company you can omit the description:

John##john##QA Analyst, Jack##jack

Groovy

Using Groovy to define your list data has the added benefit of being able to make HTTP calls or any other means to dynamically set the list data. As such there are infinite examples of usages but a few are shown below.

Variation

Notes

Variation

Notes

return 'john, jack, jill'

The simplest example is for all intents and purposes identical to the first example in the Plain Text examples. Any variation you can do in Plain Text can be done in Groovy by just returning it as a string.

return ['john', 'Jack##jack', 'jill']

Perhaps more conventional in terms of Groovy scripting, you can return a list of strings to represent the options as well.

import flexagon.fd.model2.pojo.common.ListValueDataObject; return [ new ListValueDataObject("value1"), new ListValueDataObject("label2","value2"), new ListValueDataObject("label3","value3","Description") ]

You can also use the ListValueDataObject. All list data options will eventually be converted to this behind the scenes.

import flexagon.ff.common.core.rest.FlexRESTClient; import groovy.json.JsonSlurper; def client = new FlexRESTClient("https://swapi.dev/api/people"); client.addHeader("accept", "application/json"); def response = client.get(); def jsonObject = new JsonSlurper().parseText( response.getResponseString() ); // json keys can be accessed via dot notation // for example jsonObject.items or jsonObject.result.data // the following returns a list of text names return jsonObject.results.collect({item -> item.name})

This final example is making a public API call to the Star Wars API and returning a list of Star Wars character names as list options.

At the end of the day, this is boiled down to something like:

return ['Luke Skywalker', 'Han Solo', 'Darth Vader']

 

Variables

Variables provide a state for the life of a snapshot execution.  Such a state affords the ability to store some data as part of a step or gate in one stage, and consume it or make decisions in a later stage.  One classic example is to store a Change Ticket that was entered or created in one stage and feed it into another stage which will use the same ticket.  The pipeline defines the metadata for any snapshot variables that are available, and values can be set or retrieved using Custom Gates or Custom Steps.

To create a Snapshot Variable, click on the Create icon.  Enter the required information and click Save. Edit or Delete an existing variable by using the options from the Actions menu.

Field

Description

Field

Description

Code

The identifier which is used to access the variable from Groovy scripts.

Description

A description for the variable.

Data Type

The data type of the variable.  Allowed types are Boolean, Integer, Double, Long, or String

Project Groups

Project Groups provide categorization for release content.  As such, pipelines define the project groups, and deploy segments of the content based on it.  Releases consuming the pipeline can then define its content as belonging to those groups.

For example, suppose a pipeline defines project groups Database, Configuration, and Applications.  The steps within a pipeline stage can then deploy all Database, deploy all Configuration, and finally, deploy all Applications.  The release which consumes the pipeline, then defines which content is Database, Configuration, and Applications by associating appropriate project group to each project or package.

To add a new project group, click the Create button and provide a name for the group

To delete a project group, use the Delete option for the project group you wish to remove from the Actions menu.

Click the Save button to save the changes to the property (be sure to also save the pipeline, or changes will be lost).

 

The following macros are not currently supported in the footer:
  • style