drone.io를 사용하여 작은 프로젝트를 자동화 할 수 있는지 파악하려고합니다. 지금까지 그것은 유망했지만,이 간단한 단계는 내가 잘 풀 수없는 것처럼 보입니다.drone.io가 sig 파일을 .drone.yml과 일치시키지 못함
내 설정은 webhooks가 활성화 된 gogs이며 무인 항공기 웹 인터페이스를 통해 활성화되었습니다. Drone은 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
i는 i가 고정 표시기 컨테이너 내에서이 작업을 얻을 수 있기 때문에 별도로 CLI를 설치했다. 서명 할 명령 :
drone -s http://<drone interface>:8000 -t <token copied from webinterface> sign <repo> --in ".drone.yml" --out ".drone.yml.sig"
그런 다음 두 파일을 모두 저장하고 repo로 푸시합니다. 다음 오류는 무인 항공기 디버그에서 계속 발생합니다.
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
어떤 문제가 발생 했습니까?
.drone.yml.sig 파일을 푸시 한 다음 yaml을 변경하여 서명을 무효화하거나 2) 기본 crlf 설정이 다른 이유로 Windows에서 문제 서명이보고 된 경우 서명을 확인할 수 없습니다. 리눅스. 이 내용은 https://github.com/drone/drone/issues/1662에서 설명하며 https://help.github.com/articles/dealing-with-line-endings/ –