添加 .drone.yml
All checks were successful
continuous-integration/drone Build is passing

This commit is contained in:
admin 2025-05-09 02:08:49 +00:00
commit be80488070

63
.drone.yml Normal file
View File

@ -0,0 +1,63 @@
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/test.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: 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