Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4dcb3ac71a | |||
| eeb4a60639 | |||
| 41ef83ba34 | |||
| 3d5154a12a |
@@ -5,15 +5,14 @@ steps:
|
|||||||
- name: package
|
- name: package
|
||||||
image: git.unkin.net/unkin/almalinux9-gobuilder:20260606
|
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: git.unkin.net/unkin/almalinux9-base:20260606
|
image: git.unkin.net/unkin/almalinux9-base:20260606
|
||||||
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 \
|
||||||
"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" \
|
-H "Content-Type: application/zip" \
|
||||||
|
|||||||
@@ -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:
|
||||||
|
|||||||
Reference in New Issue
Block a user