You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

113 lines
3.3 KiB

kind: pipeline
type: docker
name: windows打包exe
host_aliases:
- ip: 192.168.0.2
hostnames:
- git.1000my.com
clone:
disable: true
trigger:
branch:
- master
event:
- push
volumes:
- name: dockersock
host:
path: /data/drone/docker/sock
steps:
- name: "Checkout"
image: registry.cn-hangzhou.aliyuncs.com/qmiot/init:alpine-git-v2.36.2
pull: if-not-exists
commands:
- echo 192.168.0.2 git.1000my.com >> /etc/hosts
- ping git.1000my.com -c 1
- git clone --depth=1 $DRONE_GIT_HTTP_URL .
- git submodule update --init --recursive
- name: 生成Release版本
pull: if-not-exists
image: registry.cn-hangzhou.aliyuncs.com/tgabc-namespace/tgabc:semantic-release-v21.0.1
volumes:
- name: gitea
path: /root/.ssh/id_rsa
environment:
GITEA_TOKEN:
from_secret: gitea_token
settings:
git_login:
from_secret: gitea_username
git_password:
from_secret: gitea_password
commands:
- echo 192.168.0.2 git.1000my.com >> /etc/hosts
- semantic-release
- name: tag
image: registry.cn-hangzhou.aliyuncs.com/qmiot/init:alpine-git-v2.36.2
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 submodule init
- git submodule update --recursive --remote
# - git submodule add -b master https://git.1000my.com/project_runteng/server_iot-common.git
# - git mv server_iot-common iot-common
# - git submodule sync
# 获取当前分支的tag
- git describe --abbrev=0 --tags > .tags
- cat .tags
- name: 编译
pull: if-not-exists
image: registry.cn-hangzhou.aliyuncs.com/qmiot/init:nsis20241212
commands:
- makensis Sources/nbn.nsi
- ls Sources/Setup.exe
- du -sh Sources/Setup.exe
when:
branch:
- master
- name: 对比生成增量包
pull: if-not-exists
image: registry.cn-hangzhou.aliyuncs.com/qmiot/init:nsis20241212
commands:
- the_last_dir
- ls Sources/Setup.exe
- du -sh Sources/Setup.exe
when:
branch:
- master
# - name: 上传zip到iot正式接口platformProgramAdd
# pull: if-not-exists
# image: registry.cn-hangzhou.aliyuncs.com/qmiot/init:apisix-init-base
# environment:
# url_for_iotplatform: 'http://192.168.0.11:31667'
# url_for_iotfile: 'http://192.168.0.11:31666'
# logo: '/drone/src/logo.jpg'
# cdn_url: 'https://qianmu-iot.1000my.com'
# # genre: "Samsung"
# commands:
# - export isiot="True" # 要不要传iot
# - export name="导视_正式版" # 应用名称(自行填写)
# - export version=$(cat .tags) # 应用版本
# - export sourceId="3" # 应用来源id
# - export genre="localpack" # 应用类型 本地资源包
# - export resolution="1920*1080横屏" # 分辨率(自行填写)[1080*1920竖屏, 1920*1080横屏, 3840*2160横屏, 2160*3840竖屏]
# - export package="/drone/src/target/$DRONE_REPO_NAME.$(cat .tags).zip" # zip包名称
# - export des=$CI_COMMIT_MESSAGE # 应用描述
# - python3 iot_upload.py
# when:
# branch:
# - master