Skip to content

Commit

Permalink
test ci
Browse files Browse the repository at this point in the history
  • Loading branch information
yhilmare committed Jul 24, 2024
1 parent ae228e8 commit ea685c3
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/build_artifact.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
###
# This workflow is used for quickly building artifacts
# Triggers:
# 1. Manual trigger
# Jobs:
# 1. Calculate Version Number
# 2. Build Web Artifact
# 3. Build Client Artifact
###

name: Build Artifact
run-name: Build Artifact triggered by ${{ github.actor }} 🛠️

env:
ODC_CURRENT_BRANCH: ${{ github.ref_name }}

jobs:
build-web-x86_64:
name: Build Web Artifact (x86_64)
runs-on: ubuntu-latest
steps:
- name: Build docker image (x86_64)
run: |
pushd docker
docker build -t docker.io/oceanbase/compute:0.0.1 -f Dockerfile .
docker save -o resources/obcloud-compute.tar.gz docker.io/oceanbase/compute:0.0.1
popd
- name: Upload docker image (x86_64)
uses: actions/upload-artifact@v4
with:
name: obcloud-compute.tar.gz
path: docker/resources/obcloud-compute.tar.gz
27 changes: 27 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# The Dockerfile is built for OB Cloud AP
FROM python:3.8

LABEL maintainer="ODC <[email protected]>"
LABEL description="OB Cloud compute module"

ARG AIRFLOW_INSTALL_DIR=/opt/airflow
ARG DBT_CORE_VERSION=1.8.3
ARG DBT_OCEANBASE_ADAPTER_BRANCH=dev/1.0.x

ENV LC_ALL=en_US.UTF-8
ENV LANG=en_US.utf-8

RUN pip install dbt-core==${DBT_CORE_VERSION} \
&& pip install 'apache-airflow==2.9.2' --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.9.2/constraints-3.8.txt"
&& git clone https://github.com/oceanbase/dbt-oceanbase.git --branch ${DBT_OCEANBASE_ADAPTER_BRANCH}
&& pushd dbt-oceanbase
&& pip install .
&& popd
&& rm -rf dbt-oceanbase

RUN mkdir -p ${AIRFLOW_INSTALL_DIR}
WORKDIR ${AIRFLOW_INSTALL_DIR}

EXPOSE 8989

ENTRYPOINT ["airflow"]

0 comments on commit ea685c3

Please sign in to comment.