test/.drone.yml
admin 220e41e167
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone Build is failing
更新 .drone.yml
2025-03-28 10:33:38 +00:00

52 lines
1.0 KiB
YAML

kind: pipeline
type: docker
name: pipeline-1
clone:
disable: true
steps:
- name: git-incremental-sync
image: alpine/git:latest
volumes:
- name: git-repo-cache
path: /cache
commands:
- mkdir -p /cache/my-repo
- cd /cache/my-repo
- |
if [ -d .git ]; then
git remote set-url origin ${DRONE_REPO_URL}
git fetch origin --depth=1 ${DRONE_COMMIT_BRANCH}
git reset --hard ${DRONE_COMMIT_SHA}
else
git clone ${DRONE_REPO_URL} . --depth=1 --branch=${DRONE_COMMIT_BRANCH}
fi
- cp -r /cache/my-repo ${DRONE_WORKSPACE}
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