@@ -56,10 +56,84 @@ tasks:
56
56
env GOOS=linux GOARCH=arm64 go build -o capsule-http-${TAG}-linux-arm64
57
57
env GOOS=linux GOARCH=amd64 go build -o capsule-http-${TAG}-linux-amd64
58
58
mv capsule-http-${TAG}-* ../release
59
+
60
+ - |
61
+ cd ../relase
62
+ chmod +x capsule-http-*
59
63
60
64
61
65
# replace github.com/bots-garden/capsule-host-sdk => ../../capsule-host-sdk
62
66
# replace github.com/bots-garden/capsule-module-sdk => ../../capsule-module-sdk
63
67
68
+ # Build of capsule-http Docker image
69
+ build-push-docker-image :
70
+ vars :
71
+ IMAGE_BASE_NAME : " capsule-http"
72
+ IMAGE_TAG : " 0.3.6"
73
+ cmds :
74
+ - echo "👋 {{.IMAGE_BASE_NAME}}-{{.GOOS}}-{{.GOARCH}}:{{.IMAGE_TAG}}"
75
+ - |
76
+ cd capsule-http
77
+ docker login -u ${DOCKER_USER} -p ${DOCKER_PWD}
78
+ docker buildx build --platform {{.GOOS}}/{{.GOARCH}} --push -t ${DOCKER_USER}/{{.IMAGE_BASE_NAME}}-{{.GOOS}}-{{.GOARCH}}:{{.IMAGE_TAG}} .
79
+
80
+ build-capsule-http-for-docker :
81
+ cmds :
82
+ - |
83
+ echo "📦 Building capsule-http..."
84
+ cd capsule-http
85
+ CGO_ENABLED=0 GOOS={{.GOOS}} GOARCH={{.GOARCH}} go build -a -installsuffix cgo -o capsule-http .
86
+ ls -lh capsule-http
64
87
88
+ build-docker-capsule-http-image-darwin-arm64 :
89
+ vars :
90
+ GOOS : " darwin"
91
+ GOARCH : " arm64"
92
+ cmds :
93
+ - task : build-capsule-http-for-docker
94
+ vars : { GOOS: '{{.GOOS}}', GOARCH: '{{.GOARCH}}' }
95
+ - task : build-push-docker-image
96
+ vars : {
97
+ GOOS : ' {{.GOOS}}' ,
98
+ GOARCH : ' {{.GOARCH}}'
99
+ }
100
+
101
+ build-docker-capsule-http-image-darwin-amd64 :
102
+ vars :
103
+ GOOS : " darwin"
104
+ GOARCH : " amd64"
105
+ cmds :
106
+ - task : build-capsule-http-for-docker
107
+ vars : { GOOS: '{{.GOOS}}', GOARCH: '{{.GOARCH}}' }
108
+ - task : build-push-docker-image
109
+ vars : {
110
+ GOOS : ' {{.GOOS}}' ,
111
+ GOARCH : ' {{.GOARCH}}'
112
+ }
113
+
114
+ build-docker-capsule-http-image-linux-amd64 :
115
+ vars :
116
+ GOOS : " linux"
117
+ GOARCH : " amd64"
118
+ cmds :
119
+ - task : build-capsule-http-for-docker
120
+ vars : { GOOS: '{{.GOOS}}', GOARCH: '{{.GOARCH}}' }
121
+ - task : build-push-docker-image
122
+ vars : {
123
+ GOOS : ' {{.GOOS}}' ,
124
+ GOARCH : ' {{.GOARCH}}'
125
+ }
126
+
127
+ build-docker-capsule-http-image-linux-arm64 :
128
+ vars :
129
+ GOOS : " linux"
130
+ GOARCH : " arm64"
131
+ cmds :
132
+ - task : build-capsule-http-for-docker
133
+ vars : { GOOS: '{{.GOOS}}', GOARCH: '{{.GOARCH}}' }
134
+ - task : build-push-docker-image
135
+ vars : {
136
+ GOOS : ' {{.GOOS}}' ,
137
+ GOARCH : ' {{.GOARCH}}'
138
+ }
65
139
0 commit comments