From 3dd863febfcbf9424d770b537834d2c66a9cb177 Mon Sep 17 00:00:00 2001 From: Mohammad Qureshi Date: Wed, 2 Oct 2019 11:21:19 -0700 Subject: [PATCH 1/3] Added workflow for continuous integration using GitHub Actions --- .github/workflows/master-workflow.yml | 39 +++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/master-workflow.yml diff --git a/.github/workflows/master-workflow.yml b/.github/workflows/master-workflow.yml new file mode 100644 index 00000000..7dc828b8 --- /dev/null +++ b/.github/workflows/master-workflow.yml @@ -0,0 +1,39 @@ +name: Master Workflow +# This workflow is triggered on pushes/pull requests to master +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + build: + strategy: + java: 12 + # Job name + name: Build Alerting with JDK ${{ 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 ${{ java }} + uses: actions/setup-java@v1 + with: + java-version: ${{ java }} + - name: Build with Gradle + run: ./gradlew build + - name: Create Artifact Path + run: | + mkdir -p alerting-artifacts + cp ./build/distributions/*.zip alerting-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: alerting-artifacts + path: alerting-artifacts From 7b3510f456e1fc5572119014504c316af6df29fd Mon Sep 17 00:00:00 2001 From: Mohammad Qureshi Date: Wed, 2 Oct 2019 11:32:55 -0700 Subject: [PATCH 2/3] Fixed syntax for specifying java version --- .github/workflows/master-workflow.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/master-workflow.yml b/.github/workflows/master-workflow.yml index 7dc828b8..5be8e9a1 100644 --- a/.github/workflows/master-workflow.yml +++ b/.github/workflows/master-workflow.yml @@ -11,9 +11,10 @@ on: jobs: build: strategy: - java: 12 + matrix: + java: [12] # Job name - name: Build Alerting with JDK ${{ java }} + name: Build Alerting with JDK ${{ matrix.java }} # This job runs on Linux runs-on: ubuntu-latest steps: @@ -21,10 +22,10 @@ jobs: - 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 ${{ java }} + - name: Set Up JDK ${{ matrix.java }} uses: actions/setup-java@v1 with: - java-version: ${{ java }} + java-version: ${{ matrix.java }} - name: Build with Gradle run: ./gradlew build - name: Create Artifact Path From 5a4bb9db18eff4495c9f95e876fea7c02f39dd4d Mon Sep 17 00:00:00 2001 From: Mohammad Qureshi Date: Wed, 2 Oct 2019 11:43:20 -0700 Subject: [PATCH 3/3] Updated artifact path in workflow file --- .github/workflows/master-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/master-workflow.yml b/.github/workflows/master-workflow.yml index 5be8e9a1..2f0710ed 100644 --- a/.github/workflows/master-workflow.yml +++ b/.github/workflows/master-workflow.yml @@ -31,7 +31,7 @@ jobs: - name: Create Artifact Path run: | mkdir -p alerting-artifacts - cp ./build/distributions/*.zip alerting-artifacts + cp ./alerting/build/distributions/*.zip alerting-artifacts # This step uses the upload-artifact Github action: https://github.com/actions/upload-artifact - name: Upload Artifacts uses: actions/upload-artifact@v1