The Stitch Workbench is a part of Deploy’s web-based user interface that provides an overview of all customizations known to Stitch.
The Workbench allows you to search/filter Stitch customizations (rules, macros) known to Deploy in the UI by namespace.
Each Stitch customization is visible with comments.
In addition, the Workbench also provides additional insight on each customization such as:
- the remote repository location it is from
- unique change id and author (for Git sources)
There are four screens on the Stitch Workbench:
- Stitch Source
On the Rules screen, you’re presented with a list of all rules containing namespaces on the left. Above it, there’s also a search bar for filtering the namespaces. The filter works by searching if the given input is a substring anywhere within namespace.
When you click one of the namespaces, a list of all the rules in that namespace is fetched and displayed on the right. For every rule, you’re given the information of rule name, the time it was last synchronized, and the source name containing the rule. Above the rule list is also a search bar for filtering the rules.
On the top right of the screen there are two buttons, Refresh and Add new rule button. Refresh button will refreshes the list of namespaces and rules for already selected namespace. If selected namespace is no longer present after the refresh, first namespace on the list is auto selected and rules for that namespace are displayed. Add new rule button will open a new screen for selecting Stitch Git Source from a list of existing sources in system. After selecting Git Source user will be able to add new branch or select a branch from a list of existing branches on that source. And in the end user can fill in the relative path and filename of the rule file he wants to create. Filename has to match the Stitch Rules file naming pattern .
When you click one of the rules, you’ll be presented with that rule content and detailed information on the right. Along with existing information, additional details also display the
- full file name that contains the rule
- commit hash
- commit user ID
On the top left of the screen, next to rule name, is the back arrow to return to previous screen.
More information about rules can be found in Stitch rules.
The functionality is the same as for rules, only with macros.
More information about macros can be found in Stitch macros.
The Branches screen in the Workbench is used to do all the Stitch GitOps related actions. From selecting a source from a list on the right-hand side, you can browse all Stitch related branches filtered by the
branchRegex field defined on a Git Source.
Clicking on a specific branch in a list you take you to the Branch details page. The details page shows the same view as the Rules screen but contains only the rules that are defined on a selected branch.
For each Stitch Branch, you can Add a new rule or do a Dry Run. After a successful Dry Run, Publish will be enabled. Buttons are placed above the list of rules on right-hand side of the screen. A Dry Run button is also visible for each Branch in the Branches list.
Back on the Branches screen each of the branches can be synced, sync log can be viewed, dry run can be run, and the branch can be deleted.
When you click on the Dry Run button, another view is opened giving you ability to verify all the rules defined for that Branch. On the initial Dry Run screen, you can select the application and environment in the same way as you choose them for the deployment on the deployment workspace screen. Once application and environment is selected and Dry Run button is clicked, the Stitch Engine will run transformations for the deployeds using all the rules and macros in system together with all the rules and macros on selected Branch. If there were existing rules or macros for that Source on its main branch, those rules and macros will be replaced with the ones from the Branch. If there were no rules or macros for that Source then the ones from the Branch will be used instead.
After Stitch transformation is executed, you will be able to see Stitch Preview for that Branch. You can switch between all the rules in the the rules defined on a branch and view them in editor panel. You can also verify or browse for errors for given deployeds and its transformed documents.
If the Dry Run was finished without any errors, the Publish button will be enabled for publishing that branch which will result in the merge of that branch with a specified main branch for that source.
A Stitch Source in the Workbench is a source administration screen. You can view, edit, and delete existing sources, as well as add new ones.
Existing sources are divided into two groups:
- Folder Source
- Git Source.
A Folder Source is a list of sources added from folders, and a Git Source is a list of sources added from the git. For every source, you’re given the information of source name (which is also an ID), repository URL, and the time it was last synchronized. There is also a sync, view log, edit, and a delete button. Clicking on view log button opens a log of the latest source synchronization control task in the new tab. When you click the edit button, you’re taken to Edit Source screen with all the source data already filled in and ready for editing.
Note: Folder sources can not be edited from the workbench, they can only be added from the CI Explorer, the path to folder for specific is relative to the server root folder and as such are not advisable for production use.
Git sources can be added by clicking the Add Git Source button on the top right. You can import a source using either https or ssh, in which case you need to specify the private key used for authentication. You can define the source branch or tag, in which case you don’t need to define a branch. The default branch is master. On the top right side are buttons to cancel the action, test the connection to repository URL, and save the source.
Along with Add Git Source button on the top right, there are also Sync All and Refresh button.