Skip to content

Makefile buff-ification #3700

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Sep 2, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixup! chore: buff makefile pt. 5 helm stuff
  • Loading branch information
deansheather committed Aug 28, 2022
commit f866e1fa64a865cc96e2d096620f79490ef6d081
27 changes: 13 additions & 14 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,16 +86,13 @@ jobs:
set -euxo pipefail

# build and (maybe) push Docker images for each architecture
images=()
for arch in amd64 armv7 arm64; do
img="$(
./scripts/build_docker.sh \
${{ (!github.event.inputs.dry_run && !github.event.inputs.snapshot) && '--push' || '' }} \
--arch "$arch" \
./build/coder_*_linux_"$arch"
)"
images+=("$img")
done
version="$(./script/version.sh)"
push=""
if [[ "$CODER_RELEASE" == *t* ]]; then
push="push/"
fi
make -j \
"$push"build/coder_"$version"_linux_{amd64,arm64,armv7}.tag

# we can't build multi-arch if the images aren't pushed, so quit now
# if dry-running
Expand All @@ -105,14 +102,13 @@ jobs:
fi

# build and push multi-arch manifest
./scripts/build_docker_multiarch.sh \
--push \
"${images[@]}"
make -j push/build/coder_"$version"_linux.tag

# if the current version is equal to the highest (according to semver)
# version in the repo, also create a multi-arch image as ":latest" and
# push it
if [[ "$(git tag | grep '^v' | grep -vE '(rc|dev|-|\+|\/)' | sort -r --version-sort | head -n1)" == "v$(./scripts/version.sh)" ]]; then
make -j push/build/coder_"$version"_linux.tag
./scripts/build_docker_multiarch.sh \
--push \
--target "$(./scripts/image_tag.sh --version latest)" \
Expand Down Expand Up @@ -252,7 +248,10 @@ jobs:
- name: Publish Helm
run: |
set -euxo pipefail
./scripts/helm.sh --push

version="$(./script/version.sh)"
make -j \
build/coder_helm_"$version".tgz
mv ./build/*.tgz ./artifacts/

- name: Publish Release
Expand Down