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

173 lines
5.2 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
JFA_GO_BUILT_BY:
from_secret: BUILT_BY
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"'
bash -c 'ssh -i /id_rsa root@161.97.102.153 -p 2022 "rm /repo/incoming/*.deb"'
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
2023-12-26 18:58:03 +00:00
environment:
BUILDRONE_KEY:
from_secret: BUILDRONE_KEY
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
2023-12-26 18:46:30 +00:00
envs:
- buildrone_key
key:
from_secret: ssh2_key
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
2023-12-26 18:58:03 +00:00
- bash -c 'cd /mnt/buildx/jfa-go/jfa-go && python3 upload.py https://builds.hrfee.pw hrfee jfa-go --tag docker-stable=true'
2021-03-07 16:27:15 +00:00
- 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
---
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 'ssh -i /id_rsa root@161.97.102.153 -p 2022 "rm /repo/incoming/*.deb"'
- 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
JFA_GO_BUILT_BY:
from_secret: BUILT_BY
JFA_GO_SNAPSHOT: y
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
environment:
BUILDRONE_KEY:
from_secret: BUILDRONE_KEY
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
envs:
- buildrone_key
key:
from_secret: ssh2_key
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
- bash -c 'cd /mnt/buildx/jfa-go/jfa-go && python3 upload.py https://builds.hrfee.pw hrfee jfa-go --tag docker-unstable=true'
2021-03-07 16:27:15 +00:00
- 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
---
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