Skip to content

Commit

Permalink
ci: add UBI mlmd server build workflow (google#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
lampajr authored Feb 19, 2024
1 parent a117c0c commit 114fd3c
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 2 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Container Image Build
on:
pull_request:
paths-ignore:
- 'LICENSE*'
- '**.gitignore'
- '**.md'
- '**.txt'
- '.github/ISSUE_TEMPLATE/**'
- '.github/dependabot.yml'
- 'docs/**'

jobs:
build-image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Generate Tag
shell: bash
id: tags
run: |
commit_sha=${{ github.event.after }}
tag=main-${commit_sha:0:7}
echo "tag=${tag}" >> $GITHUB_OUTPUT
- name: Build Image
shell: bash
env:
DOCKER_IMAGE_REPO: quay.io/opendatahub/mlmd-grpc-server
DOCKER_IMAGE_TAG: ${{ steps.tags.outputs.tag }}
DOCKER_FILE: Dockerfile.redhat
run: ./ml_metadata/tools/docker_server/build_docker_image.sh
3 changes: 1 addition & 2 deletions ml_metadata/tools/docker_server/Dockerfile.redhat
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ RUN mkdir /bazel && \
cd / && \
rm -f /bazel/bazel-$BAZEL_VERSION-installer-linux-x86_64.sh


COPY . /mlmd-src
WORKDIR /mlmd-src

Expand All @@ -45,7 +44,7 @@ RUN bazel build -c opt --action_env=PATH \
RUN mkdir -p /mlmd-src/third_party
RUN cp -RL /mlmd-src/bazel-mlmd-src/external/libmysqlclient /mlmd-src/third_party/mariadb-connector-c

FROM registry.redhat.io/ubi8/ubi-minimal:8.9
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.9

COPY --from=builder /mlmd-src/bazel-bin/ml_metadata/metadata_store/metadata_store_server /bin/metadata_store_server
COPY --from=builder /mlmd-src/third_party /mlmd-src/third_party
Expand Down

0 comments on commit 114fd3c

Please sign in to comment.