2022-05-27 22:31:48 +03:00
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
2022-11-23 17:56:51 +03:00
|
|
|
name: "Release firmware"
|
2022-05-27 22:31:48 +03:00
|
|
|
|
2023-01-01 23:47:47 +03:00
|
|
|
platform:
|
|
|
|
os: linux
|
|
|
|
arch: amd64
|
|
|
|
|
2022-05-27 22:31:48 +03:00
|
|
|
steps:
|
2022-07-29 21:18:06 +03:00
|
|
|
- name: "Update submodules"
|
|
|
|
image: alpine/git
|
|
|
|
commands:
|
|
|
|
- git submodule sync
|
2023-04-25 02:40:33 +03:00
|
|
|
- git -c protocol.version=2 submodule update --init --force --recursive --jobs 4
|
2022-07-29 21:18:06 +03:00
|
|
|
- git submodule foreach git config --local gc.auto 0
|
|
|
|
- git log -1 --format='%H'
|
|
|
|
|
2023-08-13 03:12:19 +03:00
|
|
|
- name: "Build clean"
|
2022-07-29 21:18:06 +03:00
|
|
|
image: hfdj/fztools
|
|
|
|
pull: never
|
|
|
|
commands:
|
2023-08-13 03:12:19 +03:00
|
|
|
- export DIST_SUFFIX=${DRONE_TAG}c
|
2022-11-23 17:56:51 +03:00
|
|
|
- export WORKFLOW_BRANCH_OR_TAG=release-cfw
|
2023-08-13 01:24:00 +03:00
|
|
|
- export FORCE_NO_DIRTY=yes
|
2023-10-24 00:56:15 +03:00
|
|
|
- export FBT_GIT_SUBMODULE_SHALLOW=1
|
2023-11-13 14:02:01 +03:00
|
|
|
- rm -rf applications/main/clock_app/resources/apps/
|
2023-07-14 04:08:20 +03:00
|
|
|
- rm -rf build/
|
|
|
|
- rm -rf dist/
|
|
|
|
- rm -rf .sconsign.dblite
|
2023-08-13 03:12:19 +03:00
|
|
|
- ./fbt COMPACT=1 DEBUG=0 updater_package
|
|
|
|
- mkdir artifacts-clean
|
|
|
|
- mv dist/f7-C/* artifacts-clean/
|
|
|
|
- ls -laS artifacts-clean
|
|
|
|
- ls -laS artifacts-clean/f7-update-${DRONE_TAG}c
|
|
|
|
environment:
|
|
|
|
FBT_TOOLS_CUSTOM_LINK:
|
|
|
|
from_secret: fbt_link
|
|
|
|
|
|
|
|
- name: "Build default"
|
|
|
|
image: hfdj/fztools
|
|
|
|
pull: never
|
|
|
|
commands:
|
|
|
|
- export DIST_SUFFIX=${DRONE_TAG}
|
|
|
|
- export WORKFLOW_BRANCH_OR_TAG=release-cfw
|
|
|
|
- export FORCE_NO_DIRTY=yes
|
2023-10-24 00:56:15 +03:00
|
|
|
- export FBT_GIT_SUBMODULE_SHALLOW=1
|
2023-08-13 01:24:00 +03:00
|
|
|
- wget https://github.com/xMasterX/all-the-plugins/releases/latest/download/all-the-apps-base.tgz
|
2023-11-22 01:48:22 +03:00
|
|
|
- tar zxf all-the-apps-base.tgz
|
2023-11-17 02:35:27 +03:00
|
|
|
- mkdir -p applications/main/clock_app/resources/apps
|
|
|
|
- mkdir -p applications/main/clock_app/resources/apps_data
|
2023-11-13 14:02:01 +03:00
|
|
|
- cp -R base_pack_build/artifacts-base/* applications/main/clock_app/resources/apps/
|
|
|
|
- cp -R base_pack_build/apps_data/* applications/main/clock_app/resources/apps_data/
|
2023-08-13 01:24:00 +03:00
|
|
|
- rm -rf base_pack_build
|
|
|
|
- rm -rf all-the-apps-base.tgz
|
2023-09-07 14:46:06 +03:00
|
|
|
- rm -f build/f7-firmware-C/toolbox/version.*
|
2022-08-03 00:32:55 +03:00
|
|
|
- ./fbt COMPACT=1 DEBUG=0 updater_package
|
2022-07-29 21:18:06 +03:00
|
|
|
- mkdir artifacts-default
|
|
|
|
- mv dist/f7-C/* artifacts-default/
|
|
|
|
- ls -laS artifacts-default
|
|
|
|
- ls -laS artifacts-default/f7-update-${DRONE_TAG}
|
|
|
|
environment:
|
|
|
|
FBT_TOOLS_CUSTOM_LINK:
|
|
|
|
from_secret: fbt_link
|
|
|
|
|
2022-12-29 01:50:31 +03:00
|
|
|
- name: "Build with extra apps"
|
|
|
|
image: hfdj/fztools
|
|
|
|
pull: never
|
|
|
|
commands:
|
2023-08-13 01:24:00 +03:00
|
|
|
- wget https://github.com/xMasterX/all-the-plugins/releases/latest/download/all-the-apps-extra.tgz
|
2023-11-22 01:48:22 +03:00
|
|
|
- tar zxf all-the-apps-extra.tgz
|
2023-11-17 02:35:27 +03:00
|
|
|
- mkdir -p applications/main/clock_app/resources/apps
|
2023-11-13 14:02:01 +03:00
|
|
|
- cp -R extra_pack_build/artifacts-extra/* applications/main/clock_app/resources/apps/
|
2023-08-13 01:24:00 +03:00
|
|
|
- rm -rf extra_pack_build
|
2022-12-29 01:50:31 +03:00
|
|
|
- export DIST_SUFFIX=${DRONE_TAG}e
|
|
|
|
- export WORKFLOW_BRANCH_OR_TAG=release-cfw
|
|
|
|
- export FORCE_NO_DIRTY=yes
|
2023-10-24 00:56:15 +03:00
|
|
|
- export FBT_GIT_SUBMODULE_SHALLOW=1
|
2022-12-29 01:50:31 +03:00
|
|
|
- rm -f build/f7-firmware-C/toolbox/version.*
|
|
|
|
- ./fbt COMPACT=1 DEBUG=0 updater_package
|
|
|
|
- mkdir artifacts-extra-apps
|
|
|
|
- mv dist/f7-C/* artifacts-extra-apps/
|
|
|
|
- ls -laS artifacts-extra-apps
|
|
|
|
- ls -laS artifacts-extra-apps/f7-update-${DRONE_TAG}e
|
|
|
|
environment:
|
|
|
|
FBT_TOOLS_CUSTOM_LINK:
|
|
|
|
from_secret: fbt_link
|
|
|
|
|
2023-06-04 15:27:59 +03:00
|
|
|
- name: "Build with RGB patch"
|
|
|
|
image: hfdj/fztools
|
|
|
|
pull: never
|
|
|
|
commands:
|
|
|
|
- git apply .ci_files/rgb.patch
|
|
|
|
- export DIST_SUFFIX=${DRONE_TAG}r
|
2023-06-04 15:31:39 +03:00
|
|
|
- export WORKFLOW_BRANCH_OR_TAG=release-cfw-rgb
|
2023-06-04 15:27:59 +03:00
|
|
|
- export FORCE_NO_DIRTY=yes
|
2023-10-24 00:56:15 +03:00
|
|
|
- export FBT_GIT_SUBMODULE_SHALLOW=1
|
2023-06-04 15:27:59 +03:00
|
|
|
- rm -f build/f7-firmware-C/toolbox/version.*
|
|
|
|
- ./fbt COMPACT=1 DEBUG=0 updater_package
|
|
|
|
- mkdir artifacts-rgb-patch
|
|
|
|
- mv dist/f7-C/* artifacts-rgb-patch/
|
|
|
|
- ls -laS artifacts-rgb-patch
|
|
|
|
- ls -laS artifacts-rgb-patch/f7-update-${DRONE_TAG}r
|
2023-06-12 05:40:00 +03:00
|
|
|
- sed -i 's/(version)/'${DRONE_TAG}'/g' CHANGELOG.md
|
2024-06-12 19:56:40 +03:00
|
|
|
- echo '# Install FW via Web Updater:' >> CHANGELOG.md
|
|
|
|
- echo '### [Default](https://lab.flipper.net/?url=https://unleashedflip.com/fw/${DRONE_TAG}/flipper-z-f7-update-'${DRONE_TAG}'.tgz&channel=release-cfw&version='${DRONE_TAG}') > ` `' >> CHANGELOG.md
|
2023-06-12 05:40:00 +03:00
|
|
|
- echo '' >> CHANGELOG.md
|
2024-06-12 19:56:40 +03:00
|
|
|
- echo '### [Extra apps](https://lab.flipper.net/?url=https://unleashedflip.com/fw_extra_apps/flipper-z-f7-update-'${DRONE_TAG}'e.tgz&channel=release-cfw&version='${DRONE_TAG}'e) > `e`' >> CHANGELOG.md
|
2023-08-13 03:12:19 +03:00
|
|
|
- echo '' >> CHANGELOG.md
|
2024-06-12 19:56:40 +03:00
|
|
|
- echo '### [No apps](https://lab.flipper.net/?url=https://unleashedflip.com/fw_extra_apps/flipper-z-f7-update-'${DRONE_TAG}'c.tgz&channel=release-cfw&version='${DRONE_TAG}'c) > `c`' >> CHANGELOG.md
|
2023-06-12 05:40:00 +03:00
|
|
|
- echo '' >> CHANGELOG.md
|
2024-06-12 19:56:40 +03:00
|
|
|
- echo '### [RGB patch - only for hardware mod!](https://lab.flipper.net/?url=https://unleashedflip.com/fw_extra_apps/flipper-z-f7-update-'${DRONE_TAG}'r.tgz&channel=release-cfw&version='${DRONE_TAG}'r) > `r`' >> CHANGELOG.md
|
2022-11-12 22:24:22 +03:00
|
|
|
environment:
|
|
|
|
FBT_TOOLS_CUSTOM_LINK:
|
|
|
|
from_secret: fbt_link
|
|
|
|
|
2022-07-29 21:18:06 +03:00
|
|
|
- name: "Bundle self-update packages"
|
|
|
|
image: kramos/alpine-zip
|
|
|
|
commands:
|
2022-12-29 01:50:31 +03:00
|
|
|
- cp artifacts-extra-apps/flipper-z-f7-update-${DRONE_TAG}e.tgz .
|
2023-06-04 15:27:59 +03:00
|
|
|
- cp artifacts-rgb-patch/flipper-z-f7-update-${DRONE_TAG}r.tgz .
|
2023-08-13 03:12:19 +03:00
|
|
|
- cp artifacts-clean/flipper-z-f7-update-${DRONE_TAG}c.tgz .
|
2022-08-01 23:56:25 +03:00
|
|
|
- cp artifacts-default/flipper-z-f7-update-${DRONE_TAG}.tgz .
|
2022-12-29 01:50:31 +03:00
|
|
|
- zip -r artifacts-extra-apps/flipper-z-f7-update-${DRONE_TAG}e.zip artifacts-extra-apps/f7-update-${DRONE_TAG}e
|
2023-06-04 15:27:59 +03:00
|
|
|
- zip -r artifacts-rgb-patch/flipper-z-f7-update-${DRONE_TAG}r.zip artifacts-rgb-patch/f7-update-${DRONE_TAG}r
|
2023-08-13 03:12:19 +03:00
|
|
|
- zip -r artifacts-clean/flipper-z-f7-update-${DRONE_TAG}c.zip artifacts-clean/f7-update-${DRONE_TAG}c
|
2022-07-29 21:18:06 +03:00
|
|
|
- zip -r artifacts-default/flipper-z-f7-update-${DRONE_TAG}.zip artifacts-default/f7-update-${DRONE_TAG}
|
2023-05-18 03:16:51 +03:00
|
|
|
- tar czpf artifacts-default/flipper-z-any-scripts-${DRONE_TAG}.tgz scripts
|
2022-12-29 01:50:31 +03:00
|
|
|
- rm -rf artifacts-extra-apps/f7-update-${DRONE_TAG}
|
2023-06-04 15:27:59 +03:00
|
|
|
- rm -rf artifacts-rgb-patch/f7-update-${DRONE_TAG}
|
2023-08-13 03:12:19 +03:00
|
|
|
- rm -rf artifacts-clean/f7-update-${DRONE_TAG}
|
2022-07-29 21:18:06 +03:00
|
|
|
- rm -rf artifacts-default/f7-update-${DRONE_TAG}
|
2022-12-29 01:50:31 +03:00
|
|
|
- ls -laS artifacts-extra-apps
|
2023-06-04 15:27:59 +03:00
|
|
|
- ls -laS artifacts-rgb-patch
|
2023-08-13 03:12:19 +03:00
|
|
|
- ls -laS artifacts-clean
|
2022-07-29 21:18:06 +03:00
|
|
|
- ls -laS artifacts-default
|
2022-11-23 17:56:51 +03:00
|
|
|
- mv artifacts-default/ ${DRONE_TAG}
|
|
|
|
- ls -laS ${DRONE_TAG}
|
2022-07-29 21:18:06 +03:00
|
|
|
|
2022-11-12 22:24:22 +03:00
|
|
|
- name: "Upload default to updates srv"
|
2023-01-01 23:59:09 +03:00
|
|
|
image: appleboy/drone-scp:linux-amd64
|
2022-08-01 23:20:04 +03:00
|
|
|
settings:
|
|
|
|
host:
|
|
|
|
from_secret: dep_host
|
|
|
|
username:
|
|
|
|
from_secret: dep_user
|
|
|
|
password:
|
|
|
|
from_secret: dep_passwd
|
|
|
|
port:
|
|
|
|
from_secret: dep_port
|
|
|
|
target:
|
2022-11-23 17:56:51 +03:00
|
|
|
from_secret: dep_target_new
|
|
|
|
source:
|
|
|
|
- ${DRONE_TAG}/*.tgz
|
|
|
|
- ${DRONE_TAG}/*.zip
|
|
|
|
- ${DRONE_TAG}/*.json
|
|
|
|
- ${DRONE_TAG}/*.elf
|
|
|
|
- ${DRONE_TAG}/*.dfu
|
|
|
|
- ${DRONE_TAG}/*.bin
|
2022-08-01 23:20:04 +03:00
|
|
|
|
2022-12-29 01:50:31 +03:00
|
|
|
- name: "Upload extra apps version to updates srv"
|
2023-01-01 23:59:09 +03:00
|
|
|
image: appleboy/drone-scp:linux-amd64
|
2022-12-29 01:50:31 +03:00
|
|
|
settings:
|
|
|
|
host:
|
|
|
|
from_secret: dep_host
|
|
|
|
username:
|
|
|
|
from_secret: dep_user
|
|
|
|
password:
|
|
|
|
from_secret: dep_passwd
|
|
|
|
port:
|
|
|
|
from_secret: dep_port
|
|
|
|
target:
|
|
|
|
from_secret: dep_target_extra
|
|
|
|
source: flipper-z-f7-update-${DRONE_TAG}e.tgz
|
|
|
|
|
2023-06-04 15:27:59 +03:00
|
|
|
- name: "Upload rgb patch version to updates srv"
|
|
|
|
image: appleboy/drone-scp:linux-amd64
|
|
|
|
settings:
|
|
|
|
host:
|
|
|
|
from_secret: dep_host
|
|
|
|
username:
|
|
|
|
from_secret: dep_user
|
|
|
|
password:
|
|
|
|
from_secret: dep_passwd
|
|
|
|
port:
|
|
|
|
from_secret: dep_port
|
|
|
|
target:
|
|
|
|
from_secret: dep_target_extra
|
|
|
|
source: flipper-z-f7-update-${DRONE_TAG}r.tgz
|
|
|
|
|
2023-08-13 22:27:48 +03:00
|
|
|
- name: "Upload clean version to updates srv"
|
|
|
|
image: appleboy/drone-scp:linux-amd64
|
|
|
|
settings:
|
|
|
|
host:
|
|
|
|
from_secret: dep_host
|
|
|
|
username:
|
|
|
|
from_secret: dep_user
|
|
|
|
password:
|
|
|
|
from_secret: dep_passwd
|
|
|
|
port:
|
|
|
|
from_secret: dep_port
|
|
|
|
target:
|
|
|
|
from_secret: dep_target_extra
|
|
|
|
source: flipper-z-f7-update-${DRONE_TAG}c.tgz
|
|
|
|
|
2022-07-29 21:18:06 +03:00
|
|
|
- name: "Do Github release"
|
|
|
|
image: ddplugins/github-release
|
|
|
|
pull: never
|
|
|
|
settings:
|
|
|
|
github_url: https://github.com
|
|
|
|
repo_owner:
|
|
|
|
from_secret: github_repoowner
|
|
|
|
api_key:
|
|
|
|
from_secret: github_apikey
|
|
|
|
files:
|
2022-11-23 17:56:51 +03:00
|
|
|
- ${DRONE_TAG}/*.tgz
|
|
|
|
- ${DRONE_TAG}/*.zip
|
2022-12-29 01:50:31 +03:00
|
|
|
- artifacts-extra-apps/*.tgz
|
2023-06-04 15:27:59 +03:00
|
|
|
- artifacts-rgb-patch/*.tgz
|
2023-08-13 03:12:19 +03:00
|
|
|
- artifacts-clean/*.tgz
|
2022-07-29 21:18:06 +03:00
|
|
|
title: ${DRONE_TAG}
|
|
|
|
note: CHANGELOG.md
|
|
|
|
checksum:
|
|
|
|
- md5
|
|
|
|
- sha1
|
|
|
|
- crc32
|
|
|
|
|
2022-11-24 04:02:22 +03:00
|
|
|
- name: "Trigger update server reindex"
|
|
|
|
image: hfdj/fztools
|
|
|
|
pull: never
|
|
|
|
environment:
|
|
|
|
UPD_KEY:
|
|
|
|
from_secret: git_update_serv_token
|
|
|
|
UPD_URL:
|
|
|
|
from_secret: git_update_server_url
|
|
|
|
commands:
|
|
|
|
- curl -X POST -F 'key='$UPD_KEY'' $UPD_URL
|
|
|
|
|
2024-06-12 19:26:45 +03:00
|
|
|
- name: "Send discord notification"
|
|
|
|
image: hfdj/fztools
|
|
|
|
pull: never
|
|
|
|
environment:
|
|
|
|
DISCORD_WEBHOOK:
|
|
|
|
from_secret: dis_release_webhook
|
|
|
|
commands:
|
|
|
|
- wget "https://raw.githubusercontent.com/fieu/discord.sh/2253303efc0e7211ac2777d2535054cbb872f1e0/discord.sh"
|
|
|
|
- chmod +x ./discord.sh
|
|
|
|
- sed -n '/## Main changes/,/## Other changes/p' CHANGELOG.md | sed -e 's/## Main changes//' -e 's/## Other changes//' > changelogcut.txt
|
|
|
|
- truncate -s -1 changelogcut.txt
|
|
|
|
- tail -c +2 changelogcut.txt > changelogready.txt
|
|
|
|
- rm -f changelogcut.txt
|
|
|
|
- echo '' >> changelogready.txt
|
|
|
|
- echo '## [Read full changelog](https://github.com/DarkFlippers/unleashed-firmware/releases/tag/'${DRONE_TAG}')' >> changelogready.txt
|
|
|
|
- sed -i 's/(releasever)/'${DRONE_TAG}'/g' .ci_files/release_msg_discord.txt
|
|
|
|
- sed -i 's/(releasever)/'${DRONE_TAG}'/g' .ci_files/release_msg_telegram.txt
|
|
|
|
- cp .ci_files/release_msg_telegram.txt tg_release_message.tpl
|
|
|
|
- ./discord.sh --title "Main changes" --description "$(jq -Rs . <changelogready.txt | cut -c 2- | rev | cut -c 2- | rev)" --timestamp --text "$(jq -Rs . <.ci_files/release_msg_discord.txt | cut -c 2- | rev | cut -c 2- | rev)"
|
|
|
|
|
|
|
|
- name: "Send notification to telegram"
|
2022-07-29 21:18:06 +03:00
|
|
|
image: appleboy/drone-telegram
|
|
|
|
settings:
|
|
|
|
token:
|
|
|
|
from_secret: tgtoken
|
|
|
|
to:
|
|
|
|
from_secret: tgid
|
|
|
|
format: markdown
|
2024-06-12 19:26:45 +03:00
|
|
|
message_file: tg_release_message.tpl
|
2023-08-13 03:12:19 +03:00
|
|
|
|
2024-06-12 19:26:45 +03:00
|
|
|
- name: "Send default build to telegram"
|
|
|
|
image: appleboy/drone-telegram
|
|
|
|
settings:
|
|
|
|
token:
|
|
|
|
from_secret: tgtoken
|
|
|
|
to:
|
|
|
|
from_secret: tgid
|
|
|
|
format: markdown
|
|
|
|
message: "Default build:"
|
2022-07-29 21:18:06 +03:00
|
|
|
document:
|
2023-02-13 02:54:12 +03:00
|
|
|
- ${DRONE_TAG}/flipper-z-f7-update-${DRONE_TAG}.tgz
|
2022-07-29 21:18:06 +03:00
|
|
|
|
2023-08-13 03:12:19 +03:00
|
|
|
- name: "Send clean build to telegram"
|
|
|
|
image: appleboy/drone-telegram
|
|
|
|
settings:
|
|
|
|
token:
|
|
|
|
from_secret: tgtoken
|
|
|
|
to:
|
|
|
|
from_secret: tgid
|
|
|
|
format: markdown
|
|
|
|
message: "Build with only main apps:"
|
|
|
|
document:
|
|
|
|
- flipper-z-f7-update-${DRONE_TAG}c.tgz
|
2022-07-29 21:18:06 +03:00
|
|
|
|
2023-02-13 02:54:12 +03:00
|
|
|
- name: "Send extra pack build to telegram"
|
|
|
|
image: appleboy/drone-telegram
|
|
|
|
settings:
|
|
|
|
token:
|
|
|
|
from_secret: tgtoken
|
|
|
|
to:
|
|
|
|
from_secret: tgid
|
2023-02-13 03:31:16 +03:00
|
|
|
format: markdown
|
2024-06-12 19:26:45 +03:00
|
|
|
message: "Build with extra apps:"
|
2023-02-13 02:54:12 +03:00
|
|
|
document:
|
|
|
|
- flipper-z-f7-update-${DRONE_TAG}e.tgz
|
|
|
|
|
2022-05-27 22:31:48 +03:00
|
|
|
trigger:
|
|
|
|
event:
|
2022-07-29 21:18:06 +03:00
|
|
|
- tag
|
2022-05-27 22:31:48 +03:00
|
|
|
|
|
|
|
node:
|
2024-06-06 00:24:55 +03:00
|
|
|
typ: dev2
|
2022-11-23 17:56:51 +03:00
|
|
|
|
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: "Dev build"
|
|
|
|
|
2023-01-01 23:47:47 +03:00
|
|
|
platform:
|
|
|
|
os: linux
|
|
|
|
arch: amd64
|
|
|
|
|
2022-11-23 17:56:51 +03:00
|
|
|
steps:
|
|
|
|
- name: "Update submodules"
|
|
|
|
image: alpine/git
|
|
|
|
commands:
|
|
|
|
- git submodule sync
|
2023-04-25 02:40:33 +03:00
|
|
|
- git -c protocol.version=2 submodule update --init --force --recursive --jobs 4
|
2022-11-23 17:56:51 +03:00
|
|
|
- git submodule foreach git config --local gc.auto 0
|
|
|
|
- git log -1 --format='%H'
|
|
|
|
|
2023-08-13 03:12:19 +03:00
|
|
|
- name: "Build dev clean"
|
2022-11-23 17:56:51 +03:00
|
|
|
image: hfdj/fztools
|
|
|
|
pull: never
|
|
|
|
commands:
|
2023-08-13 03:12:19 +03:00
|
|
|
- export DIST_SUFFIX=${DRONE_BUILD_NUMBER}c
|
2022-11-23 17:56:51 +03:00
|
|
|
- export WORKFLOW_BRANCH_OR_TAG=dev-cfw
|
2023-08-13 01:24:00 +03:00
|
|
|
- export FORCE_NO_DIRTY=yes
|
2023-10-24 00:56:15 +03:00
|
|
|
- export FBT_GIT_SUBMODULE_SHALLOW=1
|
2023-11-13 14:02:01 +03:00
|
|
|
- rm -rf applications/main/clock_app/resources/apps/
|
2023-07-14 04:08:20 +03:00
|
|
|
- rm -rf build/
|
|
|
|
- rm -rf dist/
|
|
|
|
- rm -rf .sconsign.dblite
|
2023-08-13 03:12:19 +03:00
|
|
|
- ./fbt COMPACT=1 DEBUG=0 updater_package
|
|
|
|
- mkdir artifacts-clean
|
|
|
|
- mv dist/f7-C/* artifacts-clean/
|
|
|
|
- ls -laS artifacts-clean
|
|
|
|
- ls -laS artifacts-clean/f7-update-${DRONE_BUILD_NUMBER}c
|
|
|
|
environment:
|
|
|
|
FBT_TOOLS_CUSTOM_LINK:
|
|
|
|
from_secret: fbt_link
|
|
|
|
|
|
|
|
|
|
|
|
- name: "Build dev default"
|
|
|
|
image: hfdj/fztools
|
|
|
|
pull: never
|
|
|
|
commands:
|
|
|
|
- export DIST_SUFFIX=${DRONE_BUILD_NUMBER}
|
|
|
|
- export WORKFLOW_BRANCH_OR_TAG=dev-cfw
|
|
|
|
- export FORCE_NO_DIRTY=yes
|
2023-10-24 00:56:15 +03:00
|
|
|
- export FBT_GIT_SUBMODULE_SHALLOW=1
|
2023-08-13 01:24:00 +03:00
|
|
|
- wget https://github.com/xMasterX/all-the-plugins/releases/latest/download/all-the-apps-base.tgz
|
2023-11-22 01:48:22 +03:00
|
|
|
- tar zxf all-the-apps-base.tgz
|
2023-11-17 02:35:27 +03:00
|
|
|
- mkdir -p applications/main/clock_app/resources/apps
|
|
|
|
- mkdir -p applications/main/clock_app/resources/apps_data
|
2023-11-13 14:02:01 +03:00
|
|
|
- cp -R base_pack_build/artifacts-base/* applications/main/clock_app/resources/apps/
|
|
|
|
- cp -R base_pack_build/apps_data/* applications/main/clock_app/resources/apps_data/
|
2023-08-13 01:24:00 +03:00
|
|
|
- rm -rf base_pack_build
|
|
|
|
- rm -rf all-the-apps-base.tgz
|
2023-09-07 14:46:06 +03:00
|
|
|
- rm -f build/f7-firmware-C/toolbox/version.*
|
2023-06-29 14:12:47 +03:00
|
|
|
- ./fbt COMPACT=1 DEBUG=0 updater_package
|
2022-11-23 17:56:51 +03:00
|
|
|
- mkdir artifacts-default
|
|
|
|
- mv dist/f7-C/* artifacts-default/
|
|
|
|
- ls -laS artifacts-default
|
2022-11-23 18:03:48 +03:00
|
|
|
- ls -laS artifacts-default/f7-update-${DRONE_BUILD_NUMBER}
|
2022-11-23 17:56:51 +03:00
|
|
|
environment:
|
|
|
|
FBT_TOOLS_CUSTOM_LINK:
|
|
|
|
from_secret: fbt_link
|
|
|
|
|
2022-12-31 15:14:32 +03:00
|
|
|
- name: "Build dev with extra apps"
|
|
|
|
image: hfdj/fztools
|
|
|
|
pull: never
|
|
|
|
commands:
|
2023-08-13 01:24:00 +03:00
|
|
|
- wget https://github.com/xMasterX/all-the-plugins/releases/latest/download/all-the-apps-extra.tgz
|
2023-11-22 01:48:22 +03:00
|
|
|
- tar zxf all-the-apps-extra.tgz
|
2023-11-17 02:35:27 +03:00
|
|
|
- mkdir -p applications/main/clock_app/resources/apps
|
2023-11-13 14:02:01 +03:00
|
|
|
- cp -R extra_pack_build/artifacts-extra/* applications/main/clock_app/resources/apps/
|
2023-08-13 01:24:00 +03:00
|
|
|
- rm -rf extra_pack_build
|
2022-12-31 15:14:32 +03:00
|
|
|
- export DIST_SUFFIX=${DRONE_BUILD_NUMBER}e
|
|
|
|
- export WORKFLOW_BRANCH_OR_TAG=dev-cfw
|
|
|
|
- export FORCE_NO_DIRTY=yes
|
2023-10-24 00:56:15 +03:00
|
|
|
- export FBT_GIT_SUBMODULE_SHALLOW=1
|
2022-12-31 15:14:32 +03:00
|
|
|
- rm -f build/f7-firmware-C/toolbox/version.*
|
|
|
|
- ./fbt COMPACT=1 DEBUG=0 updater_package
|
|
|
|
- mkdir artifacts-extra-apps
|
|
|
|
- mv dist/f7-C/* artifacts-extra-apps/
|
|
|
|
- ls -laS artifacts-extra-apps
|
|
|
|
- ls -laS artifacts-extra-apps/f7-update-${DRONE_BUILD_NUMBER}e
|
|
|
|
environment:
|
|
|
|
FBT_TOOLS_CUSTOM_LINK:
|
|
|
|
from_secret: fbt_link
|
|
|
|
|
2023-06-04 15:27:59 +03:00
|
|
|
- name: "Build dev with rgb patch"
|
|
|
|
image: hfdj/fztools
|
|
|
|
pull: never
|
|
|
|
commands:
|
|
|
|
- git apply .ci_files/rgb.patch
|
|
|
|
- export DIST_SUFFIX=${DRONE_BUILD_NUMBER}r
|
2023-06-04 15:31:39 +03:00
|
|
|
- export WORKFLOW_BRANCH_OR_TAG=dev-cfw-rgb
|
2023-06-04 15:27:59 +03:00
|
|
|
- export FORCE_NO_DIRTY=yes
|
2023-10-24 00:56:15 +03:00
|
|
|
- export FBT_GIT_SUBMODULE_SHALLOW=1
|
2023-06-04 15:27:59 +03:00
|
|
|
- rm -f build/f7-firmware-C/toolbox/version.*
|
|
|
|
- ./fbt COMPACT=1 DEBUG=0 updater_package
|
|
|
|
- mkdir artifacts-rgb-patch
|
|
|
|
- mv dist/f7-C/* artifacts-rgb-patch/
|
|
|
|
- ls -laS artifacts-rgb-patch
|
|
|
|
- ls -laS artifacts-rgb-patch/f7-update-${DRONE_BUILD_NUMBER}r
|
|
|
|
environment:
|
|
|
|
FBT_TOOLS_CUSTOM_LINK:
|
|
|
|
from_secret: fbt_link
|
|
|
|
|
2022-11-23 17:56:51 +03:00
|
|
|
- name: "Bundle self-update packages"
|
|
|
|
image: kramos/alpine-zip
|
|
|
|
commands:
|
2022-12-31 15:27:47 +03:00
|
|
|
- cp artifacts-extra-apps/flipper-z-f7-update-${DRONE_BUILD_NUMBER}e.tgz .
|
2023-06-04 15:27:59 +03:00
|
|
|
- cp artifacts-rgb-patch/flipper-z-f7-update-${DRONE_BUILD_NUMBER}r.tgz .
|
2023-08-13 03:12:19 +03:00
|
|
|
- cp artifacts-clean/flipper-z-f7-update-${DRONE_BUILD_NUMBER}c.tgz .
|
2022-11-23 18:03:48 +03:00
|
|
|
- cp artifacts-default/flipper-z-f7-update-${DRONE_BUILD_NUMBER}.tgz .
|
|
|
|
- rm -rf artifacts-default/f7-update-${DRONE_BUILD_NUMBER}
|
2022-11-23 17:56:51 +03:00
|
|
|
- ls -laS artifacts-default
|
|
|
|
- mv artifacts-default/ dev
|
|
|
|
- ls -laS dev
|
|
|
|
|
|
|
|
- name: "Clean dev folder"
|
2023-01-01 23:47:47 +03:00
|
|
|
image: appleboy/drone-ssh:linux-amd64
|
2022-11-23 17:56:51 +03:00
|
|
|
settings:
|
|
|
|
host:
|
|
|
|
from_secret: dep_host
|
|
|
|
username:
|
|
|
|
from_secret: dep_user
|
|
|
|
password:
|
|
|
|
from_secret: dep_passwd
|
|
|
|
port:
|
|
|
|
from_secret: dep_port
|
2022-11-23 19:04:58 +03:00
|
|
|
command_timeout: 30s
|
2022-11-23 17:56:51 +03:00
|
|
|
script:
|
2022-12-27 00:20:00 +03:00
|
|
|
- cd web/unleashedflip.com/public_html/fw/dev && rm -f ./*
|
2022-11-23 17:56:51 +03:00
|
|
|
|
|
|
|
- name: "Upload default to updates srv"
|
2023-01-01 23:59:09 +03:00
|
|
|
image: appleboy/drone-scp:linux-amd64
|
2022-11-23 17:56:51 +03:00
|
|
|
settings:
|
|
|
|
host:
|
|
|
|
from_secret: dep_host
|
|
|
|
username:
|
|
|
|
from_secret: dep_user
|
|
|
|
password:
|
|
|
|
from_secret: dep_passwd
|
|
|
|
port:
|
|
|
|
from_secret: dep_port
|
|
|
|
target:
|
|
|
|
from_secret: dep_target_new
|
|
|
|
source:
|
|
|
|
- dev/*.tgz
|
|
|
|
- dev/*.zip
|
|
|
|
- dev/*.json
|
|
|
|
- dev/*.elf
|
|
|
|
- dev/*.dfu
|
|
|
|
- dev/*.bin
|
|
|
|
|
2022-12-31 15:14:32 +03:00
|
|
|
- name: "Upload extra apps version to updates srv"
|
2023-01-01 23:59:09 +03:00
|
|
|
image: appleboy/drone-scp:linux-amd64
|
2022-12-31 15:14:32 +03:00
|
|
|
settings:
|
|
|
|
host:
|
|
|
|
from_secret: dep_host
|
|
|
|
username:
|
|
|
|
from_secret: dep_user
|
|
|
|
password:
|
|
|
|
from_secret: dep_passwd
|
|
|
|
port:
|
|
|
|
from_secret: dep_port
|
|
|
|
target:
|
|
|
|
from_secret: dep_target_extra
|
|
|
|
source: flipper-z-f7-update-${DRONE_BUILD_NUMBER}e.tgz
|
|
|
|
|
2023-06-04 15:27:59 +03:00
|
|
|
- name: "Upload rgb patch version to updates srv"
|
|
|
|
image: appleboy/drone-scp:linux-amd64
|
|
|
|
settings:
|
|
|
|
host:
|
|
|
|
from_secret: dep_host
|
|
|
|
username:
|
|
|
|
from_secret: dep_user
|
|
|
|
password:
|
|
|
|
from_secret: dep_passwd
|
|
|
|
port:
|
|
|
|
from_secret: dep_port
|
|
|
|
target:
|
|
|
|
from_secret: dep_target_extra
|
|
|
|
source: flipper-z-f7-update-${DRONE_BUILD_NUMBER}r.tgz
|
|
|
|
|
2023-08-13 03:12:19 +03:00
|
|
|
- name: "Upload clean version to updates srv"
|
|
|
|
image: appleboy/drone-scp:linux-amd64
|
|
|
|
settings:
|
|
|
|
host:
|
|
|
|
from_secret: dep_host
|
|
|
|
username:
|
|
|
|
from_secret: dep_user
|
|
|
|
password:
|
|
|
|
from_secret: dep_passwd
|
|
|
|
port:
|
|
|
|
from_secret: dep_port
|
|
|
|
target:
|
|
|
|
from_secret: dep_target_extra
|
|
|
|
source: flipper-z-f7-update-${DRONE_BUILD_NUMBER}c.tgz
|
|
|
|
|
2022-11-23 17:56:51 +03:00
|
|
|
- name: "Trigger update server reindex"
|
|
|
|
image: hfdj/fztools
|
|
|
|
pull: never
|
|
|
|
environment:
|
|
|
|
UPD_KEY:
|
|
|
|
from_secret: git_update_serv_token
|
|
|
|
UPD_URL:
|
|
|
|
from_secret: git_update_server_url
|
|
|
|
commands:
|
|
|
|
- curl -X POST -F 'key='$UPD_KEY'' $UPD_URL
|
|
|
|
|
2024-06-12 19:26:45 +03:00
|
|
|
- name: "Send discord notification"
|
|
|
|
image: hfdj/fztools
|
|
|
|
pull: never
|
|
|
|
environment:
|
|
|
|
DISCORD_WEBHOOK:
|
|
|
|
from_secret: dis_dev_webhook
|
|
|
|
commands:
|
|
|
|
- wget "https://raw.githubusercontent.com/fieu/discord.sh/2253303efc0e7211ac2777d2535054cbb872f1e0/discord.sh"
|
|
|
|
- chmod +x ./discord.sh
|
|
|
|
- sed -n '/## Main changes/,/<br><br>/p' CHANGELOG.md | sed -e 's/<br><br>//' > changelogcut.txt
|
|
|
|
- truncate -s -1 changelogcut.txt
|
|
|
|
- sed -i 's/(buildnum)/'${DRONE_BUILD_NUMBER}'/g' .ci_files/devbuild_msg_discord.txt
|
|
|
|
- sed -i 's/(commitsha)/'${DRONE_COMMIT_SHA}'/g' .ci_files/devbuild_msg_discord.txt
|
|
|
|
- sed -i 's/(buildnum)/'${DRONE_BUILD_NUMBER}'/g' .ci_files/devbuild_msg_telegram.txt
|
|
|
|
- sed -i 's/(commitsha)/'${DRONE_COMMIT_SHA}'/g' .ci_files/devbuild_msg_telegram.txt
|
|
|
|
- cp .ci_files/devbuild_msg_telegram.txt tg_dev_message.tpl
|
|
|
|
- ./discord.sh --title "Changelog" --description "$(jq -Rs . <changelogcut.txt | cut -c 2- | rev | cut -c 2- | rev)" --timestamp --text "$(jq -Rs . <.ci_files/devbuild_msg_discord.txt | cut -c 2- | rev | cut -c 2- | rev)"
|
|
|
|
|
2023-04-05 23:51:20 +03:00
|
|
|
- name: "Send message to telegram"
|
2022-11-23 17:56:51 +03:00
|
|
|
image: appleboy/drone-telegram
|
|
|
|
settings:
|
|
|
|
token:
|
|
|
|
from_secret: tgtoken
|
|
|
|
to:
|
|
|
|
from_secret: tgid_dev
|
|
|
|
format: markdown
|
2024-06-12 19:26:45 +03:00
|
|
|
message_file: tg_dev_message.tpl
|
2023-06-04 15:27:59 +03:00
|
|
|
|
2024-06-12 19:26:45 +03:00
|
|
|
- name: "Send default build to telegram"
|
2023-04-05 23:51:20 +03:00
|
|
|
image: appleboy/drone-telegram
|
|
|
|
settings:
|
|
|
|
token:
|
|
|
|
from_secret: tgtoken
|
|
|
|
to:
|
|
|
|
from_secret: tgid_dev
|
|
|
|
format: markdown
|
2024-06-12 19:26:45 +03:00
|
|
|
message: "Default Build:"
|
2023-02-13 02:54:12 +03:00
|
|
|
document:
|
|
|
|
- dev/flipper-z-f7-update-${DRONE_BUILD_NUMBER}.tgz
|
|
|
|
|
2023-08-13 03:12:19 +03:00
|
|
|
- name: "Send clean build to telegram"
|
|
|
|
image: appleboy/drone-telegram
|
|
|
|
settings:
|
|
|
|
token:
|
|
|
|
from_secret: tgtoken
|
|
|
|
to:
|
|
|
|
from_secret: tgid_dev
|
|
|
|
format: markdown
|
|
|
|
message: "Clean (Main apps only) Build:"
|
|
|
|
document:
|
|
|
|
- flipper-z-f7-update-${DRONE_BUILD_NUMBER}c.tgz
|
|
|
|
|
2023-02-13 02:54:12 +03:00
|
|
|
- name: "Send extra pack build to telegram"
|
|
|
|
image: appleboy/drone-telegram
|
|
|
|
settings:
|
|
|
|
token:
|
|
|
|
from_secret: tgtoken
|
|
|
|
to:
|
|
|
|
from_secret: tgid_dev
|
2023-02-13 03:31:16 +03:00
|
|
|
format: markdown
|
2024-06-12 19:26:45 +03:00
|
|
|
message: "Build with extra apps:"
|
2022-11-23 17:56:51 +03:00
|
|
|
document:
|
2023-02-13 02:31:04 +03:00
|
|
|
- flipper-z-f7-update-${DRONE_BUILD_NUMBER}e.tgz
|
2022-11-23 17:56:51 +03:00
|
|
|
|
|
|
|
trigger:
|
|
|
|
branch:
|
|
|
|
- dev
|
|
|
|
event:
|
|
|
|
- push
|
|
|
|
|
|
|
|
node:
|
2024-06-06 00:24:55 +03:00
|
|
|
typ: dev2
|