This commit is contained in:
parent
96858083b7
commit
5baaaa4cba
21
.drone.yml
21
.drone.yml
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user