Skip to content

Commit

Permalink
add extra cache tag to latest images and use that tag to get cache la…
Browse files Browse the repository at this point in the history
…yers (#550)
  • Loading branch information
RoiGlinik authored Sep 21, 2022
1 parent 14d5ab6 commit be04c06
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ jobs:
fixed-
- name: Build with skaffold
run: ./skaffold build --profile arm --file-output=container-ids.json --tag='${{env.RELEASE_VER}}'
run: ./skaffold build --profile release --file-output=container-ids.json --tag='${{env.RELEASE_VER}}'


- name: Save artifact with tags of built containers
uses: actions/upload-artifact@v2
Expand Down
10 changes: 10 additions & 0 deletions build_release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export DOCKER_BUILDKIT=1

docker buildx build \
--platform linux/arm64,linux/amd64 \
--cache-from us-central1-docker.pkg.dev/genuine-flight-317411/devel/robusta-runner:cache \
--tag $IMAGE \
--tag us-central1-docker.pkg.dev/genuine-flight-317411/devel/robusta-runner:cache \
--build-arg BUILDKIT_INLINE_CACHE=1 \
--push \
$BUILD_CONTEXT
9 changes: 8 additions & 1 deletion skaffold.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,11 @@ profiles:
- image: us-central1-docker.pkg.dev/genuine-flight-317411/devel/robusta-runner
context: .
docker:
dockerfile: Dockerfile
dockerfile: Dockerfile
- name: release
build:
artifacts:
- image: us-central1-docker.pkg.dev/genuine-flight-317411/devel/robusta-runner
context: .
custom:
buildCommand: ./build_release.sh

0 comments on commit be04c06

Please sign in to comment.