我想知道是否可以在drone.io的幫助下自動創建我們的小型項目。到目前爲止,它一直很有希望,但是這個簡單的步驟我似乎無法解決。drone.io無法將sig文件與.drone.yml相匹配
我的設置是啓用了webhooks的gogs,並通過無人機web界面啓用了回購。無人機在2個碼頭實例中運行。
泊塢窗,compose.yml:
version: '2'
services:
drone-server:
image: drone/drone:0.5
ports:
- 8000:8000
volumes:
- /opt/docker/drone:/var/lib/drone
- /path/to/ssh:/key
environment:
- DRONE_OPEN=true
- DRONE_GOGS=true
- DRONE_GOGS_URL=http://gogs.xx.xx
- DRONE_GOGS_GIT_USERNAME=user
- DRONE_GOGS_GIT_PASSWORD=password
- DRONE_SECRET=key
- [email protected]/key/id_rsa
- DRONE_DEBUG=true
drone-agent:
image: drone/drone:0.5
command: agent
restart: unless-stopped
depends_on: [ drone-server ]
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
- DRONE_SERVER=ws://drone-server:8000/ws/broker
- DRONE_SECRET=key
我必須單獨安裝CLI,因爲我不能在泊塢窗容器中得到這個工作。要簽字的命令:
drone -s http://<drone interface>:8000 -t <token copied from webinterface> sign <repo> --in ".drone.yml" --out ".drone.yml.sig"
然後我繼續提交併將兩個文件都推送到回購站。在無人機調試中出現以下錯誤:
drone-server_1 | time="2017-04-12T10:04:09Z" level=debug msg="cannot verify .drone.yml.sig file. no match"
drone-server_1 | time="2017-04-12T10:04:09Z" level=info ip=172.19.0.1 latency=374.072732ms method=POST path="/hook" status=200 time="2017-04-12T10:04:09Z" user-agent=GogsServer
任何想法在簽名時出了什麼問題?
如果1)您推送.drone.yml.sig文件,然後更改您的yaml,從而使簽名無效或2)在Windows上報告了問題簽名,因爲默認的crlf設置不同於Linux操作系統。這在這裏描述https://github.com/drone/drone/issues/1662,可以改變https://help.github.com/articles/dealing-with-line-endings/ –