From f55ea1a465d87377728660e65ddb85f55282685a Mon Sep 17 00:00:00 2001 From: Drew Baugher <46505179+dbbaughe@users.noreply.github.com> Date: Mon, 6 Apr 2020 13:17:31 -0700 Subject: [PATCH] Create Build and Test Workflow (#178) Automated workflow to test and build plugin on pull requests to master or opendistro release branches. On success, zip files are uploaded. Co-authored-by: Mohammad Qureshi <47198598+qreshi@users.noreply.github.com> --- .github/workflows/test-and-build-workflow.yml | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/test-and-build-workflow.yml diff --git a/.github/workflows/test-and-build-workflow.yml b/.github/workflows/test-and-build-workflow.yml new file mode 100644 index 000000000..647a0875e --- /dev/null +++ b/.github/workflows/test-and-build-workflow.yml @@ -0,0 +1,38 @@ +name: Test and Build Workflow +# This workflow is triggered on pull requests to master or a opendistro release branch +on: + pull_request: + branches: + - master + - opendistro-* + +jobs: + build: + strategy: + matrix: + java: [12] + # Job name + name: Build Index Management with JDK ${{ matrix.java }} + # This job runs on Linux + runs-on: ubuntu-latest + steps: + # This step uses the checkout Github action: https://github.com/actions/checkout + - name: Checkout Branch + uses: actions/checkout@v1 + # This step uses the setup-java Github action: https://github.com/actions/setup-java + - name: Set Up JDK ${{ matrix.java }} + uses: actions/setup-java@v1 + with: + java-version: ${{ matrix.java }} + - name: Build with Gradle + run: ./gradlew build + - name: Create Artifact Path + run: | + mkdir -p index-management-artifacts + cp ./build/distributions/*.zip index-management-artifacts + # This step uses the upload-artifact Github action: https://github.com/actions/upload-artifact + - name: Upload Artifacts + uses: actions/upload-artifact@v1 + with: + name: index-management-plugin + path: index-management-artifacts