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-05-31 13:50:03 +00:00
|
|
|
image: hrfee/jfa-go-build-docker:latest
|
2021-05-24 17:37:26 +00:00
|
|
|
volumes:
|
|
|
|
- name: ssh_key
|
|
|
|
path: /id_rsa
|
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
|
2023-06-23 13:41:21 +00:00
|
|
|
JFA_GO_BUILT_BY:
|
|
|
|
from_secret: BUILT_BY
|
2020-10-08 20:06:36 +00:00
|
|
|
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 ../
|
2021-03-07 15:23:44 +00:00
|
|
|
- pip3 install requests
|
2021-05-24 17:37:26 +00:00
|
|
|
- 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"'
|
2023-06-23 13:43:19 +00:00
|
|
|
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'
|
2021-05-24 17:37:26 +00:00
|
|
|
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-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
|
|
|
|
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 15:01:33 +00:00
|
|
|
key:
|
|
|
|
from_secret: ssh2_key
|
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-05-31 13:50:03 +00:00
|
|
|
image: hrfee/jfa-go-build-docker:latest
|
2021-05-24 17:37:26 +00:00
|
|
|
volumes:
|
|
|
|
- name: ssh_key
|
|
|
|
path: /id_rsa
|
2021-11-15 00:17:39 +00:00
|
|
|
- name: ssh_key2
|
|
|
|
path: /id_rsa2
|
2020-09-29 22:28:14 +00:00
|
|
|
commands:
|
2021-03-07 15:23:44 +00:00
|
|
|
- curl -sL https://git.io/goreleaser > goreleaser
|
|
|
|
- chmod +x goreleaser
|
2023-06-23 12:00:46 +00:00
|
|
|
- ./scripts/version.sh ./goreleaser --snapshot --skip-publish --clean
|
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-11-15 00:17:39 +00:00
|
|
|
- bash -c 'sftp -i /id_rsa2 -o StrictHostKeyChecking=no root@161.97.102.153:/mnt/redoc <<< $"put docs/swagger.json jfa-go.json"'
|
2021-05-24 17:37:26 +00:00
|
|
|
- bash -c 'sftp -P 2022 -i /id_rsa -o StrictHostKeyChecking=no root@161.97.102.153:/repo/incoming <<< $"put dist/*.deb"'
|
2021-05-31 13:03:21 +00:00
|
|
|
# - 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"'
|
2021-05-24 17:37:26 +00:00
|
|
|
- bash -c 'ssh -i /id_rsa root@161.97.102.153 -p 2022 "repo-process-deb trusty"'
|
2023-06-23 13:43:19 +00:00
|
|
|
bash -c 'ssh -i /id_rsa root@161.97.102.153 -p 2022 "rm /repo/incoming/*.deb"'
|
2021-05-24 19:30:31 +00:00
|
|
|
- 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
|
2023-06-23 13:43:19 +00:00
|
|
|
JFA_GO_BUILT_BY:
|
|
|
|
from_secret: BUILT_BY
|
2023-06-26 22:48:16 +00:00
|
|
|
JFA_GO_SNAPSHOT: y
|
2021-02-11 16:11:07 +00:00
|
|
|
|
2021-05-24 17:37:26 +00:00
|
|
|
volumes:
|
|
|
|
- name: ssh_key
|
|
|
|
host:
|
|
|
|
path: /root/.ssh/id_rsa_packaging
|
2021-11-15 00:17:39 +00:00
|
|
|
- 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
|
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
|
2023-12-20 20:06:44 +00:00
|
|
|
environment:
|
|
|
|
BUILDRONE_KEY:
|
|
|
|
from_secret: BUILDRONE_KEY
|
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
|
2023-12-20 20:06:44 +00:00
|
|
|
envs:
|
|
|
|
- buildrone_key
|
2023-12-26 15:01:33 +00:00
|
|
|
key:
|
|
|
|
from_secret: ssh2_key
|
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
|
2023-12-20 20:06:44 +00:00
|
|
|
- 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
|
|
|
|
|
|
|
|
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-07-16 15:50:31 +00:00
|
|
|
image: hrfee/jfa-go-build-docker:latest
|
2021-01-08 23:52:36 +00:00
|
|
|
commands:
|
2021-03-07 15:23:44 +00:00
|
|
|
- curl -sL https://git.io/goreleaser > goreleaser
|
|
|
|
- chmod +x goreleaser
|
2023-06-23 12:00:46 +00:00
|
|
|
- ./scripts/version.sh ./goreleaser --snapshot --skip-publish --clean
|
2021-01-08 23:52:36 +00:00
|
|
|
|
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
include:
|
|
|
|
- pull_request
|