mirror of
https://github.com/appleboy/drone-ssh.git
synced 2025-05-09 18:23:21 +08:00
add arm arm64 and amd64 build. (#106)
* add arm arm64 and amd64 build. Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com> * add release folder to ignore list. Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
parent
45f43d7ffd
commit
9dd4b8db8d
18
.drone.yml
18
.drone.yml
@ -18,12 +18,26 @@ pipeline:
|
|||||||
- make lint
|
- make lint
|
||||||
- make test-vendor
|
- make test-vendor
|
||||||
|
|
||||||
build:
|
linux_amd64:
|
||||||
image: appleboy/golang-testing
|
image: appleboy/golang-testing
|
||||||
pull: true
|
pull: true
|
||||||
group: golang
|
group: golang
|
||||||
commands:
|
commands:
|
||||||
- make docker_build
|
- make linux_amd64
|
||||||
|
|
||||||
|
linux_arm64:
|
||||||
|
image: appleboy/golang-testing
|
||||||
|
pull: true
|
||||||
|
group: golang
|
||||||
|
commands:
|
||||||
|
- make linux_arm64
|
||||||
|
|
||||||
|
linux_arm:
|
||||||
|
image: appleboy/golang-testing
|
||||||
|
pull: true
|
||||||
|
group: golang
|
||||||
|
commands:
|
||||||
|
- make linux_arm
|
||||||
|
|
||||||
test:
|
test:
|
||||||
image: appleboy/golang-testing
|
image: appleboy/golang-testing
|
||||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -25,5 +25,6 @@ _testmain.go
|
|||||||
.env
|
.env
|
||||||
|
|
||||||
coverage.txt
|
coverage.txt
|
||||||
|
release
|
||||||
drone-ssh
|
drone-ssh
|
||||||
.cover
|
.cover
|
||||||
|
@ -12,5 +12,5 @@ LABEL org.label-schema.name="drone-ssh"
|
|||||||
LABEL org.label-schema.vendor="Bo-Yi Wu"
|
LABEL org.label-schema.vendor="Bo-Yi Wu"
|
||||||
LABEL org.label-schema.schema-version="1.0"
|
LABEL org.label-schema.schema-version="1.0"
|
||||||
|
|
||||||
ADD drone-ssh /bin/
|
ADD release/linux/amd64/drone-ssh /bin/
|
||||||
ENTRYPOINT ["/bin/drone-ssh"]
|
ENTRYPOINT ["/bin/drone-ssh"]
|
||||||
|
11
Makefile
11
Makefile
@ -112,9 +112,14 @@ release-copy:
|
|||||||
release-check:
|
release-check:
|
||||||
cd $(DIST)/release; $(foreach file,$(wildcard $(DIST)/release/$(EXECUTABLE)-*),sha256sum $(notdir $(file)) > $(notdir $(file)).sha256;)
|
cd $(DIST)/release; $(foreach file,$(wildcard $(DIST)/release/$(EXECUTABLE)-*),sha256sum $(notdir $(file)) > $(notdir $(file)).sha256;)
|
||||||
|
|
||||||
# for docker.
|
linux_amd64:
|
||||||
docker_build:
|
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 $(GO) build -a -tags '$(TAGS)' -ldflags "$(EXTLDFLAGS)-s -w $(LDFLAGS)" -o release/linux/amd64/$(EXECUTABLE)
|
||||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 $(GO) build -a -tags '$(TAGS)' -ldflags "$(EXTLDFLAGS)-s -w $(LDFLAGS)" -o $(DEPLOY_IMAGE)
|
|
||||||
|
linux_arm64:
|
||||||
|
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 $(GO) build -a -tags '$(TAGS)' -ldflags "$(EXTLDFLAGS)-s -w $(LDFLAGS)" -o release/linux/arm64/$(EXECUTABLE)
|
||||||
|
|
||||||
|
linux_arm:
|
||||||
|
CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=7 $(GO) build -a -tags '$(TAGS)' -ldflags "$(EXTLDFLAGS)-s -w $(LDFLAGS)" -o release/arm/amd64/$(EXECUTABLE)
|
||||||
|
|
||||||
docker_image:
|
docker_image:
|
||||||
docker build -t $(DEPLOY_ACCOUNT)/$(DEPLOY_IMAGE) .
|
docker build -t $(DEPLOY_ACCOUNT)/$(DEPLOY_IMAGE) .
|
||||||
|
Loading…
Reference in New Issue
Block a user