Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change oss to minio #5721

Merged
merged 6 commits into from
Sep 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 18 additions & 17 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ concurrency:
defaults:
run:
shell: bash

env:
OSS_DIR: minio/nightly-build/nebula-graph

jobs:
package:
name: build package
Expand Down Expand Up @@ -50,14 +52,14 @@ jobs:
# with:
# name: ${{ matrix.os }}-nightly
# path: pkg-build/cpack_output
- uses: ./.github/actions/upload-to-oss-action
- uses: vesoft-inc/.github/actions/setup-minio@master
with:
key-id: ${{ secrets.OSS_ID }}
key-secret: ${{ secrets.OSS_SECRET }}
endpoint: ${{ secrets.OSS_ENDPOINT }}
bucket: nebula-graph
asset-path: pkg-build/cpack_output
target-path: package/nightly/${{ steps.vars.outputs.subdir }}
minio_url: ${{ secrets.MINIO_ENDPOINT }}
access_key: ${{ secrets.MINIO_KEY }}
secret_key: ${{ secrets.MINIO_SECRET }}
- name: Copy dir to MinIO
run: mc cp -r pkg-build/cpack_output/ ${{ env.OSS_DIR }}/${{ steps.vars.outputs.subdir }}/


docker:
name: build docker image
Expand Down Expand Up @@ -216,8 +218,7 @@ jobs:
extra_config:
- "ENABLE_SSL=true CA_SIGNED=true QUERY_CONCURRENTLY=false"
- "ENABLE_SSL=false CA_SIGNED=false QUERY_CONCURRENTLY=true"
env:
OSS_DIR: nebula-graph/package/nightly

container:
image: vesoft/nebula-dev:${{ matrix.os }}
services:
Expand Down Expand Up @@ -271,17 +272,17 @@ jobs:
id: cmake
run: |
echo "j=8" >> $GITHUB_OUTPUT
- name: download from oss
- uses: vesoft-inc/.github/actions/setup-minio@master
with:
minio_url: ${{ secrets.MINIO_ENDPOINT }}
access_key: ${{ secrets.MINIO_KEY }}
secret_key: ${{ secrets.MINIO_SECRET }}
- name: Copy dir to MinIO
run: |
ossutil64 -e ${{ secrets.OSS_ENDPOINT }} \
-i ${{ secrets.OSS_ID }} \
-k ${{ secrets.OSS_SECRET }} \
-f cp oss://${{ env.OSS_DIR }}/${{ steps.vars.outputs.subdir }}/${{ steps.oss_package.outputs.p }} \
build/.
mc cp ${{ env.OSS_DIR }}/${{ steps.vars.outputs.subdir }}/${{ steps.oss_package.outputs.p }} build/
tar zxvf build/${{ steps.oss_package.outputs.p }} -C build
d=`echo ${{ steps.oss_package.outputs.p }} | sed 's/.tar.gz//'`
mv build/${d}/* build/.

- name: Setup cluster
run: |
make CONTAINERIZED=true ${{ matrix.extra_config }} up
Expand Down
42 changes: 18 additions & 24 deletions .github/workflows/rc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ defaults:
run:
shell: bash

env:
OSS_DIR: minio/rc-build/nebula-graph

jobs:
package:
name: build package
Expand Down Expand Up @@ -51,22 +54,15 @@ jobs:
run: |
tar zcf ${{ env.CPACK_DIR }}/nebula-graph-${{ steps.tag.outputs.tagnum }}.tar.gz --exclude=${{ env.BUILD_DIR }} ./*
find ${{ env.CPACK_DIR }} -type f \( -iname \*.deb -o -iname \*.rpm -o -iname \*.tar.gz \) -exec bash -c "sha256sum {} > {}.sha256sum.txt" \;
- uses: ./.github/actions/upload-to-oss-action
with:
key-id: ${{ secrets.OSS_ID }}
key-secret: ${{ secrets.OSS_SECRET }}
endpoint: ${{ secrets.OSS_ENDPOINT }}
bucket: nebula-graph
asset-path: ${{ env.CPACK_DIR }}
target-path: rc/${{ steps.tag.outputs.tagnum }}
- uses: ./.github/actions/upload-to-oss-action
- uses: vesoft-inc/.github/actions/setup-minio@master
with:
key-id: ${{ secrets.OSS_ID }}
key-secret: ${{ secrets.OSS_SECRET }}
endpoint: ${{ secrets.OSS_ENDPOINT }}
bucket: nebula-graph
asset-path: ${{ env.SYMS_DIR }}
target-path: rc/${{ steps.tag.outputs.tagnum }}/symbols
minio_url: ${{ secrets.MINIO_ENDPOINT }}
access_key: ${{ secrets.MINIO_KEY }}
secret_key: ${{ secrets.MINIO_SECRET }}
- name: Copy dir to MinIO
run: |
mc cp -r ${{ env.CPACK_DIR }}/ ${{ env.OSS_DIR }}/${{ steps.tag.outputs.tagnum }}/
mc cp -r ${{ env.SYMS_DIR }}/ ${{ env.OSS_DIR }}/${{ steps.tag.outputs.tagnum }}/symbols/

docker_build:
needs: package
Expand Down Expand Up @@ -189,8 +185,6 @@ jobs:
extra_config:
- "ENABLE_SSL=true CA_SIGNED=true QUERY_CONCURRENTLY=false"
- "ENABLE_SSL=false CA_SIGNED=false QUERY_CONCURRENTLY=true"
env:
OSS_DIR: nebula-graph/rc
container:
image: vesoft/nebula-dev:${{ matrix.os }}
steps:
Expand Down Expand Up @@ -226,17 +220,17 @@ jobs:
id: cmake
run: |
echo "j=8" >> $GITHUB_OUTPUT
- name: download from oss
- uses: vesoft-inc/.github/actions/setup-minio@master
with:
minio_url: ${{ secrets.MINIO_ENDPOINT }}
access_key: ${{ secrets.MINIO_KEY }}
secret_key: ${{ secrets.MINIO_SECRET }}
- name: Copy dir from MinIO
run: |
ossutil64 -e ${{ secrets.OSS_ENDPOINT }} \
-i ${{ secrets.OSS_ID }} \
-k ${{ secrets.OSS_SECRET }} \
-f cp oss://${{ env.OSS_DIR }}/${{ steps.tag.outputs.tagnum }}/${{ steps.oss_package.outputs.p }} \
build/.
mc cp ${{ env.OSS_DIR }}/${{ steps.tag.outputs.tagnum }}/${{ steps.oss_package.outputs.p }} build/
tar zxvf build/${{ steps.oss_package.outputs.p }} -C build
d=`echo ${{ steps.oss_package.outputs.p }} | sed 's/.tar.gz//'`
mv build/${d}/* build/.

- name: Setup cluster
run: |
make CONTAINERIZED=true ${{ matrix.extra_config }} up
Expand Down
21 changes: 14 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,20 @@ jobs:
- uses: actions/checkout@v3
- uses: ./.github/actions/tagname-action
id: tag
- run: |
ossutil64 cp -rf \
-i ${{ secrets.OSS_ID }} \
-k ${{ secrets.OSS_SECRET }} \
-e ${{ secrets.OSS_ENDPOINT }} \
oss://nebula-graph/rc/${{ steps.tag.outputs.tagnum }} \
oss://nebula-graph/package/
- uses: vesoft-inc/.github/actions/setup-minio@master
with:
minio_url: ${{ secrets.MINIO_ENDPOINT }}
access_key: ${{ secrets.MINIO_KEY }}
secret_key: ${{ secrets.MINIO_SECRET }}
- name: Copy rc to release on MinIO
run: |
files=$(mc ls minio/rc-build/nebula-graph/${{ steps.tag.outputs.tagnum }}/ | awk '{print $6}' | grep -v '/$')
for file in $files; do
mc cp minio/rc-build/nebula-graph/${{ steps.tag.outputs.tagnum }}/$file \
minio/release-build/nebula-graph/${{ steps.tag.outputs.tagnum }}/
done
mc cp -r minio/rc-build/nebula-graph/${{ steps.tag.outputs.tagnum }}/symbols/ \
minio/release-build/nebula-graph/${{ steps.tag.outputs.tagnum }}/symbols/

docker_build:
name: docker-build
Expand Down