kind: pipeline type: docker name: windows打包exe host_aliases: - ip: 192.168.0.2 hostnames: - git.1000my.com clone: pull: if-not-exists depth: 1 trigger: branch: - master - test event: - push volumes: - name: dockersock host: path: /data/drone/docker/sock - name: gitea host: path: /gitea steps: - name: 生成Release版本 pull: if-not-exists image: registry.cn-hangzhou.aliyuncs.com/tgabc-namespace/tgabc:semantic-release-v21.0.1 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 - git describe --tags `git rev-list --tags --max-count=1` # 获取当前分支的tag - git describe --abbrev=0 --tags > .tags - cat .tags - name: windows构建上传exe和zip到iot测试接口platformAppAdd pull: if-not-exists image: registry.cn-hangzhou.aliyuncs.com/qmiot/init:nsis20250102 environment: url_for_iotplatform: 'http://192.168.0.142:31667' url_for_iotfile: 'http://192.168.0.142:31666' logo: '/drone/src/logo.jpg' cdn_url: 'https://test-598d.1000my.com' # genre: "Samsung" commands: # zip打包 - chmod +x zip_diff.sh - zip_name=$DRONE_REPO_NAME.$(cat .tags).zip - cd ./IOTContainer - zip -q -r $zip_name ./ - mv $zip_name ../ - cd ../ - ls $zip_name - du -sh $zip_name - pwd # # 自动授权 # - export projectCode="projectCode=project-inluar4ppcxvciefgb_ila" - export isiot="True" # 要不要传iot - export name=${DRONE_REPO_NAMESPACE}-${DRONE_REPO_NAME} # 应用名称(自行填写 必填) - export version=$(cat .tags) # 应用版本 - export sourceId="8" # 应用来源id(默认为8 即测试环境专用) //如需更改查看测试环境平台级下应用管理新增应用的/api/platform/v1/platformProgram/platformProgramAdd接口 - export genre="localpack" # 应用类型 本地资源包 [outchain, localpack] - export resolution="2160*3840竖屏" # 分辨率(自行填写)[1080*1920竖屏, 1920*1080横屏, 3840*2160横屏, 2160*3840竖屏] - export des=$CI_COMMIT_MESSAGE # 应用描述 - python3 -u iot_upload.py when: branch: - test