Skip to content

Workflow file for this run

name: Lakehouse Connector Release
on:
release:
types: [published]
workflow_dispatch:
inputs:
tag:
description: 'The tag of the release'
required: true
default: 'master'
push:
branches:
- yong/debug-image
jobs:
upload:
name: Upload Release files
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: v3.0.5.3
- name: Set up JDK 17
uses: actions/setup-java@v2
if: ${{ needs.changed_files_job.outputs.docs_only != 'true' }}
with:
distribution: 'temurin'
java-version: 17
- name: Login streamnative docker hub
run: docker login -u="${{ secrets.DOCKER_USER }}" -p="${{ secrets.DOCKER_PASSWORD }}"
- name: build
run: |
if [ -f ./scripts/get-version.sh ]; then
version=`./scripts/get-version.sh`
else
version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
fi
mvn clean install -DskipTests
echo "::set-output name=jar-file::pulsar-io-lakehouse-${version}-cloud.nar"
echo "::set-output name=readme-file::pulsar-io-lakehouse-readme.md"
- name: build and push docker image
uses: nick-fields/retry@v2
with:
max_attempts: 99
retry_wait_seconds: 60
timeout_minutes: 5
command: |
if [ -f ./scripts/get-version.sh ]; then
CONNECTOR_VERSION=`./scripts/get-version.sh`
else
CONNECTOR_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
fi
PULSAR_VERSION=`mvn -q -Dexec.executable=echo -Dexec.args='${pulsar.version}' --non-recursive exec:exec 2>/dev/null`
REPO=`mvn -q -Dexec.executable=echo -Dexec.args='${project.artifactId}' --non-recursive exec:exec 2>/dev/null`
IMAGE_REPO=streamnative/${REPO}
docker build --build-arg PULSAR_VERSION="$PULSAR_VERSION" -t ${IMAGE_REPO}:${CONNECTOR_VERSION} -f ./image/Dockerfile ./
# docker push ${IMAGE_REPO}:${CONNECTOR_VERSION}