Skip to content
This repository was archived by the owner on Aug 2, 2022. It is now read-only.

Add Alerting Kibana IT for x64 with no security #648

Merged
merged 12 commits into from
Feb 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 77 additions & 0 deletions .github/workflows/staging-build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,83 @@ jobs:
working-directory: kibana/plugins/kibana-notebooks
command: npx cypress run

Test-Alerting-Kibana-NoSec:
needs: [build-es-docker, build-kibana-docker]
runs-on: ubuntu-18.04
name: Test-Alerting-Kibana-NoSec
strategy:
fail-fast: false
matrix:
java: [14]
steps:
- uses: actions/checkout@v1

- name: Install Required Packages
run: release-tools/scripts/required_packages.sh

- name: Set up AWS Cred
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1

- name: Retrieve plugin tags
run: |
echo "p_tag_alerting_kibana=$(release-tools/scripts/plugin_tag.sh opendistro-for-elasticsearch/alerting-kibana-plugin)" >> $GITHUB_ENV
echo "es_version=$(release-tools/scripts/version-info.sh --es)" >> $GITHUB_ENV

- name: Checkout Kibana
uses: actions/checkout@v2
with:
repository: opendistro-for-elasticsearch/kibana-oss
ref: ${{env.es_version}}
token: ${{ secrets.ODFE_RELEASE_BOT_PUBLIC_PRIVATE_READ_WRITE_TOKEN }}
path: kibana

- uses: actions/checkout@v2
with:
repository: opendistro-for-elasticsearch/alerting-kibana-plugin
ref: ${{env.p_tag_alerting_kibana}}
path: kibana/plugins/alerting-kibana-plugin

- name: Setup Java
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}

- name: Get node and yarn versions
id: node_yarn_versions
run: |
echo "kibana_node_version=$(node -p "(require('./kibana/package.json').engines.node).match(/[.0-9]+/)[0]")" >> $GITHUB_ENV
echo "kibana_yarn_version=$(node -p "(require('./kibana/package.json').engines.yarn).match(/[.0-9]+/)[0]")" >> $GITHUB_ENV

- name: Setup node
uses: actions/setup-node@v1
with:
node-version: ${{env.kibana_node_version}}
registry-url: 'https://registry.npmjs.org'

- name: Install correct yarn version for Kibana
run: |
npm uninstall -g yarn
echo "Installing yarn ${{ env.kibana_yarn_version }}"
npm i -g yarn@${{ env.kibana_yarn_version }}

- name: Bootstrap the plugin
run: |
cd ./kibana/plugins/alerting-kibana-plugin
yarn kbn bootstrap

- name: Start ES and Kibana
run: release-tools/scripts/setup_runners_service.sh docker --kibana-nosec

- name: Run IT
uses: cypress-io/[email protected]
with:
working-directory: kibana/plugins/alerting-kibana-plugin
command: yarn run cypress run

Test-AD-Kibana:
needs: [build-es-docker, build-kibana-docker]
runs-on: [ubuntu-16.04]
Expand Down
69 changes: 69 additions & 0 deletions .github/workflows/staging-build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ jobs:
p_tag_ad_kibana: ${{env.p_tag_ad_kibana}}
p_tag_kib_nb: ${{env.p_tag_kib_nb}}
p_tag_sec_kibana: ${{env.p_tag_sec_kibana}}
p_tag_alerting_kibana: ${{env.p_tag_alerting_kibana}}
steps:
- uses: actions/checkout@v1
- name: Get all versions and tags
Expand All @@ -86,6 +87,7 @@ jobs:
echo "p_tag_ad_kibana=$(release-tools/scripts/plugin_tag.sh opendistro-for-elasticsearch/anomaly-detection-kibana-plugin)" >> $GITHUB_ENV
echo "p_tag_kib_nb=$(release-tools/scripts/plugin_tag.sh opendistro-for-elasticsearch/kibana-notebooks)" >> $GITHUB_ENV
echo "p_tag_sec_kibana=$(release-tools/scripts/plugin_tag.sh opendistro-for-elasticsearch/security-kibana-plugin)" >> $GITHUB_ENV
echo "p_tag_alerting_kibana=$(release-tools/scripts/plugin_tag.sh opendistro-for-elasticsearch/alerting-kibana-plugin)" >> $GITHUB_ENV

Test-IM-NoSec:
needs: [build-es-artifacts-x64, build-kibana-artifacts-x64, Get-versions]
Expand Down Expand Up @@ -550,6 +552,73 @@ jobs:
cd ./kibana/plugins/kibana-notebooks
npx cypress run

Test-Alerting-Kibana-NoSec:
needs: [build-es-artifacts-x64, build-kibana-artifacts-x64, Get-versions]
runs-on: windows-2019
name: Test-Alerting-Kibana-NoSec
strategy:
fail-fast: false
matrix:
java: [14]
steps:
- uses: actions/checkout@v1
- name: Set up AWS Cred
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_STAGING_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_STAGING_SECRET_ACCESS_KEY }}
aws-region: us-east-1

- name: Checkout Kibana
uses: actions/checkout@v2
with:
repository: opendistro-for-elasticsearch/kibana-oss
ref: ${{needs.Get-versions.outputs.es_version}}
token: ${{ secrets.ODFE_RELEASE_BOT_PUBLIC_PRIVATE_READ_WRITE_TOKEN }}
path: kibana

- uses: actions/checkout@v2
with:
repository: opendistro-for-elasticsearch/alerting-kibana-plugin
ref: ${{needs.Get-versions.outputs.p_tag_alerting_kibana}}
path: kibana/plugins/alerting-kibana-plugin

- name: Setup Java
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}

- name: Get node and yarn versions
id: node_yarn_versions
run: |
echo "kibana_node_version=$(node -p "(require('./kibana/package.json').engines.node).match(/[.0-9]+/)[0]")" >> $GITHUB_ENV
echo "kibana_yarn_version=$(node -p "(require('./kibana/package.json').engines.yarn).match(/[.0-9]+/)[0]")" >> $GITHUB_ENV
shell: bash

- name: Setup node
uses: actions/setup-node@v1
with:
node-version: ${{env.kibana_node_version}}
registry-url: 'https://registry.npmjs.org'

- name: Install correct yarn version for Kibana
run: |
npm uninstall -g yarn
echo "Installing yarn ${{ env.kibana_yarn_version }}"
npm i -g yarn@${{ env.kibana_yarn_version }}

- name: Bootstrap the plugin
run: |
cd ./kibana/plugins/alerting-kibana-plugin
yarn kbn bootstrap
shell: bash

- name: Run ES and kibana and IT (RUN IN ONE STEP OR WINDOWS WILL BREAK)
run: |
release-tools\scripts\setup_runners_service_windows.ps1 --kibana-nosec ${{needs.Get-versions.outputs.od_version}}
cd ./kibana/plugins/alerting-kibana-plugin
yarn run cypress run

Test-AD-KIBANA:
needs: [build-es-artifacts-x64, build-kibana-artifacts-x64, Get-versions]
runs-on: windows-2019
Expand Down
68 changes: 68 additions & 0 deletions .github/workflows/staging-test-deb-x64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,74 @@ jobs:
working-directory: kibana/plugins/kibana-notebooks
command: npx cypress run

Test-Alerting-Kibana-NoSec:
runs-on: ubuntu-18.04
name: Test-Alerting-Kibana-NoSec
strategy:
fail-fast: false
matrix:
java: [14]
steps:
- uses: actions/checkout@v1

- name: Required Packages
run: release-tools/scripts/required_packages.sh

- name: Retrieve plugin tags
run: |
echo "p_tag_alerting_kibana=$(release-tools/scripts/plugin_tag.sh opendistro-for-elasticsearch/alerting-kibana-plugin)" >> $GITHUB_ENV
echo "es_version=$(release-tools/scripts/version-info.sh --es)" >> $GITHUB_ENV
- name: Checkout Kibana
uses: actions/checkout@v2
with:
repository: opendistro-for-elasticsearch/kibana-oss
ref: ${{env.es_version}}
token: ${{ secrets.ODFE_RELEASE_BOT_PUBLIC_PRIVATE_READ_WRITE_TOKEN }}
path: kibana

- uses: actions/checkout@v2
with:
repository: opendistro-for-elasticsearch/alerting-kibana-plugin
ref: ${{env.p_tag_alerting_kibana}}
path: kibana/plugins/alerting-kibana-plugin

- name: Setup Java
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}

- name: Get node and yarn versions
id: node_yarn_versions
run: |
echo "kibana_node_version=$(node -p "(require('./kibana/package.json').engines.node).match(/[.0-9]+/)[0]")" >> $GITHUB_ENV
echo "kibana_yarn_version=$(node -p "(require('./kibana/package.json').engines.yarn).match(/[.0-9]+/)[0]")" >> $GITHUB_ENV

- name: Setup node
uses: actions/setup-node@v1
with:
node-version: ${{env.kibana_node_version}}
registry-url: 'https://registry.npmjs.org'

- name: Install correct yarn version for Kibana
run: |
npm uninstall -g yarn
echo "Installing yarn ${{ env.kibana_yarn_version }}"
npm i -g yarn@${{ env.kibana_yarn_version }}

- name: Bootstrap the plugin
run: |
cd ./kibana/plugins/alerting-kibana-plugin
yarn kbn bootstrap

- name: Start ES and Kibana
run: release-tools/scripts/setup_runners_service.sh deb --kibana-nosec

- name: Run Cypress tests
uses: cypress-io/github-action@v2
with:
working-directory: kibana/plugins/alerting-kibana-plugin
command: yarn run cypress run

Test-AD-KIBANA:
runs-on: [ubuntu-18.04]
name: Test-AD-KIBANA
Expand Down
77 changes: 74 additions & 3 deletions .github/workflows/staging-test-rpm-x64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
RUNNERS="odfe-rpm-im-nosec-x64,odfe-rpm-alerting-nosec-x64,odfe-rpm-sql-nosec-x64,odfe-rpm-knn-nosec-x64,odfe-rpm-ad-nosec-x64,"
RUNNERS+="odfe-rpm-sql-x64,odfe-rpm-ad-x64,odfe-rpm-alerting-x64,"
RUNNERS+="odfe-rpm-ad-kibana-nosec-x64,odfe-rpm-sql-kibana-nosec-x64,"
RUNNERS+="odfe-rpm-ad-kibana-x64,odfe-rpm-sec-kibana-x64,odfe-rpm-kibana-nb-nosec-x64"
RUNNERS+="odfe-rpm-ad-kibana-x64,odfe-rpm-sec-kibana-x64,odfe-rpm-kibana-nb-nosec-x64,odfe-rpm-alerting-kibana-nosec-x64"
release-tools/scripts/setup_runners.sh run $RUNNERS ${{ secrets.ODFE_RELEASE_BOT_PUBLIC_PRIVATE_READ_WRITE_TOKEN }} ami-0bd968fea932935f4

Test-IM-NoSec:
Expand Down Expand Up @@ -291,6 +291,77 @@ jobs:
working-directory: kibana/plugins/anomaly-detection-kibana-plugin
command: yarn cy:run --config baseurl=http://localhost:5601

Test-Alerting-Kibana-NoSec:
needs: [Provision-Runners]
runs-on: [self-hosted, Linux, X64, odfe-rpm-alerting-kibana-nosec-x64]
strategy:
fail-fast: false
matrix:
java: [14]
steps:
- uses: actions/checkout@v1

- name: Required Packages
run: release-tools/scripts/required_packages.sh

- name: Retrieve plugin tags
run: |
echo "p_tag_alerting_kibana=$(release-tools/scripts/plugin_tag.sh opendistro-for-elasticsearch/alerting-kibana-plugin)" >> $GITHUB_ENV
echo "es_version=$(release-tools/scripts/version-info.sh --es)" >> $GITHUB_ENV
- name: Checkout Kibana
uses: actions/checkout@v2
with:
repository: opendistro-for-elasticsearch/kibana-oss
ref: ${{env.es_version}}
token: ${{ secrets.ODFE_RELEASE_BOT_PUBLIC_PRIVATE_READ_WRITE_TOKEN }}
path: kibana

- uses: actions/checkout@v2
with:
repository: opendistro-for-elasticsearch/alerting-kibana-plugin
ref: ${{env.p_tag_alerting_kibana}}
path: kibana/plugins/alerting-kibana-plugin

- name: Setup Java
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}

- name: Get node and yarn versions
id: node_yarn_versions
run: |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
. ~/.nvm/nvm.sh
nvm install node
echo "kibana_node_version=$(node -p "(require('./kibana/package.json').engines.node).match(/[.0-9]+/)[0]")" >> $GITHUB_ENV
echo "kibana_yarn_version=$(node -p "(require('./kibana/package.json').engines.yarn).match(/[.0-9]+/)[0]")" >> $GITHUB_ENV

- name: Setup node
uses: actions/setup-node@v1
with:
node-version: ${{env.kibana_node_version}}
registry-url: 'https://registry.npmjs.org'

- name: Install correct yarn version for Kibana
run: |
npm uninstall -g yarn
echo "Installing yarn ${{ env.kibana_yarn_version }}"
npm i -g yarn@${{ env.kibana_yarn_version }}

- name: Bootstrap the plugin
run: |
cd ./kibana/plugins/alerting-kibana-plugin
yarn kbn bootstrap

- name: Start ES and Kibana
run: release-tools/scripts/setup_runners_service.sh rpm --kibana-nosec

- name: Run Cypress tests
uses: cypress-io/github-action@v2
with:
working-directory: kibana/plugins/alerting-kibana-plugin
command: yarn run cypress run

Test-SQL-KIBANA-NoSec:
needs: [Provision-Runners]
runs-on: [self-hosted, Linux, X64, odfe-rpm-sql-kibana-nosec-x64]
Expand Down Expand Up @@ -608,7 +679,7 @@ jobs:
yarn test:jest_server

CleanUp-Runners:
needs: [Test-IM-NoSec, Test-ALERTING-NoSec, Test-SQL-NoSec, Test-KNN-NoSec, Test-AD-NoSec, Test-SQL, Test-AD, Test-ALERTING, Test-AD-KIBANA-NoSec, Test-SQL-KIBANA-NoSec, Test-AD-KIBANA, Test-SEC-KIBANA, Test-Kibana-Notebooks-NoSec]
needs: [Test-IM-NoSec, Test-ALERTING-NoSec, Test-SQL-NoSec, Test-KNN-NoSec, Test-AD-NoSec, Test-SQL, Test-AD, Test-ALERTING, Test-AD-KIBANA-NoSec, Test-SQL-KIBANA-NoSec, Test-AD-KIBANA, Test-SEC-KIBANA, Test-Kibana-Notebooks-NoSec, Test-Alerting-Kibana-NoSec]
if: always()
name: CleanUp-Runners
runs-on: ubuntu-18.04
Expand All @@ -628,6 +699,6 @@ jobs:
RUNNERS="odfe-rpm-im-nosec-x64,odfe-rpm-alerting-nosec-x64,odfe-rpm-sql-nosec-x64,odfe-rpm-knn-nosec-x64,odfe-rpm-ad-nosec-x64,"
RUNNERS+="odfe-rpm-sql-x64,odfe-rpm-ad-x64,odfe-rpm-alerting-x64,"
RUNNERS+="odfe-rpm-ad-kibana-nosec-x64,odfe-rpm-sql-kibana-nosec-x64,"
RUNNERS+="odfe-rpm-ad-kibana-x64,odfe-rpm-sec-kibana-x64,odfe-rpm-kibana-nb-nosec-x64"
RUNNERS+="odfe-rpm-ad-kibana-x64,odfe-rpm-sec-kibana-x64,odfe-rpm-kibana-nb-nosec-x64,odfe-rpm-alerting-kibana-nosec-x64"
release-tools/scripts/setup_runners.sh terminate $RUNNERS ${{ secrets.ODFE_RELEASE_BOT_PUBLIC_PRIVATE_READ_WRITE_TOKEN }}

Loading