From 7d75b02fb48fdfc91242407d9dbc2a8f1851b613 Mon Sep 17 00:00:00 2001 From: David Venable Date: Sat, 16 Sep 2023 09:01:45 -0500 Subject: [PATCH] Adds GitHub Actions to verify that the trace-analytics example apps can still build Docker images. Signed-off-by: David Venable --- .../workflows/examples-trace-analytics.yml | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/examples-trace-analytics.yml diff --git a/.github/workflows/examples-trace-analytics.yml b/.github/workflows/examples-trace-analytics.yml new file mode 100644 index 0000000000..5b400c6b0f --- /dev/null +++ b/.github/workflows/examples-trace-analytics.yml @@ -0,0 +1,51 @@ +# +# 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 + +on: + push: + branches: [ main ] + paths: + - 'examples/trace-analytics-sample-app/**' + pull_request: + paths: + - 'examples/trace-analytics-sample-app/**' + workflow_dispatch: + +jobs: + docker-build: + runs-on: ubuntu-latest + + steps: + - name: Checkout Data Prepper + uses: actions/checkout@v2 + + - name: Build Sample App + working-directory: examples/trace-analytics-sample-app + run: docker build -t sample-app sample-app + + java-app-build: + runs-on: ubuntu-latest + + steps: + - name: Set up JDK 17 + uses: actions/setup-java@v1 + with: + java-version: 17 + + - name: Checkout Data Prepper + uses: actions/checkout@v2 + + - name: Build Analytics Service + working-directory: ./examples/trace-analytics-sample-app/sample-app/analytics-service + run: ./gradlew build + + - name: Build Analytics Service Docker image + working-directory: ./examples/trace-analytics-sample-app/sample-app/analytics-service + run: docker build -t analytics-service .