This repository has been archived on 2024-03-03. You can view files and clone it, but cannot push or open issues or pull requests.
adlin/.drone.yml
2021-10-31 20:36:23 +01:00

79 lines
1.7 KiB
YAML

---
kind: pipeline
type: docker
name: build-arm64
platform:
os: linux
arch: arm64
steps:
- name: compile binaries
image: golang:alpine
commands:
- apk --no-cache add build-base
- go vet -v ./checker
- go vet -v ./token-validator
- cd ./pkg/minichecker/cmd && go vet -v . && cd -
- cd ./pkg/login-app/cmd && go build -v . && cd -
- mkdir dist
- go build -v -o dist/checker ./checker
- go build -v -o dist/token-validator ./token-validator
- cd ./pkg/minichecker/cmd && go build -v -o ../../../dist/minichecker . && cd -
- cd ./pkg/login-app/cmd && go build -v -o ../../../dist/login-app . && cd -
trigger:
event:
- push
---
kind: pipeline
type: docker
name: build-arm
platform:
os: linux
arch: arm
steps:
- name: compile binaries
image: golang:alpine
commands:
- apk --no-cache add build-base
- go vet -v ./checker
- go vet -v ./token-validator
- cd ./pkg/minichecker/cmd && go vet -v . && cd -
- cd ./pkg/login-app/cmd && go build -v . && cd -
- mkdir dist
- go build -v -o dist/checker ./checker
- go build -v -o dist/token-validator ./token-validator
- cd ./pkg/minichecker/cmd && go build -v -o ../../../dist/minichecker . && cd -
- cd ./pkg/login-app/cmd && go build -v -o ../../../dist/login-app . && cd -
environment:
CGO_ENABLED: 0
GOARM: 5
- name: deploy binaries
image: appleboy/drone-scp
settings:
tar_tmp_path: /tmp/
host: adlin.nemunai.re
target: /var/lib/lxc/adlin/rootfs/home/newbuilds
source: dist/*
strip_components: 1
username:
from_secret: ssh_username
key:
from_secret: deploy_key
port:
from_secret: ssh_port
when:
branch:
- master
event:
- push
trigger:
event:
- push