Skip to content

Commit

Permalink
fix docker rc version (#4327)
Browse files Browse the repository at this point in the history
  • Loading branch information
HarrisChu authored Jun 15, 2022
1 parent 9d17220 commit f65c5c2
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 15 deletions.
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

0 comments on commit f65c5c2

Please sign in to comment.