--- kind: pipeline type: docker name: wangjun/phptest trigger: ref: - refs/heads/master - refs/heads/dev - refs/heads/uat - refs/tags/v* steps: # 测试环境 - name: phptest-docker image: plugins/docker when: branch: - master settings: dockerfile: cicd/Dockerfile repo: registry.amtcloud.cn/wangjun/phptest tags: - uat-${DRONE_BUILD_NUMBER} registry: registry.amtcloud.cn username: from_secret: user_registry_amtcloud password: from_secret: psw_registry_amtcloud build_args: - TARGET=master # 测试环境部署 - name: phptest-deploy image: nobugtodebug/kustomit:latest when: branch: - master commands: - cd /app && python main.py settings: git_user: from_secret: drone_gitea git_password: from_secret: psw_drone_gitea project_path: ${DRONE_REPO} target_env: test image_name: registry.amtcloud.cn/wangjun/phptest image_tag: uat-${DRONE_BUILD_NUMBER} ref_commit: ${DRONE_COMMIT} ref_author: ${DRONE_COMMIT_AUTHOR} # 挂载的主机卷,可以映射到插件的容器中 volumes: - name: docker-cache host: path: /data_store/docker_root - name: docker-sock host: path: /var/run/docker.sock ...