From a8784d2dc567a5bf8996b842c3f2ed08d1f1c34d Mon Sep 17 00:00:00 2001 From: Eric <132873174+eric-epsilla@users.noreply.github.com> Date: Thu, 30 May 2024 11:16:01 +0800 Subject: [PATCH] Update and rename build-debug.yml to build-canary.yml --- .github/workflows/build-canary.yml | 106 +++++++++++++++++++++++++++++ .github/workflows/build-debug.yml | 70 ------------------- 2 files changed, 106 insertions(+), 70 deletions(-) create mode 100644 .github/workflows/build-canary.yml delete mode 100644 .github/workflows/build-debug.yml diff --git a/.github/workflows/build-canary.yml b/.github/workflows/build-canary.yml new file mode 100644 index 0000000..1fbc8b5 --- /dev/null +++ b/.github/workflows/build-canary.yml @@ -0,0 +1,106 @@ +name: Build Canary Vectordb Docker Image + +on: + push: + branches: [ "main" ] + +jobs: + build: + + name: Build All-in-One Canary Vectordb Docker Image + runs-on: ubuntu-latest + + steps: + - name: Check out code + uses: actions/checkout@v3 + + - name: Log in to Docker Hub + uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Get Current Date + id: date + run: echo "::set-output name=date::$(date +'%Y%m%d%H%M%S')" + + - name: Setup Dependency + run: | + ## buildx + wget --quiet https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-amd64 + chmod +x buildx-v0.11.2.linux-amd64 + ls -lh buildx-v0.11.2.linux-amd64 + mkdir -p $HOME/.docker/cli-plugins + mv buildx-v0.11.2.linux-amd64 $HOME/.docker/cli-plugins/docker-buildx + docker buildx create --use + docker buildx ls + + ## embed + cd engine; + git clone https://eric-epsilla:${{ secrets.ACCESS_TOKEN }}@github.com/epsilla-cloud/epsilla-embed.git + rm -rf epsilla-embed/.git* epsilla-embed/.cache + + + + - name: Build lite + env: + DOCKER_HUB_REPOSITORY: epsilla/vectordb + SHA_TAG: ${{ github.sha }} + run: | + export IMAGE_TAG=${{ steps.date.outputs.date }}; + echo "IMAGE_TAG: ${IMAGE_TAG}"; + export IMAGE_TAG_LATEST="latest"; + + echo "SHA: ${SHA_TAG}"; + export RELEASE_TAG=`cat VERSION`; + echo "RELEASE_TAG: ${RELEASE_TAG}"; + + + echo "========Build epsilladb lite docker image ========" + cd engine; + docker buildx build --build-arg="RELEASE_VERSION=v${RELEASE_TAG}-${IMAGE_TAG}" \ + --platform linux/amd64 \ + --label "org.opencontainers.image.description"="Official Epsilla Vector Database Image" \ + --label "org.opencontainers.image.documentation"="https://epsilla-inc.gitbook.io/epsilladb" \ + --label "org.opencontainers.image.source"="https://github.com/epsilla-cloud/vectordb" \ + --label "org.opencontainers.image.title"="Epsilla Vector Database" \ + --label "org.opencontainers.image.url"="https://epsilla.com" \ + --label "org.opencontainers.image.vendor"="Epsilla" \ + --label "org.opencontainers.image.version"=${RELEASE_TAG} \ + --pull \ + --push \ + -t ${DOCKER_HUB_REPOSITORY}:canary-lite . + + + + # - name: Build allinone + # env: + # DOCKER_HUB_REPOSITORY: epsilla/vectordb + # SHA_TAG: ${{ github.sha }} + # run: | + # export IMAGE_TAG=${{ steps.date.outputs.date }}; + # echo "IMAGE_TAG: ${IMAGE_TAG}"; + # export IMAGE_TAG_LATEST="latest"; + # echo "SHA: ${SHA_TAG}"; + + # export RELEASE_TAG=`cat VERSION`; + # echo "RELEASE_TAG: ${RELEASE_TAG}"; + + + # echo "========Build allinone docker image both for amd64 and arm64========" + # cd engine; + # docker buildx build --build-arg="RELEASE_VERSION=v${RELEASE_TAG}-${IMAGE_TAG}" \ + # --platform linux/amd64,linux/arm64 \ + # --label "org.opencontainers.image.description"="Official Epsilla Vector Database Image" \ + # --label "org.opencontainers.image.documentation"="https://epsilla-inc.gitbook.io/epsilladb" \ + # --label "org.opencontainers.image.source"="https://github.com/epsilla-cloud/vectordb" \ + # --label "org.opencontainers.image.title"="Epsilla Vector Database" \ + # --label "org.opencontainers.image.url"="https://epsilla.com" \ + # --label "org.opencontainers.image.vendor"="Epsilla" \ + # --label "org.opencontainers.image.version"=${RELEASE_TAG} \ + # --pull \ + # --push \ + # -f Dockerfile.embed \ + # -t ${DOCKER_HUB_REPOSITORY}:canary . + + diff --git a/.github/workflows/build-debug.yml b/.github/workflows/build-debug.yml deleted file mode 100644 index 8d1ef30..0000000 --- a/.github/workflows/build-debug.yml +++ /dev/null @@ -1,70 +0,0 @@ -name: Build Vectordb for debug - -on: - push: - branches: [ "debug", "debug-*" ] - -jobs: - build: - - name: Build Vectordb for debug - runs-on: ubuntu-latest - - steps: - - name: Check out code - uses: actions/checkout@v3 - - - name: Log in to Docker Hub - uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Get Current Date - id: date - run: echo "::set-output name=date::$(date +'%Y%m%d%H%M%S')" - - - name: Build - env: - DOCKER_HUB_REPOSITORY: epsilla/vectordb - IMAGE_TAG: debug - SHA_TAG: ${{ github.sha }} - run: | - export IMAGE_DATE=${{ steps.date.outputs.date }} - echo "IMAGE_DATE: ${IMAGE_DATE}" - echo "SHA: ${SHA_TAG}" - export RELEASE_TAG=`cat VERSION`; - echo "RELEASE_TAG: ${RELEASE_TAG}"; - - wget https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-amd64 - chmod +x buildx-v0.11.2.linux-amd64 - mkdir -p $HOME/.docker/cli-plugins - mv buildx-v0.11.2.linux-amd64 $HOME/.docker/cli-plugins/docker-buildx - docker buildx create --use - - - - cd ./engine - - docker buildx build --build-arg="RELEASE_VERSION=v${RELEASE_TAG}-${IMAGE_DATE}" \ - --platform linux/amd64 \ - --label "org.opencontainers.image.description"="Official Epsilla Vector Database Image" \ - --label "org.opencontainers.image.documentation"="https://epsilla-inc.gitbook.io/epsilladb" \ - --label "org.opencontainers.image.source"="https://github.com/epsilla-cloud/vectordb" \ - --label "org.opencontainers.image.title"="Epsilla Vector Database" \ - --label "org.opencontainers.image.url"="https://www.epsilla.com" \ - --label "org.opencontainers.image.vendor"="Epsilla" \ - --label "org.opencontainers.image.version"=${RELEASE_TAG} \ - --pull \ - --push \ - -t ${DOCKER_HUB_REPOSITORY}:${IMAGE_TAG} . - - - - - - - - - -