Skip to content
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

name: Test and Build Trace Analytics
name: Test and Build Observability Dashboards Plugin

on: [pull_request, push]

Expand All @@ -15,6 +15,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout Plugin
uses: actions/checkout@v1

- name: Checkout OpenSearch Dashboards
uses: actions/checkout@v2
with:
Expand All @@ -40,14 +43,12 @@ jobs:
echo "Installing yarn ${{ steps.versions_step.outputs.yarn_version }}"
npm i -g yarn@${{ steps.versions_step.outputs.yarn_version }}

- name: Checkout Plugin
uses: actions/checkout@v2
with:
path: OpenSearch-Dashboards/plugins/observability
- name: Move Observability to Plugins Dir
run: mv dashboards-observability OpenSearch-Dashboards/plugins/dashboards-observability

- name: Plugin Bootstrap
run: |
cd OpenSearch-Dashboards/plugins/observability
cd OpenSearch-Dashboards/plugins/dashboards-observability
yarn osd bootstrap

# TODO enable unit tests when ready
Expand All @@ -56,22 +57,22 @@ jobs:
# cd OpenSearch-Dashboards/plugins/observability
# yarn test --coverage

- name: Upload coverage
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
direcotry: ./OpenSearch-Dashboards/plugins/observability
# - name: Upload coverage
# uses: codecov/codecov-action@v1
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
# direcotry: ./OpenSearch-Dashboards/plugins/dashboards-observability

# TODO remove hard coded version when observability is ready
- name: Build Artifact
run: |
cd OpenSearch-Dashboards/plugins/observability
cd OpenSearch-Dashboards/plugins/dashboards-observability
yarn build --opensearch-dashboards-version 1.1.0
mv ./build/*.zip ./build/${{ env.PLUGIN_NAME }}-${{ env.OPENSEARCH_PLUGIN_VERSION }}.zip

- name: Upload Artifact
uses: actions/upload-artifact@v1
with:
name: observability
path: ./OpenSearch-Dashboards/plugins/observability/build
path: ./OpenSearch-Dashboards/plugins/dashboards-observability/build

Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Test and Build OpenSearch Observability Backend Plugin

# TODO enable on pull and PR when backend is ready
on: [release]

env:
OPENSEARCH_VERSION: '1.1.0-SNAPSHOT'
OPENSEARCH_BRANCH: '1.1'
COMMON_UTILS_BRANCH: 'main'

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1

- name: Set up JDK 1.14
uses: actions/setup-java@v1
with:
java-version: 1.14

# dependencies: OpenSearch
- name: Checkout OpenSearch
uses: actions/checkout@v2
with:
repository: 'opensearch-project/OpenSearch'
path: OpenSearch
ref: ${{ env.OPENSEARCH_BRANCH }}
- name: Build OpenSearch
working-directory: ./OpenSearch
run: ./gradlew publishToMavenLocal

# dependencies: common-utils
- name: Checkout common-utils
uses: actions/checkout@v2
with:
repository: 'opensearch-project/common-utils'
path: common-utils
ref: ${{ env.COMMON_UTILS_BRANCH }}
- name: Build common-utils
working-directory: ./common-utils
run: ./gradlew publishToMavenLocal -Dopensearch.version=${{ env.OPENSEARCH_VERSION }}

- name: Build with Gradle
run: |
cd opensearch-observability
./gradlew build -Dopensearch.version=${{ env.OPENSEARCH_VERSION }}

- name: Create Artifact Path
run: |
mkdir -p opensearch-observability-builds
cp -r ./opensearch-observability/build/distributions/*.zip opensearch-observability-builds/

- name: Upload Artifacts
uses: actions/upload-artifact@v1
with:
name: opensearch-observability
path: opensearch-observability-builds
13 changes: 10 additions & 3 deletions DEVELOPER_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,29 @@ So you want to contribute code to this project? Excellent! We're glad you're her
1. Change your node version to the version specified in `.node-version` inside the OpenSearch Dashboards root directory.
1. cd into `plugins` directory in the OpenSearch Dashboards source code directory.
1. Check out this package from version control into the `plugins` directory.
1. Run `yarn osd bootstrap` inside `OpenSearch-Dashboards/plugins/trace-analytics`.
```bash
git clone git@github.com:opensearch-project/trace-analytics.git plugins --no-checkout
cd plugins
echo 'dashboards-observability/*' >> .git/info/sparse-checkout
git config core.sparseCheckout true
git checkout main
```
6. Run `yarn osd bootstrap` inside `OpenSearch-Dashboards/plugins/dashboards-observability`.

Ultimately, your directory structure should look like this:

```md
.
├── OpenSearch-Dashboards
│ └── plugins
│ └── trace-analytics
│ └── dashboards-observability
```

### Build

To build the plugin's distributable zip simply run `yarn build`.

Example output: `./build/trace-analytics-dashboards*.zip`
Example output: `./build/observability*.zip`

### Run

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Additionally the fields can be sorted and filtered.

## Documentation

Please see our technical [documentation](https://opensearch.org/docs/monitoring-plugins/trace/index/) to learn more about its features.
Please see our technical [documentation](https://opensearch.org/docs/latest/monitoring-plugins/trace/index/) to learn more about its features.

## Contributing

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading