diff --git a/.github/workflows/kibana-reports-release-workflow.yml b/.github/workflows/kibana-reports-release-workflow.yml index 22606fe8..46459a91 100644 --- a/.github/workflows/kibana-reports-release-workflow.yml +++ b/.github/workflows/kibana-reports-release-workflow.yml @@ -37,29 +37,47 @@ jobs: node-version: "10.22.1" - name: Move Kibana Reports to Plugins Dir - run: mv kibana-reports kibana/plugins + run: mv kibana-reports kibana/plugins/opendistroReportsKibana - name: Kibana Plugin Bootstrap uses: nick-invision/retry@v1 with: timeout_minutes: 30 max_attempts: 3 - command: cd kibana/plugins/kibana-reports; yarn kbn bootstrap + command: cd kibana/plugins/opendistroReportsKibana; yarn kbn bootstrap - name: Test uses: nick-invision/retry@v1 with: timeout_minutes: 30 max_attempts: 3 - command: cd kibana/plugins/kibana-reports; yarn test + command: cd kibana/plugins/opendistroReportsKibana; yarn test - name: Build Artifact run: | - cd kibana/plugins/kibana-reports + cd kibana/plugins/opendistroReportsKibana yarn build - mv ./build/*.zip ./build/${{ env.PLUGIN_NAME }}-${{ env.OD_VERSION }}.zip - artifact=`ls ./build/*.zip` - # TODO: rename S3 bucket path after infra team assigns one - aws s3 cp $artifact s3://kiabna-reports/kibana-reports-plugin/ + cd build + mkdir -p ./{linux,windows}/kibana/opendistroReportsKibana + cp ./${{ env.PLUGIN_NAME }}-*.zip ./linux/${{ env.PLUGIN_NAME }}-${{ env.OD_VERSION }}-linux-x64.zip + mv ./${{ env.PLUGIN_NAME }}-*.zip ./windows/${{ env.PLUGIN_NAME }}-${{ env.OD_VERSION }}-windows-x64.zip + + cd linux + wget https://github.com/opendistro-for-elasticsearch/kibana-reports/releases/download/chromium-1.12.0.0/chromium-linux.zip + unzip chromium-linux.zip -d ./kibana/opendistroReportsKibana + zip -ur ./${{ env.PLUGIN_NAME }}-*.zip ./kibana + mv ./${{ env.PLUGIN_NAME }}-*.zip .. + cd .. + + cd windows + wget https://github.com/opendistro-for-elasticsearch/kibana-reports/releases/download/chromium-1.12.0.0/chromium-windows.zip + unzip chromium-windows.zip -d ./kibana/opendistroReportsKibana + zip -ur ./${{ env.PLUGIN_NAME }}-*.zip ./kibana + mv ./${{ env.PLUGIN_NAME }}-*.zip .. + cd .. + + artifact=`ls ./${{ env.PLUGIN_NAME }}-*.zip` + + aws s3 cp $artifact s3://artifacts.opendistroforelasticsearch.amazon.com/downloads/kibana-plugins/opendistro-reports/ aws cloudfront create-invalidation --distribution-id ${{ secrets.DISTRIBUTION_ID }} --paths "/downloads/*" diff --git a/.github/workflows/kibana-reports-test-and-build-workflow.yml b/.github/workflows/kibana-reports-test-and-build-workflow.yml index 6d0d8e05..3513fe9e 100644 --- a/.github/workflows/kibana-reports-test-and-build-workflow.yml +++ b/.github/workflows/kibana-reports-test-and-build-workflow.yml @@ -26,30 +26,62 @@ jobs: node-version: "10.22.1" - name: Move Kibana Reports to Plugins Dir - run: mv kibana-reports kibana/plugins + run: mv kibana-reports kibana/plugins/opendistroReportsKibana + + - name: Add Chromium Binary to Reporting for Testing + run: | + sudo apt install -y libnss3-dev fonts-liberation libfontconfig1 + cd kibana/plugins/opendistroReportsKibana + wget https://github.com/opendistro-for-elasticsearch/kibana-reports/releases/download/chromium-1.12.0.0/chromium-linux.zip + unzip chromium-linux.zip + rm chromium-linux.zip - name: Kibana Plugin Bootstrap uses: nick-invision/retry@v1 with: timeout_minutes: 30 max_attempts: 3 - command: cd kibana/plugins/kibana-reports; yarn kbn bootstrap + command: cd kibana/plugins/opendistroReportsKibana; yarn kbn bootstrap - name: Test uses: nick-invision/retry@v1 with: timeout_minutes: 30 max_attempts: 3 - command: cd kibana/plugins/kibana-reports; yarn test + command: cd kibana/plugins/opendistroReportsKibana; yarn test - name: Build Artifact run: | - cd kibana/plugins/kibana-reports + cd kibana/plugins/opendistroReportsKibana yarn build - mv ./build/*.zip ./build/${{ env.PLUGIN_NAME }}-${{ env.OD_VERSION }}.zip - - name: Upload Artifact + cd build + mkdir -p ./{linux,windows}/kibana/opendistroReportsKibana + cp ./${{ env.PLUGIN_NAME }}-*.zip ./linux/${{ env.PLUGIN_NAME }}-${{ env.OD_VERSION }}-linux-x64.zip + mv ./${{ env.PLUGIN_NAME }}-*.zip ./windows/${{ env.PLUGIN_NAME }}-${{ env.OD_VERSION }}-windows-x64.zip + + cd linux + wget https://github.com/opendistro-for-elasticsearch/kibana-reports/releases/download/chromium-1.12.0.0/chromium-linux.zip + unzip chromium-linux.zip -d ./kibana/opendistroReportsKibana + zip -ur ./${{ env.PLUGIN_NAME }}-*.zip ./kibana + mv ./${{ env.PLUGIN_NAME }}-*.zip .. + cd .. + + cd windows + wget https://github.com/opendistro-for-elasticsearch/kibana-reports/releases/download/chromium-1.12.0.0/chromium-windows.zip + unzip chromium-windows.zip -d ./kibana/opendistroReportsKibana + zip -ur ./${{ env.PLUGIN_NAME }}-*.zip ./kibana + mv ./${{ env.PLUGIN_NAME }}-*.zip .. + cd .. + + - name: Upload Artifact For Linux + uses: actions/upload-artifact@v1 + with: + name: kibana-reports-linux + path: kibana/plugins/opendistroReportsKibana/build/${{ env.PLUGIN_NAME }}-${{ env.OD_VERSION }}-linux-x64.zip + + - name: Upload Artifact For Windows uses: actions/upload-artifact@v1 with: - name: kibana-reports - path: kibana/plugins/kibana-reports/build + name: kibana-reports-windows + path: kibana/plugins/opendistroReportsKibana/build/${{ env.PLUGIN_NAME }}-${{ env.OD_VERSION }}-windows-x64.zip