6 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
benvin ec9f7d410f Merge pull request 'feat: add zip packaging target and woodpecker release pipeline' (#5) from benvin/makefile-ci-upload into main
ci/woodpecker/tag/release Pipeline failed
Reviewed-on: #5
2026-06-23 00:21:30 +10:00
unkinben 03b3344d8f feat: add zip packaging target and woodpecker release pipeline
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
2026-06-23 00:18:06 +10:00
2 changed files with 6 additions and 8 deletions
+5 -7
View File
@@ -3,19 +3,17 @@ when:
steps: steps:
- name: package - name: package
image: golang:1.25 image: git.unkin.net/unkin/almalinux9-gobuilder:20260606
commands: commands:
- apt-get update && apt-get install -y zip
- make package VERSION=${CI_COMMIT_TAG} - make package VERSION=${CI_COMMIT_TAG}
- name: upload - name: upload
image: curlimages/curl:latest image: git.unkin.net/unkin/almalinux9-base:20260606
secrets: [artifactapi_url, artifactapi_repo]
commands: commands:
- | - |
VERSION=$(echo ${CI_COMMIT_TAG} | sed 's/^v//') VERSION=$$(echo ${CI_COMMIT_TAG} | sed 's/^v//')
FILE="terraform-provider-artifactapi_${VERSION}_linux_amd64.zip" FILE="terraform-provider-artifactapi_$${VERSION}_linux_amd64.zip"
curl -f -X PUT \ curl -f -X PUT \
"$${ARTIFACTAPI_URL}/api/v2/remotes/$${ARTIFACTAPI_REPO}/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" \ -H "Content-Type: application/zip" \
--data-binary @"$${FILE}" --data-binary @"$${FILE}"
+1 -1
View File
@@ -33,7 +33,7 @@ fmt: check-go
package: build package: build
cp $(BINARY) $(BINARY)_v$(INSTALL_VERSION) 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) rm $(BINARY)_v$(INSTALL_VERSION)
clean: clean: