-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #82 from jfrog/PTRENG-4573-watch-config
PTRENG-4573, add path_ant_patterns to the repo watch
- Loading branch information
Showing
6 changed files
with
378 additions
and
12 deletions.
There are no files selected for viewing
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
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 |
---|---|---|
|
@@ -85,6 +85,49 @@ resource "xray_watch" "repository" { | |
watch_recipients = ["[email protected]", "[email protected]"] | ||
} | ||
resource "xray_watch" "repository-ant-filter" { | ||
name = "repository-watch" | ||
description = "Watch a single repo or a list of repositories, using ant pattern" | ||
active = true | ||
project_key = "testproj" | ||
watch_resource { | ||
type = "repository" | ||
bin_mgr_id = "default" | ||
name = "your-repository-name" | ||
repo_type = "local" | ||
path_ant_filter { | ||
exclude_patterns = ["**/*.md"] | ||
include_patterns = ["**/*.js"] | ||
} | ||
} | ||
watch_resource { | ||
type = "repository" | ||
bin_mgr_id = "default" | ||
name = "your-other-repository-name" | ||
repo_type = "remote" | ||
filter { | ||
type = "regex" | ||
value = ".*" | ||
} | ||
} | ||
assigned_policy { | ||
name = xray_security_policy.min_severity.name | ||
type = "security" | ||
} | ||
assigned_policy { | ||
name = xray_license_policy.cvss_range.name | ||
type = "license" | ||
} | ||
watch_recipients = ["[email protected]", "[email protected]"] | ||
} | ||
resource "xray_watch" "all-builds-with-filters" { | ||
name = "build-watch" | ||
description = "Watch all builds with Ant patterns filter" | ||
|
@@ -269,6 +312,7 @@ Optional: | |
- `bin_mgr_id` (String) The ID number of a binary manager resource. Default value is `default`. To check the list of available binary managers, use the API call `${JFROG_URL}/xray/api/v1/binMgr` as an admin user, use `binMgrId` value. More info [here](https://www.jfrog.com/confluence/display/JFROG/Xray+REST+API#XrayRESTAPI-GetBinaryManager) | ||
- `filter` (Block Set) Filter for `regex` and `package-type` type. Works only with `all-repos` watch_resource.type. (see [below for nested schema](#nestedblock--watch_resource--filter)) | ||
- `name` (String) The name of the build, repository or project. Xray indexing must be enabled on the repository or build | ||
- `path_ant_filter` (Block Set) `path-ant-patterns` filter for `repository` and `all-repos` watch_resource.type (see [below for nested schema](#nestedblock--watch_resource--path_ant_filter)) | ||
- `repo_type` (String) Type of repository. Only applicable when `type` is `repository`. Options: `local` or `remote`. | ||
|
||
<a id="nestedblock--watch_resource--ant_filter"></a> | ||
|
@@ -286,4 +330,13 @@ Required: | |
Required: | ||
|
||
- `type` (String) The type of filter, such as `regex` or `package-type` | ||
- `value` (String) The value of the filter, such as the text of the regex or name of the package type. | ||
- `value` (String) The value of the filter, such as the text of the regex or name of the package type. | ||
|
||
|
||
<a id="nestedblock--watch_resource--path_ant_filter"></a> | ||
### Nested Schema for `watch_resource.path_ant_filter` | ||
|
||
Required: | ||
|
||
- `exclude_patterns` (List of String) List of Ant patterns. | ||
- `include_patterns` (List of String) List of Ant patterns. |
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 |
---|---|---|
|
@@ -69,6 +69,49 @@ resource "xray_watch" "repository" { | |
watch_recipients = ["[email protected]", "[email protected]"] | ||
} | ||
|
||
resource "xray_watch" "repository-ant-filter" { | ||
name = "repository-watch" | ||
description = "Watch a single repo or a list of repositories, using ant pattern" | ||
active = true | ||
project_key = "testproj" | ||
|
||
watch_resource { | ||
type = "repository" | ||
bin_mgr_id = "default" | ||
name = "your-repository-name" | ||
repo_type = "local" | ||
|
||
path_ant_filter { | ||
exclude_patterns = ["**/*.md"] | ||
include_patterns = ["**/*.js"] | ||
} | ||
} | ||
|
||
watch_resource { | ||
type = "repository" | ||
bin_mgr_id = "default" | ||
name = "your-other-repository-name" | ||
repo_type = "remote" | ||
|
||
filter { | ||
type = "regex" | ||
value = ".*" | ||
} | ||
} | ||
|
||
assigned_policy { | ||
name = xray_security_policy.min_severity.name | ||
type = "security" | ||
} | ||
|
||
assigned_policy { | ||
name = xray_license_policy.cvss_range.name | ||
type = "license" | ||
} | ||
|
||
watch_recipients = ["[email protected]", "[email protected]"] | ||
} | ||
|
||
resource "xray_watch" "all-builds-with-filters" { | ||
name = "build-watch" | ||
description = "Watch all builds with Ant patterns filter" | ||
|
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
Oops, something went wrong.