-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create page for git triggers #2559
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Binary file added
BIN
+109 KB
...rojects/project-triggers/images/git-triggers/git-triggers-file-path-filters.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+112 KB
public/docs/projects/project-triggers/images/git-triggers/git-triggers-history.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+71.3 KB
...ects/project-triggers/images/git-triggers/git-triggers-repository-selection.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
--- | ||
layout: src/layouts/Default.astro | ||
pubDate: 2024-11-05 | ||
modDate: 2024-11-05 | ||
title: Git repository triggers | ||
description: Git repository triggers allow you to automatically create a new release when a new commit is pushed to a Git repository. | ||
navOrder: 16 | ||
icon: fa-brands fa-git-alt | ||
--- | ||
|
||
Git repository triggers allow you to automatically create a new release when a new commit is pushed to a Git repository. | ||
|
||
## Getting started | ||
|
||
Navigate to your project and click **Triggers**. Click **Add Trigger** on the right-hand side of the page, and select **Git repository**. | ||
|
||
Enter a name and description for your trigger. | ||
|
||
## Channels and lifecycles | ||
|
||
:::div{.hint} | ||
Git repository triggers create releases based on the default branch in version controlled projects | ||
::: | ||
|
||
If your project contains multiple [channels](/docs/releases/channels), you have the option of selecting which channel this trigger will apply to. The releases created by the trigger will use this channel. | ||
|
||
The versions used for those releases is guided by [release versioning](/docs/releases/release-versioning) under **Settings**. They will use the rules defined there. | ||
|
||
A preview of the [lifecycle](/docs/releases/lifecycles) used by the selected channel is displayed. By clicking the link you can modify the [lifecycle's phases](/docs/releases/lifecycles/#Lifecycles-LifecyclePhases) to have a release created and deployed to selected environments whenever a new commit is pushed to the monitored repository. | ||
|
||
## Trigger sources | ||
|
||
Git repositories referenced in your project's deployment process can be selected to be monitored by the trigger to create releases. | ||
|
||
Please note that for [configuration as code](/docs/projects/version-control/config-as-code-reference) projects, only steps that reference Git repositories in the deployment process from the **default branch** are able to be referenced. Any changes to the deployment process in other branches will not be available for use in git triggers. | ||
|
||
:::figure | ||
![Repository selection](/docs/projects/project-triggers/images/git-triggers/git-triggers-repository-selection.png) | ||
::: | ||
|
||
### File path filters | ||
|
||
When selecting a repository to monitor you will be provided with the option to add file path filters. These filters allow you to specify file paths to include or exclude from the monitoring of new commits. | ||
|
||
:::figure | ||
![File path filters](/docs/projects/project-triggers/images/git-triggers/git-triggers-file-path-filters.png) | ||
::: | ||
|
||
- If no file path filters are specified, all commits to the monitored repository will trigger the creation of a new release. | ||
- If file paths are set to be included, only changes to those file paths will be monitored, all other file paths will be excluded. | ||
- If file paths are set to be excluded, changes to those file paths will not be monitored, all other file paths will be included. | ||
|
||
The file path filters support glob patterns and can include the following wildcard characters: | ||
|
||
| **Character** | **Description** | **Example** | | ||
|---------------|-------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------| | ||
| `*` | Matches multiple characters except `/` | File path pattern of `source/*` will match the file path `source/data` but not `source/data/pages` | | ||
| `**` | Matches multiple characters including `/` | File path pattern of `source/**` will match the file paths `source/data` and `source/data/pages` | | ||
| `?` | Matches a single character | File path pattern of `api/v?` will match a file path of `api/v1` but not `api/v1.1` | | ||
| `[0-9]` | Matches a single character in the range | File path pattern of `source/docs/version/[0-9]` will match the file path `source/docs/version/1` but not `source/docs/version/10` | | ||
| `[abc]` | Matches a single character from the set | File path pattern of `docs/[abc]*` will match the file path `docs/credits` but not `docs/references` | | ||
|
||
## History | ||
|
||
The history section contains information about the last time the trigger was evaluated and the last release that was created by the trigger. Triggers are evaluated every three minutes and the results will be reported here. | ||
|
||
- Outcome: Was any action taken, or if there was an error during processing. | ||
- Reason: Additional information about the outcome. | ||
- Last executed at: The time the task was run. | ||
- Discovered commits: The branch and commit hash that were found in this execution. | ||
|
||
If the trigger has created a release, a link to the created release will be shown alongside the date it was created. | ||
|
||
:::figure | ||
![History](/docs/projects/project-triggers/images/git-triggers/git-triggers-history.png) | ||
::: |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As we had chatted about separately, it might be good to have some sort of introduction to this page, this description reads pretty nicely so perhaps we can go with this for the moment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added