Skip to content

Commit

Permalink
Merge develop branch to main for OpenSearch Migration (#9)
Browse files Browse the repository at this point in the history
Merge develop branch to main for OpenSearch Migration
  • Loading branch information
joshuali925 authored Apr 19, 2021
2 parents 852e568 + 64d9c88 commit 4534be9
Show file tree
Hide file tree
Showing 319 changed files with 11,890 additions and 2,349 deletions.
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: 🐛 Bug report
about: Create a report to help us improve
title: "[BUG]"
labels: bug
assignees: ''
---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Plugins**
Please list all plugins currently enabled.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Host/Environment (please complete the following information):**
- OS: [e.g. iOS]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: 🎆 Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''
---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
16 changes: 16 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
### Description
[Describe what this change achieves]

### Issues Resolved
[List any issues this PR will resolve]

### Check List
- [ ] New functionality includes testing.
- [ ] All tests pass, including unit test, integration test and doctest
- [ ] New functionality has been documented.
- [ ] New functionality has javadoc added
- [ ] New functionality has user manual doc added
- [ ] Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check [here](https://github.com/opensearch-project/OpenSearch/blob/main/CONTRIBUTING.md#developer-certificate-of-origin).
113 changes: 113 additions & 0 deletions .github/workflows/dashboards-reports-release-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
name: Release OpenSearch Dashboards Reports Artifacts

on:
push:
tags:
- "v*"

env:
PLUGIN_NAME: reportsDashboards
OD_VERSION: 1.15.0.0

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Configure AWS Credentials
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 Plugin
uses: actions/checkout@v1

- name: Checkout OpenSearch Dashboards
uses: actions/checkout@v1
with:
repository: opensearch-project/Opensearch-Dashboards
ref: 1.x
path: dashboards-reports/OpenSearch-Dashboards

- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: "10.23.1"

- name: Move Dashboards Reports to Plugins Dir
run: mv dashboards-reports OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}

- name: Add Chromium Binary to Reporting for Testing
run: |
sudo apt install -y libnss3-dev fonts-liberation libfontconfig1
cd OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}
wget https://github.com/opendistro-for-elasticsearch/kibana-reports/releases/download/chromium-1.12.0.0/chromium-linux-x64.zip
unzip chromium-linux-x64.zip
rm chromium-linux-x64.zip
- name: OpenSearch Dashboards Plugin Bootstrap
uses: nick-invision/retry@v1
with:
timeout_minutes: 30
max_attempts: 3
command: cd OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}; yarn osd bootstrap

- name: Test
uses: nick-invision/retry@v1
with:
timeout_minutes: 30
max_attempts: 3
command: cd OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}; yarn test

- name: Build Artifact and upload to S3
run: |
cd OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}
yarn build
cd build
mkdir -p ./{linux-x64,linux-arm64,windows-x64}/OpenSearch-Dashboards/${{ env.PLUGIN_NAME }}
cp ./${{ env.PLUGIN_NAME }}-*.zip ./linux-x64/${{ env.PLUGIN_NAME }}-${{ env.OD_VERSION }}-linux-x64.zip
cp ./${{ env.PLUGIN_NAME }}-*.zip ./linux-arm64/${{ env.PLUGIN_NAME }}-${{ env.OD_VERSION }}-linux-arm64.zip
mv ./${{ env.PLUGIN_NAME }}-*.zip ./windows-x64/${{ env.PLUGIN_NAME }}-${{ env.OD_VERSION }}-windows-x64.zip
s3_prefix="s3://staging.artifacts.opendistroforelasticsearch.amazon.com/snapshots/kibana-plugins/reports/"
cd linux-x64
wget https://github.com/opendistro-for-elasticsearch/kibana-reports/releases/download/chromium-1.12.0.0/chromium-linux-x64.zip
unzip chromium-linux-x64.zip -d ./OpenSearch-Dashboards/${{ env.PLUGIN_NAME }}
rm chromium-linux-x64.zip
zip -ur ./${{ env.PLUGIN_NAME }}-*.zip ./OpenSearch-Dashboards
linux_x64_artifact=`ls ./${{ env.PLUGIN_NAME }}-${{ env.OD_VERSION }}-linux-x64.zip`
#Inject build number before the suffix and upload to S3
linux_x64_artifact_outfile=`basename ${linux_x64_artifact%.zip}-build-${GITHUB_RUN_NUMBER}.zip`
echo "Copying $linux_x64_artifact to ${s3_prefix}${linux_x64_artifact_outfile}"
aws s3 cp --quiet $linux_x64_artifact ${s3_prefix}${linux_x64_artifact_outfile}
cd ..
cd linux-arm64
wget https://github.com/opendistro-for-elasticsearch/kibana-reports/releases/download/chromium-1.12.0.0/chromium-linux-arm64.zip
unzip chromium-linux-arm64.zip -d ./OpenSearch-Dashboards/${{ env.PLUGIN_NAME }}
rm chromium-linux-arm64.zip
zip -ur ./${{ env.PLUGIN_NAME }}-*.zip ./OpenSearch-Dashboards
linux_arm64_artifact=`ls ./${{ env.PLUGIN_NAME }}-${{ env.OD_VERSION }}-linux-arm64.zip`
#Inject build number before the suffix and upload to S3
linux_arm64_artifact_outfile=`basename ${linux_arm64_artifact%.zip}-build-${GITHUB_RUN_NUMBER}.zip`
echo "Copying $linux_arm64_artifact to ${s3_prefix}${linux_arm64_artifact_outfile}"
aws s3 cp --quiet $linux_arm64_artifact ${s3_prefix}${linux_arm64_artifact_outfile}
cd ..
cd windows-x64
wget https://github.com/opendistro-for-elasticsearch/kibana-reports/releases/download/chromium-1.12.0.0/chromium-windows-x64.zip
unzip chromium-windows-x64.zip -d ./OpenSearch-Dashboards/${{ env.PLUGIN_NAME }}
rm chromium-windows-x64.zip
zip -ur ./${{ env.PLUGIN_NAME }}-*.zip ./OpenSearch-Dashboards
windows_x64_artifact=`ls ./${{ env.PLUGIN_NAME }}-${{ env.OD_VERSION }}-windows-x64.zip`
#Inject build number before the suffix and upload to S3
windows_x64_artifact_outfile=`basename ${windows_x64_artifact%.zip}-build-${GITHUB_RUN_NUMBER}.zip`
echo "Copying $windows_x64_artifact to ${s3_prefix}${windows_x64_artifact_outfile}"
aws s3 cp --quiet $windows_x64_artifact ${s3_prefix}${windows_x64_artifact_outfile}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Test and Build Kibana Reports
name: Test and Build OpenSearch Dashboards Reports

on: [pull_request, push]

env:
PLUGIN_NAME: opendistroReportsKibana
OD_VERSION: 1.12.0.0
PLUGIN_NAME: reportsDashboards
OD_VERSION: 1.15.0.0

jobs:
build:
Expand All @@ -13,89 +13,89 @@ jobs:
- name: Checkout Plugin
uses: actions/checkout@v1

- name: Checkout Kibana
- name: Checkout OpenSearch Dashboards
uses: actions/checkout@v1
with:
repository: elastic/kibana
ref: v7.10.0
path: kibana-reports/kibana
repository: opensearch-project/Opensearch-Dashboards
ref: 1.x
path: dashboards-reports/OpenSearch-Dashboards

- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: "10.22.1"
node-version: "10.23.1"

- name: Move Kibana Reports to Plugins Dir
run: mv kibana-reports kibana/plugins/${{ env.PLUGIN_NAME }}
- name: Move Dashboards Reports to Plugins Dir
run: mv dashboards-reports OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}

- name: Add Chromium Binary to Reporting for Testing
run: |
sudo apt install -y libnss3-dev fonts-liberation libfontconfig1
cd kibana/plugins/${{ env.PLUGIN_NAME }}
cd OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}
wget https://github.com/opendistro-for-elasticsearch/kibana-reports/releases/download/chromium-1.12.0.0/chromium-linux-x64.zip
unzip chromium-linux-x64.zip
rm chromium-linux-x64.zip
- name: Kibana Plugin Bootstrap
- name: OpenSearch Dashboards Plugin Bootstrap
uses: nick-invision/retry@v1
with:
timeout_minutes: 30
max_attempts: 3
command: cd kibana/plugins/${{ env.PLUGIN_NAME }}; yarn kbn bootstrap
command: cd OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}; yarn osd bootstrap

- name: Test
uses: nick-invision/retry@v1
with:
timeout_minutes: 30
max_attempts: 3
command: cd kibana/plugins/${{ env.PLUGIN_NAME }}; yarn test
command: cd OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}; yarn test

- name: Build Artifact
run: |
cd kibana/plugins/${{ env.PLUGIN_NAME }}
cd OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}
yarn build
cd build
mkdir -p ./{linux-x64,linux-arm64,windows-x64}/kibana/${{ env.PLUGIN_NAME }}
mkdir -p ./{linux-x64,linux-arm64,windows-x64}/OpenSearch-Dashboards/${{ env.PLUGIN_NAME }}
cp ./${{ env.PLUGIN_NAME }}-*.zip ./linux-x64/${{ env.PLUGIN_NAME }}-${{ env.OD_VERSION }}-linux-x64.zip
cp ./${{ env.PLUGIN_NAME }}-*.zip ./linux-arm64/${{ env.PLUGIN_NAME }}-${{ env.OD_VERSION }}-linux-arm64.zip
mv ./${{ env.PLUGIN_NAME }}-*.zip ./windows-x64/${{ env.PLUGIN_NAME }}-${{ env.OD_VERSION }}-windows-x64.zip
cd linux-x64
wget https://github.com/opendistro-for-elasticsearch/kibana-reports/releases/download/chromium-1.12.0.0/chromium-linux-x64.zip
unzip chromium-linux-x64.zip -d ./kibana/${{ env.PLUGIN_NAME }}
zip -ur ./${{ env.PLUGIN_NAME }}-*.zip ./kibana
unzip chromium-linux-x64.zip -d ./OpenSearch-Dashboards/${{ env.PLUGIN_NAME }}
zip -ur ./${{ env.PLUGIN_NAME }}-*.zip ./OpenSearch-Dashboards
mv ./${{ env.PLUGIN_NAME }}-*.zip ..
cd ..
cd linux-arm64
wget https://github.com/opendistro-for-elasticsearch/kibana-reports/releases/download/chromium-1.12.0.0/chromium-linux-arm64.zip
unzip chromium-linux-arm64.zip -d ./kibana/${{ env.PLUGIN_NAME }}
zip -ur ./${{ env.PLUGIN_NAME }}-*.zip ./kibana
unzip chromium-linux-arm64.zip -d ./OpenSearch-Dashboards/${{ env.PLUGIN_NAME }}
zip -ur ./${{ env.PLUGIN_NAME }}-*.zip ./OpenSearch-Dashboards
mv ./${{ env.PLUGIN_NAME }}-*.zip ..
cd ..
cd windows-x64
wget https://github.com/opendistro-for-elasticsearch/kibana-reports/releases/download/chromium-1.12.0.0/chromium-windows-x64.zip
unzip chromium-windows-x64.zip -d ./kibana/${{ env.PLUGIN_NAME }}
zip -ur ./${{ env.PLUGIN_NAME }}-*.zip ./kibana
unzip chromium-windows-x64.zip -d ./OpenSearch-Dashboards/${{ env.PLUGIN_NAME }}
zip -ur ./${{ env.PLUGIN_NAME }}-*.zip ./OpenSearch-Dashboards
mv ./${{ env.PLUGIN_NAME }}-*.zip ..
cd ..
- name: Upload Artifact For Linux x64
uses: actions/upload-artifact@v1
with:
name: kibana-reports-linux-x64
path: kibana/plugins/${{ env.PLUGIN_NAME }}/build/${{ env.PLUGIN_NAME }}-${{ env.OD_VERSION }}-linux-x64.zip
name: dashboards-reports-linux-x64
path: OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}/build/${{ env.PLUGIN_NAME }}-${{ env.OD_VERSION }}-linux-x64.zip

- name: Upload Artifact For Linux arm64
uses: actions/upload-artifact@v1
with:
name: kibana-reports-linux-arm64
path: kibana/plugins/${{ env.PLUGIN_NAME }}/build/${{ env.PLUGIN_NAME }}-${{ env.OD_VERSION }}-linux-arm64.zip
name: dashboards-reports-linux-arm64
path: OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}/build/${{ env.PLUGIN_NAME }}-${{ env.OD_VERSION }}-linux-arm64.zip

- name: Upload Artifact For Windows
uses: actions/upload-artifact@v1
with:
name: kibana-reports-windows-x64
path: kibana/plugins/${{ env.PLUGIN_NAME }}/build/${{ env.PLUGIN_NAME }}-${{ env.OD_VERSION }}-windows-x64.zip
name: dashboards-reports-windows-x64
path: OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}/build/${{ env.PLUGIN_NAME }}-${{ env.OD_VERSION }}-windows-x64.zip
Loading

0 comments on commit 4534be9

Please sign in to comment.