From 6c100a06c36ecd698185db4a159e6929cba71a3c Mon Sep 17 00:00:00 2001 From: David Venable Date: Sat, 16 Sep 2023 11:22:43 -0500 Subject: [PATCH] Consolidate GitHub Actions Signed-off-by: David Venable --- ...ples-trace-analytics-analytics-service.yml | 39 ------------------- .../workflows/examples-trace-analytics.yml | 27 ++++++++++++- 2 files changed, 25 insertions(+), 41 deletions(-) delete mode 100644 .github/workflows/examples-trace-analytics-analytics-service.yml diff --git a/.github/workflows/examples-trace-analytics-analytics-service.yml b/.github/workflows/examples-trace-analytics-analytics-service.yml deleted file mode 100644 index 3f5cd5d833..0000000000 --- a/.github/workflows/examples-trace-analytics-analytics-service.yml +++ /dev/null @@ -1,39 +0,0 @@ -# -# Builds the Trace Analytics - Analytics Service app. -# This is a Java application and this verifies that it continues to build. -# This also verifies that the Docker image build works. -# - -name: Trace Analytics Sample App Analytics Service - -on: - push: - branches: [ main ] - paths: - - 'examples/trace-analytics-sample-app/sample-app/analytics-service/**' - pull_request: - paths: - - 'examples/trace-analytics-sample-app/sample-app/analytics-service/**' - workflow_dispatch: - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@v1 - with: - java-version: ${{ matrix.java }} - - - name: Checkout Data Prepper - uses: actions/checkout@v2 - - - name: Build Analytics Service - run: | - cd examples/trace-analytics-sample-app/sample-app/analytics-service - ./gradlew build - - - name: Build Analytics Service Docker image - run: | - docker build -t analytics-service . diff --git a/.github/workflows/examples-trace-analytics.yml b/.github/workflows/examples-trace-analytics.yml index a3dc97f277..919e638c2b 100644 --- a/.github/workflows/examples-trace-analytics.yml +++ b/.github/workflows/examples-trace-analytics.yml @@ -1,7 +1,9 @@ # -# Builds the Trace Analytics Docker image. +# Builds the Trace Analytics Docker image(s). # This will build the full Docker image for the sample-app which includes # Python applications and installing onto the base Docker image. +# It also build the Java sample app and corresponding Docker image to +# ensure those continue to build. # name: Trace Analytics Sample App @@ -17,7 +19,7 @@ on: workflow_dispatch: jobs: - build: + docker-build: runs-on: ubuntu-latest steps: @@ -28,3 +30,24 @@ jobs: run: | cd examples/trace-analytics-sample-app docker build -t sample-app sample-app + + java-app-build: + runs-on: ubuntu-latest + + steps: + - name: Set up JDK ${{ matrix.java }} + uses: actions/setup-java@v1 + with: + java-version: ${{ matrix.java }} + + - name: Checkout Data Prepper + uses: actions/checkout@v2 + + - name: Build Analytics Service + run: | + cd examples/trace-analytics-sample-app/sample-app/analytics-service + ./gradlew build + + - name: Build Analytics Service Docker image + run: | + docker build -t analytics-service .