diff --git a/.drone.yml b/.drone.yml index 80dc9a1..e25463a 100644 --- a/.drone.yml +++ b/.drone.yml @@ -6,7 +6,7 @@ host_aliases: hostnames: - git.1000my.com clone: - pull: if-not-exists + disable: true trigger: branch: @@ -18,9 +18,32 @@ volumes: - name: dockersock host: path: /data/drone/docker/sock - + - name: host-time + host: + path: /etc/localtime + steps: + - name: "Checkout" + image: registry.cn-hangzhou.aliyuncs.com/qmiot/init:alpine-git-v2.36.2 + pull: if-not-exists + environment: + SSHKEY: + from_secret: drone_ci_sshkey_file + GIT_HOST: 192.168.0.2 + GIT_PORT: 22 + commands: + - ls -la + - mkdir -p $HOME/.ssh/ + - echo $SSHKEY > $HOME/.ssh/id_rsa && chmod 600 $HOME/.ssh/id_rsa + - ssh-keyscan -p $GIT_PORT $GIT_HOST > $HOME/.ssh/known_hosts 2> /dev/null + - git clone --depth=1 $DRONE_GIT_SSH_URL . + - git submodule update --init --recursive + - git -c advice.detachedHead=false checkout $DRONE_COMMIT + - git status + - pwd + - ls -la + - name: 生成Release版本 pull: if-not-exists image: registry.cn-hangzhou.aliyuncs.com/tgabc-namespace/tgabc:semantic-release-v21.0.1 @@ -59,7 +82,7 @@ steps: when: branch: - master - + # - name: 上传zip到iot正式接口platformProgramAdd # pull: if-not-exists