Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.3] Move gantt-chart out from subdirectory (#321) #325

Merged
merged 1 commit into from
Feb 1, 2024
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
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.
53 changes: 25 additions & 28 deletions .github/workflows/test-and-build-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,23 @@ jobs:
runs-on: ubuntu-latest

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

- name: Checkout OpenSearch Dashboards
uses: actions/checkout@v2
with:
repository: opensearch-project/Opensearch-Dashboards
ref: ${{ env.OPENSEARCH_VERSION }}
path: dashboards-visualizations/OpenSearch-Dashboards
path: OpenSearch-Dashboards

- name: Checkout Plugin
uses: actions/checkout@v2
with:
path: OpenSearch-Dashboards/plugins/dashboards-visualizations

- name: Get node and yarn versions
id: versions_step
run: |
echo "::set-output name=node_version::$(node -p "(require('./dashboards-visualizations/OpenSearch-Dashboards/package.json').engines.node).match(/[.0-9]+/)[0]")"
echo "::set-output name=yarn_version::$(node -p "(require('./dashboards-visualizations/OpenSearch-Dashboards/package.json').engines.yarn).match(/[.0-9]+/)[0]")"
echo "::set-output name=node_version::$(node -p "(require('./OpenSearch-Dashboards/package.json').engines.node).match(/[.0-9]+/)[0]")"
echo "::set-output name=yarn_version::$(node -p "(require('./OpenSearch-Dashboards/package.json').engines.yarn).match(/[.0-9]+/)[0]")"

- name: Setup node
uses: actions/setup-node@v1
Expand All @@ -43,44 +45,38 @@ jobs:
echo "Installing yarn ${{ steps.versions_step.outputs.yarn_version }}"
npm i -g yarn@${{ steps.versions_step.outputs.yarn_version }}

- name: Move Gantt Chart to Plugins Dir
run: |
mv gantt-chart ./dashboards-visualizations/OpenSearch-Dashboards/plugins

- name: Plugin Bootstrap
run: |
cd ./dashboards-visualizations/OpenSearch-Dashboards/plugins/gantt-chart
cd ./OpenSearch-Dashboards/plugins/dashboards-visualizations
yarn osd bootstrap

- name: Test
run: |
cd ./dashboards-visualizations/OpenSearch-Dashboards/plugins/gantt-chart
cd ./OpenSearch-Dashboards/plugins/dashboards-visualizations
yarn test --coverage

- name: Upload coverage
uses: codecov/codecov-action@v1
with:
directory: ./dashboards-visualizations/OpenSearch-Dashboards/plugins/gantt-chart
directory: ./OpenSearch-Dashboards/plugins/dashboards-visualizations
token: ${{ secrets.CODECOV_TOKEN }}

- name: Build Artifact
run: |
cd ./dashboards-visualizations/OpenSearch-Dashboards/plugins/gantt-chart
cd ./OpenSearch-Dashboards/plugins/dashboards-visualizations
yarn build
mv ./build/*.zip ./build/${{ env.PLUGIN_NAME }}-${{ env.OPENSEARCH_PLUGIN_VERSION }}.zip

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

windows-build:

runs-on: windows-latest
steps:
- name: Checkout Plugin
uses: actions/checkout@v2
# Enable longer filenames for windows
- name: Enable longer filenames
run: git config --system core.longpaths true
Expand All @@ -90,13 +86,18 @@ jobs:
with:
repository: opensearch-project/Opensearch-Dashboards
ref: ${{ env.OPENSEARCH_VERSION }}
path: dashboards-visualizations/OpenSearch-Dashboards
path: OpenSearch-Dashboards

- name: Checkout Plugin
uses: actions/checkout@v2
with:
path: OpenSearch-Dashboards/plugins/dashboards-visualizations

- name: Get node and yarn versions
id: versions_step
run: |
echo "::set-output name=node_version::$(node -p "(require('./dashboards-visualizations/OpenSearch-Dashboards/package.json').engines.node).match(/[.0-9]+/)[0]")"
echo "::set-output name=yarn_version::$(node -p "(require('./dashboards-visualizations/OpenSearch-Dashboards/package.json').engines.yarn).match(/[.0-9]+/)[0]")"
echo "::set-output name=node_version::$(node -p "(require('./OpenSearch-Dashboards/package.json').engines.node).match(/[.0-9]+/)[0]")"
echo "::set-output name=yarn_version::$(node -p "(require('./OpenSearch-Dashboards/package.json').engines.yarn).match(/[.0-9]+/)[0]")"

- name: Setup node
uses: actions/setup-node@v1
Expand All @@ -110,28 +111,24 @@ jobs:
echo "Installing yarn ${{ steps.versions_step.outputs.yarn_version }}"
npm i -g yarn@${{ steps.versions_step.outputs.yarn_version }}

- name: Move Gantt Chart to Plugins Dir
run: |
mv gantt-chart ./dashboards-visualizations/OpenSearch-Dashboards/plugins

- name: Plugin Bootstrap
run: |
cd ./dashboards-visualizations/OpenSearch-Dashboards/plugins/gantt-chart
cd ./OpenSearch-Dashboards/plugins/dashboards-visualizations
yarn osd bootstrap

- name: Test
run: |
cd ./dashboards-visualizations/OpenSearch-Dashboards/plugins/gantt-chart
cd ./OpenSearch-Dashboards/plugins/dashboards-visualizations
yarn test

- name: Build Artifact
run: |
cd ./dashboards-visualizations/OpenSearch-Dashboards/plugins/gantt-chart
cd ./OpenSearch-Dashboards/plugins/dashboards-visualizations
yarn build
mv ./build/*.zip ./build/${{ env.PLUGIN_NAME }}-${{ env.OPENSEARCH_PLUGIN_VERSION }}.zip

- name: Upload Artifact
uses: actions/upload-artifact@v1
with:
name: gantt-chart-windows
path: ./dashboards-visualizations/OpenSearch-Dashboards/plugins/gantt-chart/build
path: ./OpenSearch-Dashboards/plugins/dashboards-visualizations/build
File renamed without changes.
10 changes: 3 additions & 7 deletions DEVELOPER_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,8 @@ So you want to contribute code to this project? Excellent! We're glad you're her
1. cd into the OpenSearch Dashboards source code directory.
1. Check out this package from version control into the `plugins` directory.
```
rm plugins -r
git clone [email protected]:opensearch-project/dashboards-visualizations.git plugins --no-checkout
cd plugins
echo 'gantt-chart/*' >> .git/info/sparse-checkout
git config core.sparseCheckout true
git checkout main
git clone [email protected]:opensearch-project/dashboards-visualizations.git
```
6. Run `yarn osd bootstrap` inside `OpenSearch-Dashboards` directory.

Expand All @@ -26,7 +22,7 @@ Ultimately, your directory structure should look like this:
.
├── OpenSearch Dashboards
│ └── plugins
│ └── gantt-chart
│ └── dashboards-visualizations
```


Expand Down Expand Up @@ -57,4 +53,4 @@ The Github workflow in [`backport.yml`](.github/workflows/backport.yml) creates
with an appropriate label `backport <backport-branch-name>` is merged to main with the backport workflow run successfully on the
PR. For example, if a PR on main needs to be backported to `1.x` branch, add a label `backport 1.x` to the PR and make sure the
backport workflow runs on the PR along with other checks. Once this PR is merged to main, the workflow will create a backport PR
to the `1.x` branch.
to the `1.x` branch.
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.
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.
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