kind: pipeline type: docker name: quant-ci steps: - name: build-and-push image: docker:20.10 volumes: - name: dockersock path: /var/run/docker.sock environment: DOCKER_HOST: unix:///var/run/docker.sock commands: - docker build -t registry.memorion.cn/quant/strategy:${DRONE_COMMIT_SHA} . - docker push registry.memorion.cn/quant/strategy:${DRONE_COMMIT_SHA} - name: backtest image: python:3.11 commands: - echo "哈哈哈,我成功了" volumes: - name: dockersock host: path: /var/run/docker.sock trigger: branch: - master # 指定 master 分支触发