Skip to content
This repository has been archived by the owner on Mar 31, 2021. It is now read-only.

Set up workflows for testing, building artifacts and releasing #58

Merged
merged 17 commits into from
May 7, 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
55 changes: 55 additions & 0 deletions .github/workflows/release-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@

name: Release SQL-Kibana 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 Kibana
uses: actions/checkout@v1
with:
repository: opendistro-for-elasticsearch/kibana-oss
ref: 7.6.1
token: ${{secrets.OD_ACCESS}}
path: kibana

- name: Checkout Plugin
uses: actions/checkout@v1
with:
path: kibana/plugins/sql-kibana-plugin

- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: '10.19.0'

- name: Kibana Pluign Bootstrap
uses: nick-invision/retry@v1
with:
timeout_minutes: 60
max_attempts: 3
command: yarn kbn bootstrap

- name: Build Artifact
run: |
yarn build
artifact=`ls ./build/*.zip`

aws s3 cp $artifact s3://artifacts.opendistroforelasticsearch.amazon.com/downloads/kibana-plugins/opendistro-sql-kibana/
aws cloudfront create-invalidation --distribution-id ${{ secrets.DISTRIBUTION_ID }} --paths "/downloads/*"
44 changes: 44 additions & 0 deletions .github/workflows/test-and-build-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@

name: Test and Build

on: [pull_request, push]

jobs:

build:

runs-on: ubuntu-latest

steps:
- name: Checkout Kibana
uses: actions/checkout@v1
with:
repository: opendistro-for-elasticsearch/kibana-oss
ref: 7.6.1
token: ${{secrets.OD_ACCESS}}
path: kibana
- name: Checkout Plugin
uses: actions/checkout@v1
with:
path: kibana/plugins/sql-kibana-plugin
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: '10.19.0'
- name: Kibana Pluign Bootstrap
uses: nick-invision/retry@v1
with:
timeout_minutes: 60
max_attempts: 3
command: yarn kbn bootstrap
- name: Test
run: |
yarn test:jest
- name: Build Artifact
run: |
yarn build
- name: Upload Artifact
uses: actions/upload-artifact@v1
with:
name: sql-kibana
path: ./build