更新 .drone.yml
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
admin 2025-03-28 10:32:12 +00:00
parent 96858083b7
commit 5baaaa4cba

View File

@ -5,11 +5,26 @@ name: pipeline-1
steps:
- name: build
- name: git-incremental-sync
image: swr.cn-north-4.myhuaweicloud.com/ddn-k8s/gcr.io/iguazio/alpine:3.17
volumes:
- name: git-repo-cache
path: /cache
commands:
- cd $DRONE_WORKSPACE
- ls /drone/src/
- 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