Skip to content

Commit

Permalink
[Backport 2.x] add backport github workflow for security-analytics (#95)
Browse files Browse the repository at this point in the history
Signed-off-by: Subhobrata Dey <sbcd90@gmail.com>
  • Loading branch information
opensearch-trigger-bot[bot] committed Nov 1, 2022
1 parent b5e00b3 commit 84e00b7
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 2 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/backport.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@

name: Backport
on:
pull_request_target:
types:
- closed
- labeled

jobs:
backport:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
name: Backport
steps:
- name: GitHub App token
id: github_app_token
uses: tibdex/github-app-token@v1.5.0
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
installation_id: 22958780

- name: Backport
uses: VachaShah/backport@v1.1.4
with:
github_token: ${{ steps.github_app_token.outputs.token }}
branch_name: backport/backport-${{ github.event.number }}
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ publishing {
publications {
pluginZip(MavenPublication) { publication ->
pom {
groupId = "org.opensearch.plugin"
name = "opensearch-security-analytics"
description = "OpenSearch Security Analytics plugin"
licenses {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,7 @@ public void testDeletingADetector() throws IOException {

Assert.assertFalse(alertingMonitorExists(monitorId));

// todo: change to assertFalse when alerting bug is fixed. https://github.com/opensearch-project/alerting/issues/581
Assert.assertTrue(doesIndexExist(String.format(Locale.getDefault(), ".opensearch-sap-detectors-queries-%s", "windows")));
Assert.assertFalse(doesIndexExist(String.format(Locale.getDefault(), ".opensearch-sap-detectors-queries-%s", "windows")));

hits = executeSearch(Detector.DETECTORS_INDEX, request);
Assert.assertEquals(0, hits.size());
Expand Down

0 comments on commit 84e00b7

Please sign in to comment.