kind: pipeline type: docker name: pipeline-1 clone: disable: true workspace: path: /drone/src/${DRONE_BUILD_NUMBER} steps: - name: clone image: swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/alpine/git:latest commands: - git clone -b main http://root:rootroot@115.190.73.171:3000/admin/test02.git - ls -la /drone/src/ - ls -la /drone/src/${DRONE_BUILD_NUMBER} - sleep 1m - name: build image: swr.cn-north-4.myhuaweicloud.com/ddn-k8s/gcr.io/iguazio/alpine:3.17 commands: - cd $DRONE_WORKSPACE - pwd - ls -la /drone/src/ - ls -la /drone/src/${DRONE_BUILD_NUMBER} - sleep 1m - name: notify image: swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/alpine/git:latest commands: - echo "success" depends_on: - clone - build # - name: publish # image: swr.cn-north-4.myhuaweicloud.com/ddn-k8s/gcr.io/iguazio/alpine:3.17 # commands: # - cd $DRONE_WORKSPACE # - pwd # - ls -la /drone/src/ # - ls -la /drone/src/${DRONE_BUILD_NUMBER} # depends_on: # - clone # - build node: app: build --- kind: pipeline type: docker name: pipeline-2 depends_on: - pipeline-1 clone: disable: true steps: - name: deploy image: swr.cn-north-4.myhuaweicloud.com/ddn-k8s/gcr.io/iguazio/alpine:3.17 commands: - echo "===== Drone 相关变量 =====" - env | grep DRONE_ - echo "===== 路径变量 =====" - env | grep PATH node: app: mvn