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.
 
 

24 lines
600 B

apiVersion: tekton.dev/v1beta1
kind: Task
metadata:
name: ota-update
spec:
params:
- name: otaVersion
type: string
steps:
- name: ota-update
image: docker.io/library/eclipse-mosquitto:latest
env:
- name: OTA_MQTT_URL
valueFrom:
secretKeyRef:
name: "mqtt-config"
key: "OTA_MQTT_URL"
- name: OTA_VERSION
value: "$(params.otaVersion)"
script: |
#!/bin/sh
set -eu
echo "Sending the OTA firmware udate notification for version $OTA_VERSION..."
mosquitto_pub --retain -L "$OTA_MQTT_URL" -m "$OTA_VERSION" -d