Browse Source

Merge pull request 'master' (#1) from master into test

Reviewed-on: #1
test
千目管理员 2 years ago
parent
commit
d4d5a4630c
  1. 20
      .drone.yml

20
.drone.yml

@ -29,23 +29,19 @@ steps:
pull: if-not-exists pull: if-not-exists
volumes: volumes:
- name: gitea - name: gitea
path: /gitea
path: /root/.ssh/id_rsa
commands: commands:
- echo 192.168.0.2 git.1000my.com >> /etc/hosts - echo 192.168.0.2 git.1000my.com >> /etc/hosts
- ping git.1000my.com -c 1 - ping git.1000my.com -c 1
- mkdir -p $HOME/.ssh/
- cat /gitea > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
- ssh-keyscan git.1000my.com > ~/.ssh/known_hosts
- git clone --depth=1 $DRONE_GIT_SSH_URL .
- git clone --depth=1 $DRONE_GIT_HTTP_URL .
- git submodule update --init --recursive - git submodule update --init --recursive
- git -c advice.detachedHead=false checkout $DRONE_COMMIT
- git status
- pwd
- ls -la
- name: 生成Release版本 - name: 生成Release版本
pull: if-not-exists pull: if-not-exists
image: registry.cn-hangzhou.aliyuncs.com/tgabc-namespace/tgabc:semantic-release-v21.0.1 image: registry.cn-hangzhou.aliyuncs.com/tgabc-namespace/tgabc:semantic-release-v21.0.1
volumes:
- name: gitea
path: /root/.ssh/id_rsa
environment: environment:
GITEA_TOKEN: GITEA_TOKEN:
from_secret: gitea_token from_secret: gitea_token
@ -54,10 +50,16 @@ steps:
from_secret: gitea_username from_secret: gitea_username
git_password: git_password:
from_secret: gitea_password from_secret: gitea_password
commands:
- echo 192.168.0.2 git.1000my.com >> /etc/hosts
- semantic-release
- name: 获取tag数据 - name: 获取tag数据
image: registry.cn-hangzhou.aliyuncs.com/qmiot/init:alpine-git-v2.36.2 image: registry.cn-hangzhou.aliyuncs.com/qmiot/init:alpine-git-v2.36.2
commands: commands:
- ping git.1000my.com -c 1
- echo 192.168.0.2 git.1000my.com >> /etc/hosts
- ping git.1000my.com -c 1
- git fetch --tags - git fetch --tags
- git submodule init - git submodule init
- git submodule update --recursive --remote - git submodule update --recursive --remote

Loading…
Cancel
Save