-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
59 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,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 |
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,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"] |