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

fix docker rc version #4327

Merged
merged 1 commit into from
Jun 15, 2022
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
40 changes: 25 additions & 15 deletions .github/workflows/rc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,7 @@ jobs:
needs: package
name: docker-build
runs-on: [self-hosted, nebula]
strategy:
fail-fast: false
matrix:
service:
- graphd
- metad
- storaged
- tools

steps:
- uses: webiny/[email protected]
with:
Expand All @@ -91,12 +84,21 @@ jobs:
echo ::set-output name=majorver::"v$(echo ${{ github.event.inputs.version }} | cut -f1 -d'.')"
- id: docker
run: |
graphdTag=""
storagedTag=""
metadTag=""
toolsTag=""
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"
graphdTag="${{ secrets.HARBOR_REGISTRY }}/vesoft/nebula-graphd:latest"
storagedTag="${{ secrets.HARBOR_REGISTRY }}/vesoft/nebula-storaged:latest"
metadTag="${{ secrets.HARBOR_REGISTRY }}/vesoft/nebula-metad:latest"
toolsTag="${{ secrets.HARBOR_REGISTRY }}/vesoft/nebula-tools:latest"
fi
echo "::set-output name=tag::$tag"
echo "::set-output name=graphdTag::$graphdTag"
echo "::set-output name=storagedTag::$storagedTag"
echo "::set-output name=metadTag::$metadTag"
echo "::set-output name=toolsTag::$toolsTag"
- uses: docker/setup-qemu-action@v1
- uses: docker/setup-buildx-action@v1
- uses: docker/login-action@v1
Expand All @@ -111,7 +113,9 @@ jobs:
file: ./docker/Dockerfile
platforms: linux/amd64,linux/arm64
tags: |
vesoft/nebula-graphd:nightly
${{ secrets.HARBOR_REGISTRY }}/vesoft/nebula-graphd:${{ steps.tagname.outputs.tag }}
${{ secrets.HARBOR_REGISTRY }}/vesoft/nebula-graphd:${{ steps.tagname.outputs.majorver }}
${{ steps.docker.outputs.graphdTag }}
target: graphd
push: true
build-args: |
Expand All @@ -124,7 +128,9 @@ jobs:
file: ./docker/Dockerfile
platforms: linux/amd64,linux/arm64
tags: |
vesoft/nebula-storaged:nightly
${{ secrets.HARBOR_REGISTRY }}/vesoft/nebula-storaged${{ steps.tagname.outputs.tag }}
${{ secrets.HARBOR_REGISTRY }}/vesoft/nebula-storaged:${{ steps.tagname.outputs.majorver }}
${{ steps.docker.outputs.storagedTag }}
target: storaged
push: true
build-args: |
Expand All @@ -137,7 +143,9 @@ jobs:
file: ./docker/Dockerfile
platforms: linux/amd64,linux/arm64
tags: |
vesoft/nebula-metad:nightly
${{ secrets.HARBOR_REGISTRY }}/vesoft/nebula-metad${{ steps.tagname.outputs.tag }}
${{ secrets.HARBOR_REGISTRY }}/vesoft/nebula-metad:${{ steps.tagname.outputs.majorver }}
${{ steps.docker.outputs.metadTag }}
target: metad
push: true
build-args: |
Expand All @@ -150,7 +158,9 @@ jobs:
file: ./docker/Dockerfile
platforms: linux/amd64,linux/arm64
tags: |
vesoft/nebula-tools:nightly
${{ secrets.HARBOR_REGISTRY }}/vesoft/nebula-tools${{ steps.tagname.outputs.tag }}
${{ secrets.HARBOR_REGISTRY }}/vesoft/nebula-tools:${{ steps.tagname.outputs.majorver }}
${{ steps.docker.outputs.toolsTag }}
target: tools
push: true
build-args: |
Expand Down
1 change: 1 addition & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ COPY . /home/nebula/BUILD

RUN cd /home/nebula/BUILD/package \
&& ./package.sh -v "${VERSION}"

FROM centos:7 as graphd

COPY --from=builder /home/nebula/BUILD/pkg-build/cpack_output/nebula-*-common.rpm /usr/local/nebula/nebula-common.rpm
Expand Down