我使用gitlab-ce和无人机:0.8,但无人机的版本不起作用。 "构建列表为空"将显示 我还把.drone.yml放在gitlab-ce存储库下。
gitlab-ce' docker-compose.yml
version: '2'
services:
proxy:
image: jwilder/nginx-proxy
container_name: proxy
ports:
- "80:80"
- "443:443"
- "8000:8000"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- ./certs:/etc/nginx/certs:ro
- /etc/nginx/vhost.d
- /usr/share/nginx/html
restart: always
gitlab:
image: gitlab/gitlab-ce:latest
container_name: gitlab
hostname: gitlab-l.com
ports:
- 22:22
expose:
- 80
- 8000
- 9000
volumes:
- ./config:/etc/gitlab
- ./logs:/var/log/gitlab
- ./data:/var/opt/gitlab
- /etc/localtime:/etc/localtime:ro
environment:
VIRTUAL_HOST: gitlab-l.com
GITLAB_OMNIBUS_CONFIG: |
external_url 'http://gitlab-l.com'
user['uid'] = 998
user['gid'] = 998
restart: always
external_links:
- drone-server:drone-server
networks:
default:
external:
name: share_link
无人机的docker-compose.yml
version: '2'
services:
drone-server:
image: drone/drone:0.8
container_name: drone-server
hostname: drone.gitlab-l.com
expose:
- 8000
- 9000
volumes:
- ./drone:/var/lib/drone/
restart: always
environment:
- VIRTUAL_HOST=d.gitlab-l.com
- VIRTUAL_PORT=8000
- DRONE_HOST=http://d.gitlab-l.coml
- DRONE_OPEN=true
- DRONE_ADMIN=root,my gitlab-ce user name
- DRONE_GITLAB=true
- DRONE_GITLAB_CLIENT=************
- DRONE_GITLAB_SECRET=************
- DRONE_GITLAB_URL=http://gitlab-l.com
- DRONE_SECRET=*******
- DRONE_GITLAB_GIT_USERNAME=my gitlab-ce user name
- DRONE_GITLAB_GIT_PASSWORD=my gitlab-ce password
- DRONE_GITLAB_SKIP_VERIFY=true
- DRONE_GITLAB_PRIVATE_MODE=false
- GIN_MODE=release
external_links:
- gitlab:gitlab-l.com
drone-agent:
image: drone/agent:0.8
container_name: drone-agent
command: agent
restart: always
expose:
- 9000
depends_on:
- drone-server
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
- DRONE_HOST=http://d.gitlab-l
- DRONE_SERVER=drone-server:9000
- DRONE_SECRET=*******
networks:
default:
external:
name: share_link
.drone.yml
pipeline:
build:
image: phpunit/phpunit
commands:
- php -v
我不知道是什么原因。 请告诉我是否有办法解决它。
答案 0 :(得分:0)
可能Gitlab / Github无法访问您的Drone实例。您可以在Github中查看webhook结果。将您的Drone实例公开到互联网并在Drone UI中重新启用repo(这样就会重新创建webhook)。