Skip to content

Commit

Permalink
chore: support for releases and further docker optimizations
Browse files Browse the repository at this point in the history
Signed-off-by: Justin Marquis <[email protected]>
  • Loading branch information
34fathombelow committed Apr 3, 2022
1 parent 35baacd commit 5921b1c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 18 deletions.
19 changes: 3 additions & 16 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,10 @@ jobs:

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ steps.get-sha.outputs.sha }}
config-inline: |
[worker.oci]
gc = false
- name: Print Disk Usage
run: |
Expand Down Expand Up @@ -84,8 +82,6 @@ jobs:
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.controller-meta.outputs.tags }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache

- name: Build and push (plugin-image)
uses: docker/build-push-action@v2
Expand All @@ -95,16 +91,7 @@ jobs:
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.plugin-meta.outputs.tags }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new

# Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache

release-artifacts:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ RUN touch ui/dist/node_modules.marker && \

ARG TARGETOS
ARG TARGETARCH
ARG MAKE_TARGET="controller plugin plugin-linux plugin-darwin plugin-windows"
ARG MAKE_TARGET="controller plugin"
RUN GOOS=$TARGETOS GOARCH=$TARGETARCH make ${MAKE_TARGET}

####################################################################################################
Expand Down
3 changes: 2 additions & 1 deletion hack/build-release-plugins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ SRCROOT="$( CDPATH='' cd -- "$(dirname "$0")/.." && pwd -P )"
mkdir -p ${SRCROOT}/dist

rollout_iid_file=$(mktemp -d "${SRCROOT}/dist/rollout_iid.XXXXXXXXX")
docker build --iidfile ${rollout_iid_file} --target argo-rollouts-build .
DOCKER_BUILDKIT=1 docker build --iidfile ${rollout_iid_file} --build-arg MAKE_TARGET="plugin-linux plugin-darwin plugin-windows" \
--target argo-rollouts-build .
rollout_iid=$(cat ${rollout_iid_file})
container_id=$(docker create ${rollout_iid})

Expand Down

0 comments on commit 5921b1c

Please sign in to comment.