-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'keep' of github.com:heroicNeZha/nebula into keep
- Loading branch information
Showing
391 changed files
with
6,085 additions
and
4,006 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
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
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,109 @@ | ||
name: rc | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'v[0-9]+.*' | ||
|
||
concurrency: | ||
group: rc | ||
cancel-in-progress: true | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
package: | ||
name: build package | ||
runs-on: [self-hosted, nebula] | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- ubuntu1604 | ||
- ubuntu1804 | ||
- ubuntu2004 | ||
- centos7 | ||
- centos8 | ||
container: | ||
image: vesoft/nebula-dev:${{ matrix.os }} | ||
env: | ||
BUILD_DIR: ./pkg-build | ||
CPACK_DIR: ./pkg-build/cpack_output | ||
SYMS_DIR: ./pkg-build/symbols | ||
steps: | ||
- uses: webiny/[email protected] | ||
with: | ||
run: sh -c "find . -mindepth 1 -delete" | ||
- uses: actions/checkout@v2 | ||
- uses: ./.github/actions/tagname-action | ||
id: tag | ||
- name: package | ||
run: ./package/package.sh -b ${{ steps.tag.outputs.tag }} -t RelWithDebInfo -r OFF -p ON -s TRUE | ||
- name: output some vars | ||
run: | | ||
tar zcf ${{ env.CPACK_DIR }}/nebula-${{ 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 | ||
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 | ||
|
||
docker_build: | ||
name: docker-build | ||
runs-on: [self-hosted, nebula] | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
service: | ||
- graphd | ||
- metad | ||
- storaged | ||
- tools | ||
steps: | ||
- uses: webiny/[email protected] | ||
with: | ||
run: sh -c "find . -mindepth 1 -delete" | ||
- uses: actions/checkout@v2 | ||
- uses: ./.github/actions/tagname-action | ||
id: tagname | ||
- id: docker | ||
run: | | ||
majorver=$(git tag -l --sort=v:refname | tail -n1 | cut -f1 -d'.') | ||
tag="" | ||
if [[ $majorver == ${{ steps.tagname.outputs.majorver }} ]]; then | ||
tag="${{ secrets.HARBOR_REGISTRY }}/vesoft/nebula-${{ matrix.service }}:latest" | ||
fi | ||
echo "::set-output name=tag::$tag" | ||
- uses: docker/setup-qemu-action@v1 | ||
- uses: docker/setup-buildx-action@v1 | ||
- uses: docker/login-action@v1 | ||
with: | ||
registry: ${{ secrets.HARBOR_REGISTRY }} | ||
username: ${{ secrets.HARBOR_USERNAME }} | ||
password: ${{ secrets.HARBOR_PASSWORD }} | ||
- uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
file: ./docker/Dockerfile.${{ matrix.service }} | ||
platforms: linux/amd64,linux/arm64 | ||
tags: | | ||
${{ secrets.HARBOR_REGISTRY }}/vesoft/nebula-${{ matrix.service }}:${{ steps.tagname.outputs.tag }} | ||
${{ secrets.HARBOR_REGISTRY }}/vesoft/nebula-${{ matrix.service }}:${{ steps.tagname.outputs.majorver }} | ||
${{ steps.docker.outputs.tag }} | ||
push: true | ||
build-args: | | ||
BRANCH=${{ steps.tagname.outputs.tag }} |
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 |
---|---|---|
|
@@ -15,54 +15,21 @@ defaults: | |
|
||
jobs: | ||
package: | ||
name: build package | ||
runs-on: [self-hosted, nebula] | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- ubuntu1604 | ||
- ubuntu1804 | ||
- ubuntu2004 | ||
- centos7 | ||
- centos8 | ||
name: package | ||
runs-on: ubuntu-latest | ||
container: | ||
image: vesoft/nebula-dev:${{ matrix.os }} | ||
env: | ||
BUILD_DIR: ./pkg-build | ||
CPACK_DIR: ./pkg-build/cpack_output | ||
SYMS_DIR: ./pkg-build/symbols | ||
image: vesoft/nebula-dev:centos7 | ||
steps: | ||
- uses: webiny/[email protected] | ||
with: | ||
run: sh -c "find . -mindepth 1 -delete" | ||
- uses: actions/checkout@v2 | ||
- name: Check License Header | ||
uses: apache/skywalking-eyes@main | ||
- uses: ./.github/actions/tagname-action | ||
id: tag | ||
- name: package | ||
run: ./package/package.sh -b ${{ steps.tag.outputs.tag }} -t RelWithDebInfo -r OFF -p ON -s TRUE | ||
- name: output some vars | ||
run: | | ||
tar zcf ${{ env.CPACK_DIR }}/nebula-${{ 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: package/${{ steps.tag.outputs.tagnum }} | ||
- 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.SYMS_DIR }} | ||
target-path: package/${{ steps.tag.outputs.tagnum }}/symbols | ||
- 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/${{ steps.tag.outputs.tagnum }} | ||
docker_build: | ||
name: docker-build | ||
|
@@ -80,33 +47,24 @@ jobs: | |
with: | ||
run: sh -c "find . -mindepth 1 -delete" | ||
- uses: actions/checkout@v2 | ||
- name: Check License Header | ||
uses: apache/skywalking-eyes@main | ||
- uses: ./.github/actions/tagname-action | ||
id: tagname | ||
- id: docker | ||
run: | | ||
majorver=$(git tag -l --sort=v:refname | tail -n1 | cut -f1 -d'.') | ||
tag="" | ||
if [[ $majorver == ${{ steps.tagname.outputs.majorver }} ]]; then | ||
tag="vesoft/nebula-${{ matrix.service }}:latest" | ||
tag="latest" | ||
fi | ||
echo "::set-output name=tag::$tag" | ||
- uses: docker/setup-qemu-action@v1 | ||
- uses: docker/setup-buildx-action@v1 | ||
- uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
- uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
file: ./docker/Dockerfile.${{ matrix.service }} | ||
platforms: linux/amd64,linux/arm64 | ||
tags: | | ||
vesoft/nebula-${{ matrix.service }}:${{ steps.tagname.outputs.tag }} | ||
vesoft/nebula-${{ matrix.service }}:${{ steps.tagname.outputs.majorver }} | ||
${{ steps.docker.outputs.tag }} | ||
push: true | ||
build-args: | | ||
BRANCH=${{ steps.tagname.outputs.tag }} | ||
- name: Sync docker images | ||
env: | ||
FROM_IMAGE: docker://${{ secrets.HARBOR_REGISTRY }}/vesoft/nebula-${{ matrix.service }} | ||
TO_IMAGE: docker://docker.io/vesoft/nebula-${{ matrix.service }} | ||
CMD: docker run --rm -ti quay.io/containers/skopeo:v1.4.1 copy -a --src-creds ${{ secrets.HARBOR_USERNAME }}:${{ secrets.HARBOR_PASSWORD }} --dest-creds ${{ secrets.DOCKER_USERNAME }}:${{ secrets.DOCKER_PASSWORD }} | ||
run: | | ||
${{ env.CMD }} ${{ env.FROM_IMAGE }}:${{ steps.tagname.outputs.tag }} ${{ env.TO_IMAGE }}:${{ steps.tagname.outputs.tag }} | ||
${{ env.CMD }} ${{ env.FROM_IMAGE }}:${{ steps.tagname.outputs.tag }} ${{ env.TO_IMAGE }}:${{ steps.tagname.outputs.majorver }} | ||
if [[ ! -z "${{ steps.docker.outputs.tag }}" ]]; then | ||
${{ env.CMD }} ${{ env.FROM_IMAGE }}:${{ steps.tagname.outputs.tag }} ${{ env.TO_IMAGE }}:${{ steps.docker.outputs.tag }} | ||
fi |
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.