drone 也是在站内看到的,觉得 jenkins 太丑了,想换个新的试试。 ## docker-compose.yml services: drone: image: drone/drone:2 container_name: drone restart: always ports: - "443:443" volumes: - ./data:/data - ./ssl:/etc/ssl:ro # 将 SSL 证书文件挂载到容器中 - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro environment: - DRONE_USER_CREATE=username:admin,admin:true - DRONE_GITEA_SERVER=https://XXXXXX - DRONE_GITEA_CLIENT_ID=XXXXXX - DRONE_GITEA_CLIENT_SECRET=XXXXX - DRONE_RPC_SECRET=970106f1f4bb07fa1ab0589a6df09b51 - DRONE_SERVER_HOST=drone.XXXXXX.cn - DRONE_TLS_CERT=/etc/ssl/your_certificate.pem # 指向证书文件路径 - DRONE_TLS_KEY=/etc/ssl/your_private_key.key # 指向私钥文件路径 - DRONE_SERVER_PROTO=https - DRONE_LOGS_DEBUG=true
runner: image: drone/drone-runner-docker:latest container_name: drone-runner-445 restart: always volumes: - /var/run/docker.sock:/var/run/docker.sock - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro environment: - DRONE_RPC_PROTO=https - DRONE_RPC_HOST=drone.XXXXXX.cn - DRONE_RPC_SECRET=970106f1f4bb07fa1ab0589a6df09b51 - DRONE_RUNNER_CAPACITY=4 - DRONE_RUNNER_NAME=drone-runner-445 - DRONE_RUNNER_LABELS=type:docker - DRONE_LOGS_DEBUG=true - DRONE_RPC_INSECURE=true
## drone.yml kind: pipeline type: docker name: default
steps: - name: hello image: alpine pull: if-not-exists commands: - echo "Starting build..." - pwd - ls -la - echo "Hello World" - echo "Build completed"
trigger: branch: - main event: - push - pull_request - tag - schedule - custom ## 故障 可以触发新的 build,但是一直卡住,把对应的包加载到服务器了,但是一直 Step is pending ,卡住了 ubuntu@VM-4-13-ubuntu:~$ sudo docker image ls REPOSITORY TAG IMAGE ID CREATED SIZE alpine latest b0c9d60fc5e3 12 days ago 7.83MB drone/drone 2 649ae58d4a6a 2 months ago 59.2MB drone/drone-runner-docker latest e2de942d714a 15 months ago 26MB drone/drone-runner-docker 1 42f73cc80149 2 years ago 25.7MB drone/git latest b263385b74bd 2 years ago 198MB drone/drone-runner-ssh latest 59c90b8fb99d 2 years ago 19.5MB |
|