Table of Contents |
---|
...
Syntax for GitLab Issues
GitLab issues are represented as RepoName-NUMBER in FlexDeploy. For example, demo-1, demo-2 where demo is name of GitLab project. See image below for reference.
Tip |
---|
FlexDeploy will accept and show GitLab issues as demo-1, demo-2 etc. Lowercase…. |
...
Preparing for GitLab Integration with FlexDeploy
Go to GitLab and log in as the user you want to comment on GitLab Issues with.
Generate a Personal Access Token in GitLab following this guide: https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html
Choose an expiration date based on your security policies. Shorter expiration dates will require updating the ITS more frequently.
Choose the following OAuth scopes to comment on and change status of issues:
...
Create Issue Tracking Instance
A GitLab instance looks like this:
...
Setting Up Folders and Projects to Use the GitLab ITS Instance
Then back in FlexDeploy, set up your folder and project Issue Tracking settings.
Property Name | Property Code | Required | Description |
---|---|---|---|
GitLab URL |
| Yes | GitLab base project URL (https://gitlab.com/{organization or user}) |
GitLab Personal Access Token |
| Yes | GitLab personal or project access token |
GitLab API Version |
| Yes | GitLab API Version |
...
Configure Folder or Project for Issue Tracking
Configure GitLab Issue Tracking Instance on your project or parent folder. Issue Tracking configurations are inherited by sub-folder and projects. This configuration will allow you to integrate GitLab issues with your builds. See Configure Project for Issue Tracking for more details.
Work Item pattern is optional, if specified his will used to parse commit logs work item numbers. Alternatively, you can just prefix work item numbers with # in commit message.
Optionally configure for Comment and/or Status update after build or deploy execution.
Tip |
---|
GitLab Issues only accept statuses of open and closed. Other statuses will be ignored. |
...
Linking GitLab Issues to FlexDeploy Builds
Now you are ready to link tickets with commits or by manually entering them on GitLab issues with project builds or project packages.
Linking with Commit Messages
Set up your FlexDeploy Project with a ticket pattern. The pattern must be GitLab repo name + “-” + issue number.
Following this pattern, make a commit message.
...
Push and merge your change.
When you request a build, the issue numbers are automatically pulled from your commits and linked.
...
Linking by Manual Entry at Project Build Time
If you are building the project manually, you can enter issue numbers at build time.
The issue number should be GitLab Repo Name-Issue Number
...
Linking Issues to Project Packages
If you are working with a package-based project, you can associate issues with packages that will live through its build and deployment lifecycle.
Add one or more Issues by clicking the edit package button on the right panel. Add one or more Issues. The dropdown only shows previously linked issues. Type the entire issue key to make a new one. The issue number should be in the format GitLab Repo Name-Issue Number. After saving, all builds and deployments of this package will automatically be associated to that GitLab Issue.
...
. In order to link
using commit messages - use the format #issue for example, #Denver-1. Or you use Denver-1234 in commit message if Denver- is setup as work item pattern.
manually at build time - just specify work item number(s) on build request form in work items input. Note that # prefix only necessary with commit message.
manually with package - just specify work item number(s) on package configuration.
See Link Work Items to Project Build for more information about linking Work Items to builds.
Examples
...