2022-05-27 22:31:48 +03:00
kind : pipeline
type : docker
2022-07-29 21:18:06 +03:00
name : "Build firmware"
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
- git -c protocol.version=2 submodule update --init --force --recursive
- git submodule foreach git config --local gc.auto 0
- git log -1 --format='%H'
- name : "Build default fw"
image : hfdj/fztools
pull : never
commands :
- export DIST_SUFFIX=${DRONE_TAG}
- export WORKFLOW_BRANCH_OR_TAG=dev-cfw
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}
2022-08-01 23:20:04 +03:00
- sed -i 's/(version)/'${DRONE_TAG}'/g' CHANGELOG.md
2022-08-01 23:35:09 +03:00
- echo '# [Install via Web Updater](https://my.flipp.dev/?url=https://unleashedflip.com/builds/flipper-z-f7-update-'${DRONE_TAG}'.tgz&channel=dev-cfw&version='${DRONE_TAG}')' >> CHANGELOG.md
2022-07-29 21:18:06 +03:00
environment :
FBT_TOOLS_CUSTOM_LINK :
from_secret : fbt_link
- name : "Bundle resources"
image : kramos/alpine-zip
commands :
- mkdir sd-card
- mkdir -p sd-card/subghz/assets
- mkdir -p sd-card/nfc/assets
- mkdir -p sd-card/infrared/assets
- mkdir -p sd-card/unirf
2022-09-05 22:28:41 +03:00
- mkdir -p sd-card/rfidfuzzer
2022-09-10 17:51:13 +03:00
- mkdir -p sd-card/subplaylist
2022-08-06 07:07:31 +03:00
- mkdir -p sd-card/badusb/layouts
- cp assets/resources/badusb/layouts/* sd-card/badusb/layouts/
2022-07-29 21:18:06 +03:00
- cp assets/resources/subghz/assets/dangerous_settings sd-card/subghz/assets/dangerous_settings
- cp assets/resources/subghz/assets/setting_user sd-card/subghz/assets/setting_user
- cp assets/resources/subghz/assets/keeloq_mfcodes sd-card/subghz/assets/keeloq_mfcodes
- cp assets/resources/nfc/assets/mf_classic_dict.nfc sd-card/nfc/assets/mf_classic_dict.nfc
- cp assets/resources/infrared/assets/tv.ir sd-card/infrared/assets/tv.ir
2022-08-08 03:58:33 +03:00
- cp assets/resources/infrared/assets/ac.ir sd-card/infrared/assets/ac.ir
2022-08-26 20:02:25 +03:00
- cp assets/resources/infrared/assets/fans.ir sd-card/infrared/assets/fans.ir
2022-08-23 22:59:49 +03:00
- cp assets/resources/infrared/assets/projectors.ir sd-card/infrared/assets/projectors.ir
2022-08-08 03:58:33 +03:00
- cp assets/resources/infrared/assets/audio.ir sd-card/infrared/assets/audio.ir
2022-07-29 21:18:06 +03:00
- cp assets/resources/unirf/unirf_map_example.txt sd-card/unirf/unirf_map_example.txt
2022-09-05 22:28:41 +03:00
- cp assets/resources/rfidfuzzer/example_uids.txt sd-card/rfidfuzzer/example_uids.txt
2022-09-10 17:51:13 +03:00
- cp assets/resources/subplaylist/example_playlist.txt sd-card/subplaylist/example_playlist.txt
2022-07-29 21:18:06 +03:00
- cp assets/resources/Manifest sd-card/Manifest
- zip -r artifacts-default/sd-card-${DRONE_TAG}.zip sd-card
- rm -rf sd-card
- ls -laS artifacts-default
- name : "Bundle self-update packages"
image : kramos/alpine-zip
commands :
- tar czpf artifacts-default/flipper-z-f7-update-${DRONE_TAG}.tgz -C artifacts-default f7-update-${DRONE_TAG}
2022-08-01 23:56:25 +03:00
- cp artifacts-default/flipper-z-f7-update-${DRONE_TAG}.tgz .
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}
- rm -rf artifacts-default/f7-update-${DRONE_TAG}
- ls -laS artifacts-default
2022-08-01 23:20:04 +03:00
- name : "Upload to updates server"
image : appleboy/drone-scp
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
2022-08-01 23:56:25 +03:00
source : flipper-z-f7-update-${DRONE_TAG}.tgz
2022-08-01 23:20:04 +03:00
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 :
- artifacts-default/*.tgz
- artifacts-default/*.zip
- artifacts-default/flipper-z-f7-full-${DRONE_TAG}.dfu
title : ${DRONE_TAG}
note : CHANGELOG.md
checksum :
- md5
- sha1
- crc32
- name : "Send files to telegram"
image : appleboy/drone-telegram
settings :
token :
from_secret : tgtoken
to :
from_secret : tgid
format : markdown
message : "New Unleashed firmware released!
Version : {{build.tag}}
2022-08-03 00:32:55 +03:00
[ -Github-](https://github.com/Eng1n33r/flipperzero-firmware/releases/tag/${DRONE_TAG})
[ -Install via Web Updater-](https://my.flipp.dev/?url=https://unleashedflip.com/builds/flipper-z-f7-update-${DRONE_TAG}.tgz&channel=dev-cfw&version=${DRONE_TAG})"
2022-07-29 21:18:06 +03:00
document :
2022-08-26 20:02:25 +03:00
- artifacts-default/flipper-z-f7-update-${DRONE_TAG}.tgz
2022-07-29 21:18:06 +03:00
- name : "Send discord notification"
image : appleboy/drone-discord
settings :
webhook_id :
from_secret : ds_wh_id
webhook_token :
from_secret : ds_wh_token
message : "New Unleashed firmware released!
Version : {{build.tag}}
2022-08-03 00:32:55 +03:00
[ [ Github]](https://github.com/Eng1n33r/flipperzero-firmware/releases/tag/${DRONE_TAG})
[ -Install via Web Updater-](https://my.flipp.dev/?url=https://unleashedflip.com/builds/flipper-z-f7-update-${DRONE_TAG}.tgz&channel=dev-cfw&version=${DRONE_TAG})"
2022-07-29 21:18:06 +03:00
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 :
2022-07-29 21:18:06 +03:00
typ : haupt