2020-10-08 20:06:36 +00:00
|
|
|
---
|
|
|
|
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
|
2020-10-08 20:06:36 +00:00
|
|
|
environment:
|
2021-03-07 15:54:32 +00:00
|
|
|
BUILDRONE_KEY:
|
|
|
|
from_secret: BUILDRONE_KEY
|
2020-10-08 20:06:36 +00:00
|
|
|
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
|
2020-10-08 20:06:36 +00:00
|
|
|
- (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 ../
|
2021-03-07 15:23:44 +00:00
|
|
|
- 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-11 16:24:32 +00:00
|
|
|
---
|
2021-02-13 21:59:33 +00:00
|
|
|
name: docker-buildx
|
2021-02-11 16:24:32 +00:00
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
2020-10-08 20:06:36 +00:00
|
|
|
|
2021-02-11 16:24:32 +00:00
|
|
|
steps:
|
2021-02-13 21:59:33 +00:00
|
|
|
- name: build-deploy
|
2021-02-11 16:24:32 +00:00
|
|
|
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
|
2021-02-12 13:38:34 +00:00
|
|
|
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
|
2021-03-07 15:23:44 +00:00
|
|
|
- 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
|
2021-02-11 21:18:32 +00:00
|
|
|
---
|
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
|
2021-03-07 15:23:44 +00:00
|
|
|
- curl -sL https://git.io/goreleaser > goreleaser
|
|
|
|
- chmod +x goreleaser
|
|
|
|
- ./scripts/version.sh ./goreleaser --snapshot --skip-publish --rm-dist
|
2020-10-08 20:06:36 +00:00
|
|
|
- wget https://builds.hrfee.pw/upload.py
|
2020-10-08 20:48:15 +00:00
|
|
|
- pip3 install requests
|
2021-03-07 15:23:44 +00:00
|
|
|
- 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
|
2021-02-11 21:18:32 +00:00
|
|
|
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
|
2021-02-11 21:18:32 +00:00
|
|
|
settings:
|
2021-02-11 23:52:05 +00:00
|
|
|
host:
|
2021-02-13 14:05:04 +00:00
|
|
|
from_secret: ssh2_host
|
2021-02-11 23:52:05 +00:00
|
|
|
username:
|
2021-02-13 14:05:04 +00:00
|
|
|
from_secret: ssh2_username
|
2021-02-11 23:52:05 +00:00
|
|
|
port:
|
2021-02-13 14:05:04 +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
|
2021-02-12 13:38:34 +00:00
|
|
|
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
|
2021-03-07 15:23:44 +00:00
|
|
|
- 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
|
2021-02-11 21:18:32 +00:00
|
|
|
---
|
2021-01-08 23:52:36 +00:00
|
|
|
name: jfa-go-pr
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: build
|
2021-02-17 11:19:51 +00:00
|
|
|
image: golang:latest
|
2021-01-08 23:52:36 +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
|
2021-01-08 23:52:36 +00:00
|
|
|
- (curl -sL https://deb.nodesource.com/setup_14.x | bash -)
|
2021-04-03 20:38:26 +00:00
|
|
|
- apt-get install nodejs
|
2021-03-07 15:23:44 +00:00
|
|
|
- curl -sL https://git.io/goreleaser > goreleaser
|
|
|
|
- chmod +x goreleaser
|
|
|
|
- ./scripts/version.sh ./goreleaser --snapshot --skip-publish --rm-dist
|
2021-01-08 23:52:36 +00:00
|
|
|
|
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
include:
|
|
|
|
- pull_request
|