4 Commits

Author SHA1 Message Date
benvin 4dcb3ac71a Merge pull request 'fix: escape shell variables in release pipeline' (#7) from benvin/fix-release-vars into main
ci/woodpecker/tag/release Pipeline was successful
Reviewed-on: #7
2026-06-23 00:42:40 +10:00
unkinben eeb4a60639 fix: escape shell variables in release pipeline
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
Woodpecker interpolates ${VERSION} as a CI variable (empty) before the
shell sees it. Use $$ escaping so the shell assignment and references
survive YAML interpolation.
2026-06-23 00:39:21 +10:00
benvin 41ef83ba34 Merge pull request 'fix: use python3 zipfile instead of zip binary' (#6) from benvin/fix-zip-packaging into main
ci/woodpecker/tag/release Pipeline failed
Reviewed-on: #6
2026-06-23 00:35:50 +10:00
unkinben 3d5154a12a fix: use python3 zipfile instead of zip binary for packaging
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
The almalinux9-gobuilder image doesn't have the zip binary and dnf
install is unreliable in CI. python3 is always available.
2026-06-23 00:31:53 +10:00
2 changed files with 4 additions and 5 deletions
+3 -4
View File
@@ -5,16 +5,15 @@ steps:
- name: package
image: git.unkin.net/unkin/almalinux9-gobuilder:20260606
commands:
- apt-get update && apt-get install -y zip
- make package VERSION=${CI_COMMIT_TAG}
- name: upload
image: git.unkin.net/unkin/almalinux9-base:20260606
commands:
- |
VERSION=$(echo ${CI_COMMIT_TAG} | sed 's/^v//')
FILE="terraform-provider-artifactapi_${VERSION}_linux_amd64.zip"
VERSION=$$(echo ${CI_COMMIT_TAG} | sed 's/^v//')
FILE="terraform-provider-artifactapi_$${VERSION}_linux_amd64.zip"
curl -f -X PUT \
"https://artifactapi3.k8s.syd1.au.unkin.net/api/v2/remotes/terraform-unkin/files/unkin/artifactapi/$${FILE}" \
"https://artifactapi3.k8s.syd1.au.unkin.net/api/v2/remotes/terraform-unkin/files/unkin/artifactapi/$${FILE}" \
-H "Content-Type: application/zip" \
--data-binary @"$${FILE}"
+1 -1
View File
@@ -33,7 +33,7 @@ fmt: check-go
package: build
cp $(BINARY) $(BINARY)_v$(INSTALL_VERSION)
zip $(ZIP) $(BINARY)_v$(INSTALL_VERSION)
python3 -c "import zipfile,sys; z=zipfile.ZipFile(sys.argv[1],'w',zipfile.ZIP_DEFLATED); z.write(sys.argv[2]); z.close()" $(ZIP) $(BINARY)_v$(INSTALL_VERSION)
rm $(BINARY)_v$(INSTALL_VERSION)
clean: