CI and Dockerfile updated
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
e15708fb6b
commit
40fcff34b6
32
.drone.yml
32
.drone.yml
@ -1,12 +1,34 @@
|
|||||||
kind: pipeline
|
kind: pipeline
|
||||||
name: build-ffmap-ubnt-api
|
type: docker
|
||||||
|
name: build go
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build go
|
- name: build linux/amd64
|
||||||
image: golang
|
image: golang
|
||||||
commands:
|
commands:
|
||||||
- go build .
|
- go build -ldflags "-X main.version=${DRONE_TAG}" -o release/linux/amd64/ubnt-freifunk-map-api .
|
||||||
|
- tar -cvzf release/ubnt-freifunk-map-api_linux_amd64.tar.gz -C release/linux/amd64 ubnt-freifunk-map-api
|
||||||
|
environment:
|
||||||
|
GOARCH: amd64
|
||||||
|
GOOS: linux
|
||||||
|
|
||||||
|
- name: build linux/arm64
|
||||||
|
image: golang
|
||||||
|
commands:
|
||||||
|
- go build -ldflags "-X main.version=${DRONE_TAG}" -o release/linux/arm64/ubnt-freifunk-map-api .
|
||||||
|
- tar -cvzf release/ubnt-freifunk-map-api_linux_arm64.tar.gz -C release/linux/arm64 ubnt-freifunk-map-api
|
||||||
|
environment:
|
||||||
|
GOARCH: arm64
|
||||||
|
GOOS: linux
|
||||||
|
|
||||||
|
- name: build windows
|
||||||
|
image: golang
|
||||||
|
commands:
|
||||||
|
- go build -ldflags "-X main.version=${DRONE_TAG}" -o release/windows/amd64/ubnt-freifunk-map-api .
|
||||||
|
- tar -cvzf release/ubnt-freifunk-map-api_windows_amd64.tar.gz -C release/windows/amd64 ubnt-freifunk-map-api
|
||||||
|
environment:
|
||||||
|
GOARCH: amd64
|
||||||
|
GOOS: windows
|
||||||
|
|
||||||
- name: docker
|
- name: docker
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
@ -26,7 +48,7 @@ steps:
|
|||||||
from_secret: gitea_api_key
|
from_secret: gitea_api_key
|
||||||
base_url: https://git.freifunk-rhein-sieg.net
|
base_url: https://git.freifunk-rhein-sieg.net
|
||||||
files:
|
files:
|
||||||
- ubnt-freifunk-map-api
|
- release/*.tar.gz
|
||||||
title: ${DRONE_TAG}
|
title: ${DRONE_TAG}
|
||||||
checksum:
|
checksum:
|
||||||
- md5
|
- md5
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
FROM alpine:latest
|
FROM alpine:latest
|
||||||
WORKDIR /opt/
|
WORKDIR /opt/
|
||||||
|
|
||||||
ADD ./ubnt-freifunk-map-api /opt/ubnt-freifunk-map-api
|
ADD ./release/linux/arm64/ubnt-freifunk-map-api /opt/ubnt-freifunk-map-api
|
||||||
ADD ./devices.json /opt/devices.json
|
ADD ./devices.json /opt/devices.json
|
||||||
RUN chmod +x /opt/ubnt-freifunk-map-api
|
RUN chmod +x /opt/ubnt-freifunk-map-api
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user