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

Add github action CI/CD for kibana-reports plugin #159

Merged
merged 21 commits into from
Oct 29, 2020
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
59 changes: 59 additions & 0 deletions .github/workflows/kibana_reports_release_workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Release Kibana Reports Artifacts

on:
push:
tags:
- "v*"

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_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1

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

- name: Checkout Kibana
uses: actions/checkout@v1
with:
repository: elastic/kibana
ref: v7.9.1
path: kibana-reports/kibana

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

- name: Move Kibana Reports to Plugins Dir
run: |
mkdir kibana/plugins
mv kibana-reports kibana/plugins

- name: Kibana Plugin Bootstrap
uses: nick-invision/retry@v1
with:
timeout_minutes: 60
max_attempts: 3
command: cd kibana/plugins/kibana-reports; yarn kbn bootstrap

- name: Test
run: |
cd kibana/plugins/kibana-reports
yarn test

- name: Build Artifact
run: |
cd kibana/plugins/kibana-reports
yarn build
artifact=`ls ./build/*.zip`
# TODO: rename S3 bucket path after infra team assigns one
aws s3 cp $artifact s3://kiabna-reports/kibana-reports-plugin/
aws cloudfront create-invalidation --distribution-id ${{ secrets.DISTRIBUTION_ID }} --paths "/downloads/*"
50 changes: 50 additions & 0 deletions .github/workflows/kibana_reports_test_and_build_workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Test and Build Kibana Reports

on: [pull_request, push]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Plugin
uses: actions/checkout@v1

- name: Checkout Kibana
uses: actions/checkout@v1
with:
repository: elastic/kibana
ref: v7.9.1
path: kibana-reports/kibana

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

- name: Move Kibana Reports to Plugins Dir
run: |
mkdir kibana/plugins
mv kibana-reports kibana/plugins

- name: Kibana Plugin Bootstrap
uses: nick-invision/retry@v1
with:
timeout_minutes: 60
max_attempts: 3
command: cd kibana/plugins/kibana-reports; yarn kbn bootstrap

- name: Test
run: |
cd kibana/plugins/kibana-reports
yarn test

- name: Build Artifact
run: |
cd kibana/plugins/kibana-reports
yarn build

- name: Upload Artifact
uses: actions/upload-artifact@v1
with:
name: kibana-reports
path: kibana/plugins/kibana-reports/build
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@ yarn-error.log
/coverage/
.history/
.eslintcache
target
File renamed without changes.
1 change: 0 additions & 1 deletion kibana-reports/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@ yarn-error.log
.DS_Store
.history/
.eslintcache
target
package-lock.json
212 changes: 212 additions & 0 deletions kibana-reports/target/public/.kbn-optimizer-cache

Large diffs are not rendered by default.

7,598 changes: 7,598 additions & 0 deletions kibana-reports/target/public/0.plugin.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions kibana-reports/target/public/0.plugin.js.map

Large diffs are not rendered by default.

Loading