我想知道是否可以在drone.io的帮助下自动构建我们的小项目。到目前为止,它是有希望的,但这一简单的步骤我似乎无法实现。
我的设置是启用webhooks的gogs,并通过drone webinterface启用repo。Drone正在2个docker实例中运行。
docker-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
- DEPLOY_KEY=@/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,因为我不能让它在docker容器中工作。用于签名的命令:
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你知道签名出了什么问题吗?
发布于 2017-04-13 13:51:58
谢谢你布拉德。
它确实与行尾有关。我使用的是windows/linux组合环境,所以我想这就是问题所在。现在我使用了一个我以前用过的很棒的工具,叫做dos2unix。
在我可以成功签名并将签名推送到存储库之后,它会转换为unix格式。
https://stackoverflow.com/questions/43372968
复制相似问题