Skip to content

Commit

Permalink
OZ-323: Fix build pipelines for release of 2.1.0 (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
enyachoke authored Oct 16, 2023
1 parent f80adb3 commit 2a52f2d
Show file tree
Hide file tree
Showing 7 changed files with 79 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/batch-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
push:
branches:
- main
tags:
- '*'

jobs:
docker:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/parquet-export-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
push:
branches:
- main
tags:
- '*'

jobs:
docker:
Expand Down
73 changes: 73 additions & 0 deletions .github/workflows/setup-connect-image.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
---
name: 'CI Setup Connect'

on:
push:
branches:
- main
tags:
- '*'

jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Prepare
id: prep
run: |
#!/bin/bash
DOCKER_IMAGE=${{ secrets.DOCKER_USERNAME }}/ozone-analytics-setup-connect
VERSION=latest
SHORTREF=${GITHUB_SHA::8}
# If this is git tag, use the tag name as a docker tag
if [[ $GITHUB_REF == refs/tags/* ]]; then
VERSION=${GITHUB_REF#refs/tags/v}
fi
TAGS="${DOCKER_IMAGE}:${VERSION},${DOCKER_IMAGE}:${SHORTREF}"
# If the VERSION looks like a version number, assume that
# this is the most recent version of the image and also
# tag it 'latest'.
if [[ $VERSION =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
TAGS="$TAGS,${DOCKER_IMAGE}:latest"
fi
# Set output parameters.
echo ::set-output name=tags::${TAGS}
echo ::set-output name=docker_image::${DOCKER_IMAGE}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: linux/amd64,linux/arm64

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2

- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Get version
run: |
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
echo $VERSION
echo ::set-output name=version::$VERSION
id: get_version

- name: Build
uses: docker/build-push-action@v2
with:
builder: ${{ steps.buildx.outputs.name }}
context: ./development/setup-connect
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.prep.outputs.tags }}
2 changes: 2 additions & 0 deletions .github/workflows/streaming-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
push:
branches:
- main
tags:
- '*'

jobs:
docker:
Expand Down
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ RUN wget https://repo1.maven.org/maven2/org/apache/httpcomponents/httpcore/4.4.
RUN wget https://repo1.maven.org/maven2/com/ecwid/consul/consul-api/1.4.5/consul-api-1.4.5.jar -O /opt/flink/lib/consul-api-1.4.5.jar
RUN wget https://repo1.maven.org/maven2/com/google/code/gson/gson/2.9.0/gson-2.9.0.jar -O /opt/flink/lib/gson-2.9.0.jar
COPY --from=builder target/flink-jobs-${JAR_VERSION}-etl-streaming.jar /opt/flink/usrlib/streaming-etl-job.jar
COPY --from=builder target/flink-jobs-${JAR_VERSION}-etl-migrations.jar /opt/flink/usrlib/ozone-etl-migrations.jar
COPY run.sh /run.sh
RUN chmod +x /run.sh
ENTRYPOINT ["/docker-entrypoint.sh"]
1 change: 0 additions & 1 deletion Dockerfile_batch
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ FROM eclipse-temurin:8-jre
ARG JAR_VERSION=1.0.0-SNAPSHOT
ENV OUTPUT_DIR=/parquet
COPY --from=builder target/flink-jobs-${JAR_VERSION}-etl-batch.jar etl-batch.jar
COPY --from=builder target/flink-jobs-${JAR_VERSION}-etl-migrations.jar /opt/flink/usrlib/ozone-etl-migrations.jar
ADD etl-batch.sh ./etl-batch.sh
COPY run.sh /run.sh
RUN chmod +x /run.sh
Expand Down
1 change: 0 additions & 1 deletion Dockerfile_parquet_export
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ FROM eclipse-temurin:8-jre
ARG JAR_VERSION=1.0.0-SNAPSHOT
ENV OUTPUT_DIR=/parquet
COPY --from=builder target/flink-jobs-${JAR_VERSION}-etl-export.jar etl-export.jar
COPY --from=builder target/flink-jobs-${JAR_VERSION}-etl-migrations.jar /opt/flink/usrlib/ozone-etl-migrations.jar
ADD parquet-export.sh ./parquet-export.sh
COPY run.sh /run.sh
RUN chmod +x /run.sh
Expand Down

0 comments on commit 2a52f2d

Please sign in to comment.