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.
76 lines
1.8 KiB
76 lines
1.8 KiB
---
|
|
kind: pipeline
|
|
type: docker
|
|
name: default
|
|
|
|
steps:
|
|
- name: build
|
|
image: python
|
|
environment:
|
|
PLATFORMIO_CI_SRC: "src"
|
|
WIFI_SSID:
|
|
from_secret: WIFI_SSID
|
|
WIFI_PASSWD:
|
|
from_secret: WIFI_PASSWD
|
|
WIFI_SSID2:
|
|
from_secret: WIFI_SSID2
|
|
WIFI_PASSWD2:
|
|
from_secret: WIFI_PASSWD2
|
|
WIFI_SSID3:
|
|
from_secret: WIFI_SSID3
|
|
WIFI_PASSWD3:
|
|
from_secret: WIFI_PASSWD3
|
|
MQTT_BROKER_URI:
|
|
from_secret: MQTT_BROKER_URI
|
|
MQTT_USERNAME:
|
|
from_secret: MQTT_USERNAME
|
|
MQTT_PASSWORD:
|
|
from_secret: MQTT_PASSWORD
|
|
commands:
|
|
- pip install -U platformio
|
|
- platformio run
|
|
- platformio ci --lib="script" --project-conf platformio.ini --board=lolin_d32_pro --build-dir="build" --keep-build-dir
|
|
# prepare deployment
|
|
- mkdir deploy
|
|
- cp .pio/build/lolin_d32_pro/firmware.bin deploy/${DRONE_REPO_NAME}.bin
|
|
- cp version.txt deploy/${DRONE_REPO_NAME}.bin.version
|
|
|
|
- name: gitea_release
|
|
image: plugins/gitea-release
|
|
settings:
|
|
api_key:
|
|
from_secret: gitea_token
|
|
base_url: https://dev.xd0.de
|
|
files:
|
|
- .pio/build/lolin_d32_pro/*.bin
|
|
when:
|
|
event: tag
|
|
|
|
- name: deploy
|
|
image: appleboy/drone-scp
|
|
settings:
|
|
host: 172.16.85.15
|
|
target: /var/www/fwupdate/fota
|
|
source:
|
|
- deploy/${DRONE_REPO_NAME}.bin
|
|
- deploy/${DRONE_REPO_NAME}.bin.version
|
|
#rm: true
|
|
strip_components: 1
|
|
username:
|
|
from_secret: ssh_username
|
|
password:
|
|
from_secret: ssh_password
|
|
port:
|
|
from_secret: ssh_port
|
|
when:
|
|
event: tag
|
|
|
|
- name: notify
|
|
image: drillster/drone-email
|
|
settings:
|
|
host: mail.xd0.de
|
|
from: drone@xd0.de
|
|
recipients:
|
|
- hendrik+dev@xd0.de
|
|
when:
|
|
status: [ changed, failure ]
|
|
|