Skip to content

Commit

Permalink
force cache the docker layer (vesoft-inc#977)
Browse files Browse the repository at this point in the history
<!--
Thanks for your contribution!
In order to review PR more efficiently, please add information according to the template.
-->

## What type of PR is this?
- [ ] bug
- [ ] feature
- [ ] enhancement

## What problem(s) does this PR solve?
#### Issue(s) number: 

#### Description:
force cache the docker layer.
the layer is about 20GB, and need another 20min to export the layer.
after then each job would need 5min with the cache layer.




## How do you solve it?



## Special notes for your reviewer, ex. impact of this fix, design document, etc:



## Checklist:
Tests:
- [ ] Unit test(positive and negative cases)
- [ ] Function test
- [ ] Performance test
- [ ] N/A

Affects:
- [ ] Documentation affected (Please add the label if documentation needs to be modified.)
- [ ] Incompatibility (If it breaks the compatibility, please describe it and add the label.)
- [ ] If it's needed to cherry-pick (If cherry-pick to some branches is required, please label the destination version(s).)
- [ ] Performance impacted: Consumes more CPU/Memory


## Release notes:

Please confirm whether to be reflected in release notes and how to describe:
> ex. Fixed the bug .....


Migrated from vesoft-inc#4331

Co-authored-by: Harris.Chu <1726587+HarrisChu@users.noreply.github.com>
  • Loading branch information
nebula-bots and HarrisChu authored Jun 17, 2022
1 parent a1d9d66 commit 35d9839
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ jobs:
tags: |
${{ secrets.HARBOR_REGISTRY }}/vesoft-ent/nebula-graphd:nightly
target: graphd
cache-to: type=local,dest=/tmp/buildx-cache,mode=max
push: true
- uses: docker/build-push-action@v2
with:
Expand All @@ -95,6 +96,7 @@ jobs:
tags: |
${{ secrets.HARBOR_REGISTRY }}/vesoft-ent/nebula-storaged:nightly
target: storaged
cache-from: type=local,src=/tmp/buildx-cache
push: true
- uses: docker/build-push-action@v2
with:
Expand All @@ -104,6 +106,7 @@ jobs:
tags: |
${{ secrets.HARBOR_REGISTRY }}/vesoft-ent/nebula-metad:nightly
target: metad
cache-from: type=local,src=/tmp/buildx-cache
push: true
- uses: docker/build-push-action@v2
with:
Expand All @@ -113,4 +116,8 @@ jobs:
tags: |
${{ secrets.HARBOR_REGISTRY }}/vesoft-ent/nebula-tools:nightly
target: tools
cache-from: type=local,src=/tmp/buildx-cache
push: true
- name: delete the cache
run: |
rm -rf /tmp/buildx-cache
7 changes: 7 additions & 0 deletions .github/workflows/rc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ jobs:
${{ secrets.HARBOR_REGISTRY }}/vesoft-ent/nebula-graphd:${{ steps.tagname.outputs.majorver }}
${{ steps.docker.outputs.graphdTag }}
target: graphd
cache-to: type=local,dest=/tmp/buildx-cache,mode=max
push: true
build-args: |
BRANCH=${{ steps.tagname.outputs.tag }}
Expand All @@ -136,6 +137,7 @@ jobs:
${{ steps.docker.outputs.storagedTag }}
target: storaged
push: true
cache-from: type=local,src=/tmp/buildx-cache
build-args: |
BRANCH=${{ steps.tagname.outputs.tag }}
VERSION=${{ steps.tagname.outputs.tagnum }}
Expand All @@ -152,6 +154,7 @@ jobs:
${{ steps.docker.outputs.metadTag }}
target: metad
push: true
cache-from: type=local,src=/tmp/buildx-cache
build-args: |
BRANCH=${{ steps.tagname.outputs.tag }}
VERSION=${{ steps.tagname.outputs.tagnum }}
Expand All @@ -167,9 +170,13 @@ jobs:
${{ steps.docker.outputs.toolsTag }}
target: tools
push: true
cache-from: type=local,src=/tmp/buildx-cache
build-args: |
BRANCH=${{ steps.tagname.outputs.tag }}
VERSION=${{ steps.tagname.outputs.tagnum }}
- name: delete the cache
run: |
rm -rf /tmp/buildx-cache
docker_build-standalone:
needs: package
Expand Down

0 comments on commit 35d9839

Please sign in to comment.