1
0
mirror of https://github.com/hrfee/jfa-go.git synced 2024-12-22 17:10:10 +00:00
jfa-go/.drone.yml

172 lines
5.1 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
image: hrfee/jfa-go-build-docker:latest
volumes:
- name: ssh_key
path: /id_rsa
environment:
BUILDRONE_KEY:
from_secret: BUILDRONE_KEY
GITHUB_TOKEN:
from_secret: github_token
commands:
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
- bash -c 'sftp -P 2022 -i /id_rsa -o StrictHostKeyChecking=no root@161.97.102.153:/repo/incoming <<< $"put dist/*.deb"'
- bash -c 'ssh -i /id_rsa root@161.97.102.153 -p 2022 "repo-process-deb trusty"'
2021-03-20 23:16:54 +00:00
- bash -c 'python3 ../upload.py https://builds.hrfee.pw hrfee jfa-go --tag internal=true'
volumes:
- name: ssh_key
host:
path: /root/.ssh/id_rsa_packaging
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
image: hrfee/jfa-go-build-docker:latest
volumes:
- name: ssh_key
path: /id_rsa
- name: ssh_key2
path: /id_rsa2
2020-09-29 22:28:14 +00:00
commands:
- curl -sL https://git.io/goreleaser > goreleaser
- chmod +x goreleaser
- ./scripts/version.sh ./goreleaser --snapshot --skip-publish --clean
- wget https://builds.hrfee.pw/upload.py
- pip3 install requests
- bash -c 'sftp -i /id_rsa2 -o StrictHostKeyChecking=no root@161.97.102.153:/mnt/redoc <<< $"put docs/swagger.json jfa-go.json"'
- bash -c 'sftp -P 2022 -i /id_rsa -o StrictHostKeyChecking=no root@161.97.102.153:/repo/incoming <<< $"put dist/*.deb"'
# - bash -c 'ssh -i /id_rsa root@161.97.102.153 -p 2022 "reprepro -Vb /repo remove trusty-unstable jfa-go"'
# - bash -c 'ssh -i /id_rsa root@161.97.102.153 -p 2022 "reprepro -Vb /repo remove trusty-unstable jfa-go-tray"'
- bash -c 'ssh -i /id_rsa root@161.97.102.153 -p 2022 "repo-process-deb trusty"'
- bash -c 'python3 upload.py https://builds.hrfee.pw hrfee jfa-go --upload ./dist/*.zip ./dist/*.rpm ./dist/*.apk --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
volumes:
- name: ssh_key
host:
path: /root/.ssh/id_rsa_packaging
- name: ssh_key2
host:
path: /root/.ssh/docker-build
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
image: hrfee/jfa-go-build-docker:latest
commands:
- curl -sL https://git.io/goreleaser > goreleaser
- chmod +x goreleaser
- ./scripts/version.sh ./goreleaser --snapshot --skip-publish --clean
trigger:
event:
include:
- pull_request