Skip to content
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

release: render manifests using deployer #84

Merged
merged 2 commits into from
Feb 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
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
11 changes: 7 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,18 @@ jobs:
run: |
_out/e2e.test -ginkgo.focus='\[PositiveFlow\]'

- name: render manifests
run: |
make release-manifests-k8s

- name: fix build artifacts
run: |
mv _out/deployer deployer-${{ env.RELEASE_VERSION }}-linux-amd64
make clean outdir
mv deployer-${{ env.RELEASE_VERSION}}-linux-amd64 _out/
cp _out/deployer _out/deployer-${{ env.RELEASE_VERSION }}-linux-amd64
cp _out/deployer-manifests-allinone.yaml _out/deployer-manifests-allinone-${{ env.RELEASE_VERSION }}.yaml

- name: compute signature
run: |
pushd _out && sha256sum * >> ../SHA256SUMS && mv ../SHA256SUMS . && popd
hack/make-checksum.sh ${{ env.RELEASE_VERSION }}

- name: upload build artifacts
uses: actions/upload-artifact@v2
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ deployer: outdir update-version
outdir:
@mkdir -p _out || :

.PHONY: release-manifests
release-manifests-k8s: deployer
@_out/deployer -P kubernetes render > _out/deployer-manifests-allinone.yaml

.PHONY: test-unit
test-unit:
go test ./pkg/...
Expand Down
21 changes: 21 additions & 0 deletions hack/make-checksum.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

set -eu

VERSION="${1}"
FILES="
deployer-${VERSION}-linux-amd64
deployer-manifests-allinone-${VERSION}.yaml
"

for artifact in $FILES; do
if [ ! -f "_out/${artifact}" ]; then
echo "MISSING: ${artifact}" >&2
exit 1
fi
done

pushd _out
:> SHA256SUMS
sha256sum ${FILES} >> SHA256SUMS
popd