1
0
mirror of https://github.com/hrfee/jfa-go.git synced 2024-11-15 23:00:10 +00:00
jfa-go/.drone.yml

158 lines
4.5 KiB
YAML
Raw Normal View History

---
name: jfa-go
kind: pipeline
type: docker
steps:
- name: fetch
image: docker:git
commands:
- git fetch --tags
- name: release
2021-02-17 11:19:51 +00:00
image: golang:latest
environment:
BUILDRONE_KEY:
from_secret: BUILDRONE_KEY
GITHUB_TOKEN:
from_secret: github_token
commands:
2021-04-03 20:38:26 +00:00
- apt-get update -y
- apt-get install build-essential python3-pip curl software-properties-common sed upx -y
- (curl -sL https://deb.nodesource.com/setup_14.x | bash -)
2021-04-03 20:38:26 +00:00
- apt-get install nodejs
2021-03-20 23:20:07 +00:00
- curl -sL https://git.io/goreleaser > ../goreleaser
- chmod +x ../goreleaser
- ./scripts/version.sh ../goreleaser
2021-03-20 23:16:54 +00:00
- wget https://builds.hrfee.pw/upload.py -P ../
- pip3 install requests
2021-03-20 23:16:54 +00:00
- bash -c 'python3 ../upload.py https://builds.hrfee.pw hrfee jfa-go --tag internal=true'
2021-02-11 22:25:00 +00:00
trigger:
2021-02-17 16:34:04 +00:00
event:
- tag
---
2021-02-13 21:59:33 +00:00
name: docker-buildx
kind: pipeline
type: docker
steps:
2021-02-13 21:59:33 +00:00
- name: build-deploy
image: appleboy/drone-ssh
volumes:
- name: ssh_key
path: /root/drone_rsa
settings:
host:
2021-02-13 21:59:33 +00:00
from_secret: ssh2_host
2021-02-11 23:52:05 +00:00
username:
2021-02-13 21:59:33 +00:00
from_secret: ssh2_username
2021-02-11 23:52:05 +00:00
port:
2021-02-13 21:59:33 +00:00
from_secret: ssh2_port
2021-02-11 23:52:05 +00:00
volumes:
- /root/.ssh/docker-build:/root/drone_rsa
key_path: /root/drone_rsa
command_timeout: 50m
2021-02-11 23:52:05 +00:00
script:
2021-02-13 22:03:35 +00:00
- /mnt/buildx/jfa-go/build.sh stable
2021-03-07 16:27:15 +00:00
- wget https://builds.hrfee.pw/upload.py -O /mnt/buildx/jfa-go/jfa-go/upload.py
- pip3 install requests
2021-03-07 16:27:15 +00:00
- bash -c 'cd /mnt/buildx/jfa-go/jfa-go && BUILDRONE_KEY=$(cat /mnt/buildx/jfa-go/key) python3 upload.py https://builds.hrfee.pw hrfee jfa-go --tag docker-stable=true'
- rm -f /mnt/buildx/jfa-go/jfa-go/upload.py
2021-02-11 22:25:00 +00:00
trigger:
2021-02-17 16:34:04 +00:00
event:
- tag
2021-02-11 23:52:05 +00:00
volumes:
- name: ssh_key
host:
path: /root/.ssh/docker-build
---
2020-09-29 22:28:14 +00:00
name: jfa-go-git
kind: pipeline
type: docker
steps:
- name: build
2021-02-17 11:19:51 +00:00
image: golang:latest
2020-09-29 22:28:14 +00:00
commands:
2021-04-03 20:38:26 +00:00
- apt-get update -y
- apt-get install build-essential python3-pip curl software-properties-common sed upx -y
2020-09-29 22:28:14 +00:00
- (curl -sL https://deb.nodesource.com/setup_14.x | bash -)
2021-04-03 20:38:26 +00:00
- apt-get install nodejs
- curl -sL https://git.io/goreleaser > goreleaser
- chmod +x goreleaser
- ./scripts/version.sh ./goreleaser --snapshot --skip-publish --rm-dist
- wget https://builds.hrfee.pw/upload.py
- pip3 install requests
- bash -c 'python3 upload.py https://builds.hrfee.pw hrfee jfa-go --upload ./dist/*.tar.gz --tag internal-git=true'
2020-10-08 20:10:31 +00:00
environment:
BUILDRONE_KEY:
from_secret: BUILDRONE_KEY
2021-02-11 16:11:07 +00:00
trigger:
branch:
- main
- go1.16
event:
exclude:
- pull_request
---
2021-02-13 21:59:33 +00:00
name: docker-buildx-unstable
kind: pipeline
type: docker
steps:
2021-02-13 21:59:33 +00:00
- name: build-deploy
2021-02-11 23:52:05 +00:00
image: appleboy/drone-ssh
volumes:
- name: ssh_key
path: /root/drone_rsa
settings:
2021-02-11 23:52:05 +00:00
host:
from_secret: ssh2_host
2021-02-11 23:52:05 +00:00
username:
from_secret: ssh2_username
2021-02-11 23:52:05 +00:00
port:
from_secret: ssh2_port
2021-02-11 23:52:05 +00:00
volumes:
- /root/.ssh/docker-build:/root/drone_rsa
key_path: /root/drone_rsa
command_timeout: 50m
2021-02-11 23:52:05 +00:00
script:
2021-02-13 21:59:33 +00:00
- /mnt/buildx/jfa-go/build.sh
2021-03-07 16:27:15 +00:00
- wget https://builds.hrfee.pw/upload.py -O /mnt/buildx/jfa-go/jfa-go/upload.py
- pip3 install requests
2021-03-07 16:27:15 +00:00
- bash -c 'cd /mnt/buildx/jfa-go/jfa-go && BUILDRONE_KEY=$(cat /mnt/buildx/jfa-go/key) python3 upload.py https://builds.hrfee.pw hrfee jfa-go --tag docker-unstable=true'
- rm -f /mnt/buildx/jfa-go/jfa-go/upload.py
2021-02-12 00:35:20 +00:00
trigger:
branch:
- main
event:
exclude:
- pull_request
volumes:
- name: ssh_key
host:
path: /root/.ssh/docker-build
---
name: jfa-go-pr
kind: pipeline
type: docker
steps:
- name: build
2021-02-17 11:19:51 +00:00
image: golang:latest
commands:
2021-04-03 20:38:26 +00:00
- apt-get update -y
- apt-get install build-essential python3-pip curl software-properties-common sed upx -y
- (curl -sL https://deb.nodesource.com/setup_14.x | bash -)
2021-04-03 20:38:26 +00:00
- apt-get install nodejs
- curl -sL https://git.io/goreleaser > goreleaser
- chmod +x goreleaser
- ./scripts/version.sh ./goreleaser --snapshot --skip-publish --rm-dist
trigger:
event:
include:
- pull_request