Skip to content

Commit

Permalink
fixup! wip: CI
Browse files Browse the repository at this point in the history
Signed-off-by: Utkarsh Saxena <[email protected]>
  • Loading branch information
utk-spartan committed May 26, 2024
1 parent bfc94af commit b3347d4
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 1 deletion.
37 changes: 36 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,41 @@ jobs:
-
name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
build-razorpay-image2:
runs-on: ubuntu-latest
steps:
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
name: Checkout Codebase
uses: actions/checkout@v3
-
name: Login to Harbor
uses: docker/login-action@v2
with:
registry: harbor.razorpay.com
username: ${{ secrets.HARBOR_DOCKER_USERNAME }}
password: ${{ secrets.HARBOR_DOCKER_PASSWORD }}
-
name: Build and push
id: docker_build
uses: docker/build-push-action@v1
with:
dockerfile: build/docker/prod/Dockerfile.razorpay2
build_args: GIT_COMMIT_HASH=${{ github.sha }}
registry: harbor.razorpay.com
repository: razorpay/datahub
username: ${{ secrets.HARBOR_DOCKER_USERNAME }}
password: ${{ secrets.HARBOR_DOCKER_PASSWORD }}
tags: trino-gateway-${{ github.sha }}
-
name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
build-razorpay-image:
runs-on: [self-hosted]
steps:
Expand All @@ -59,7 +94,7 @@ jobs:
id: docker_build
uses: docker/build-push-action@v1
with:
dockerfile: build/docker/prod/Dockerfile
dockerfile: build/docker/prod/Dockerfile.razorpay
build_args: GIT_COMMIT_HASH=${{ github.sha }}
registry: c.rzp.io
repository: razorpay/datahub
Expand Down
22 changes: 22 additions & 0 deletions build/docker/prod/Dockerfile.razorpay2
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM harbor.razorpay.com/razorpay/onggi-multi-arch:rzp-golden-image-base-golang-1.22
# TODO: c.rzp.io/razorpay/rzp-docker-image-inventory-multi-arch:rzp-golden-image-base-golang-1.22

ARG GIT_COMMIT_HASH
ENV GIT_COMMIT_HASH=${GIT_COMMIT_HASH}
ENV TRINO-GATEWAY_APP_GITCOMMITHASH=${GIT_COMMIT_HASH}

WORKDIR /app


RUN apk update \
&& apk add --no-cache bash make protobuf protobuf-dev git gzip curl build-base

COPY ./ /app

RUN go mod download \
&& make setup build
# RUN go mod vendor

COPY ./build/docker/prod/probe.sh /app/probe.sh

ENTRYPOINT /app/build/docker/prod/entrypoint.sh

0 comments on commit b3347d4

Please sign in to comment.