-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support build testing pulsar cloud with oxia (#102)
- Loading branch information
1 parent
1e93861
commit f17ebbb
Showing
3 changed files
with
71 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
ARG PULSAR_FQ_IMAGE | ||
FROM ${PULSAR_FQ_IMAGE} | ||
|
||
ARG OXIA_VERSION | ||
|
||
USER root | ||
RUN rm -rf /pulsar/lib/pulsar-metadatastore-oxia-*-shaded.jar | ||
|
||
COPY ../pulsar-metadatastore-oxia/target/pulsar-metadatastore-oxia-${OXIA_VERSION}-shaded.jar /pulsar/lib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: Build & Publish testing pulsar image | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
pulsar_image: | ||
description: pulsar image | ||
required: true | ||
pulsar_tag: | ||
description: pulsar tag | ||
required: true | ||
publish_image: | ||
description: publish image | ||
required: true | ||
|
||
envs: | ||
PULSAR_TAG: ${{ github.event.inputs.pulsar_tag }} | ||
PULSAR_FQ_IMAGE: ${{ github.event.inputs.pulsar_image }}:${{ github.event.inputs.pulsar_cloud_tag }} | ||
PUBLISH_IMAGE: ${{ github.event.inputs.publish_image }} | ||
|
||
jobs: | ||
build-publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: temurin | ||
java-version: 17 | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Install Protoc | ||
uses: arduino/setup-protoc@v1 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build | ||
run: mvn clean install -DskipTests | ||
- name: Extract Maven project version | ||
run: echo ::set-output name=version::$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec) | ||
id: version | ||
- uses: docker/setup-buildx-action@v2 | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKER_USER }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
- name: Build and push | ||
uses: docker/build-push-action@v3 | ||
envs: | ||
OXIA_VERSION: ${{ steps.version.outputs.version }} | ||
with: | ||
context: . | ||
platforms: linux/x86_64,linux/arm64 | ||
push: true | ||
file: {context}/.ci/Dockerfile | ||
tags: $PUBLISH_IMAGE:$PULSAR_TAG-oxia-$OXIA_VERSION | ||
build-args: | ||
PULSAR_FQ_IMAGE: $PULSAR_FQ_IMAGE | ||
OXIA_VERSION: $OXIA_VERSION |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters