Skip to content

Commit

Permalink
Push new tag of docker image when releasing nebula version (#1163)
Browse files Browse the repository at this point in the history
* Fix docker image build context directory

* Update readme about docker images

* Continue on error for testing in multithreads

* Push docker tag when release new version

* hAdd job steps timout minutes settings

* Add github action badge image alternative text
  • Loading branch information
yixinglu authored and dutor committed Nov 4, 2019
1 parent b210127 commit 4f22a81
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 11 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build.yaml
Expand Up @@ -35,6 +35,8 @@ jobs:
cd _build && make -j $(nproc)
shell: bash
- name: test in multithreads
continue-on-error: true
timeout-minutes: 20
env:
NEBULA_DEP_BIN: /opt/nebula/third-party/bin
LIBRARY_PATH: /usr/lib/x86_64-linux-gnu:/lib/x86_64-linux-gnu:${LIBRARY_PATH}
Expand All @@ -44,6 +46,7 @@ jobs:
shell: bash
- name: test in singlethread
if: failure()
timeout-minutes: 40
env:
NEBULA_DEP_BIN: /opt/nebula/third-party/bin
LIBRARY_PATH: /usr/lib/x86_64-linux-gnu:/lib/x86_64-linux-gnu:${LIBRARY_PATH}
Expand Down
15 changes: 14 additions & 1 deletion .github/workflows/docker.yaml
Expand Up @@ -3,6 +3,9 @@ name: docker
on:
schedule:
- cron: '0 18 * * *'
release:
types:
- published

jobs:
docker:
Expand All @@ -24,10 +27,20 @@ jobs:
- uses: actions/checkout@v1
with:
fetch-depth: 1
- name: build
- name: build nightly image
if: github.event_name == 'schedule'
env:
IMAGE_NAME: ${{ secrets.DOCKER_USERNAME }}/nebula-${{ matrix.service }}:nightly
run: |
docker build -t ${IMAGE_NAME} -f docker/Dockerfile.${{ matrix.service }} .
docker push ${IMAGE_NAME}
shell: bash
- name: build release image
if: github.event_name == 'release'
env:
IMAGE_NAME: ${{ secrets.DOCKER_USERNAME }}/nebula-${{ matrix.service }}
run: |
TAG=$(git describe --exact-match --abbrev=0 --tags)
docker build -t ${IMAGE_NAME}:${TAG} -f docker/Dockerfile.${{ matrix.service }} .
docker push ${IMAGE_NAME}:${TAG}
shell: bash
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -3,13 +3,13 @@
<br> English | <a href="README-CN.md">中文</a>
<br>A distributed, scalable, lighting-fast graph database<br>
<a href="https://github.com/vesoft-inc/nebula/actions?workflow=build">
<img src="https://github.com/vesoft-inc/nebula/workflows/build/badge.svg" />
<img src="https://github.com/vesoft-inc/nebula/workflows/build/badge.svg" alt="build and test workflow"/>
</a>
<a href="https://github.com/vesoft-inc/nebula/actions?workflow=docker">
<img src="https://github.com/vesoft-inc/nebula/workflows/docker/badge.svg" />
<img src="https://github.com/vesoft-inc/nebula/workflows/docker/badge.svg" alt="build docker image workflow"/>
</a>
<a href="https://github.com/vesoft-inc/nebula/actions?workflow=package">
<img src="https://github.com/vesoft-inc/nebula/workflows/package/badge.svg" />
<img src="https://github.com/vesoft-inc/nebula/workflows/package/badge.svg" alt="make nebula packages workflow"/>
</a>
<br>
</p>
Expand Down
12 changes: 6 additions & 6 deletions docker/README.md
@@ -1,10 +1,10 @@
# Dockerfiles for Nebula Graph Services

**NOTE**: The `Dockerfile.graph` is used to build docker image only for **testing** in local machine since all of nebula services are installed in same image. This is not recommended practice for docker usage.
> **NOTE**: The `Dockerfile.graph` is used to build docker image only for **testing** in local machine since all of nebula services are installed in same image. This is not recommended practice for docker usage.
Following Dockerfiles will be ready in production.
Following docker images will be ready in production.

- `Dockerfile.graphd`: nebula-graphd service
- `Dockerfile.metad`: nebula-metad service
- `Dockerfile.storaged`: nebula-storaged service
- `Dockerfile.console`: nebula console client
- [vesoft/nebula-graphd](https://hub.docker.com/r/vesoft/nebula-graphd): nebula-graphd service built with `Dockerfile.graphd`
- [vesoft/nebula-metad](https://hub.docker.com/r/vesoft/nebula-metad): nebula-metad service built with `Dockerfile.metad`
- [vesoft/nebula-storaged](https://hub.docker.com/r/vesoft/nebula-storaged): nebula-storaged service built with `Dockerfile.storaged`
- [vesoft/nebula-console](https://hub.docker.com/r/vesoft/nebula-console): nebula console client built with `Dockerfile.console`
2 changes: 1 addition & 1 deletion docker/build-images.sh
Expand Up @@ -8,5 +8,5 @@
PROJECT_DIR="$(cd "$(dirname "$0")" && pwd)"/../

for suffix in graphd metad storaged console; do
docker build -t vesoft/nebula-$suffix:latest -f $PROJECT_DIR/docker/Dockerfile.$suffix .
docker build -t vesoft/nebula-$suffix:latest -f $PROJECT_DIR/docker/Dockerfile.$suffix $PROJECT_DIR
done

0 comments on commit 4f22a81

Please sign in to comment.