Hello all.
My idea is to run a pipeline in Azure, that it will import a CSV or JSON file into the VM running the ignition gateway. (This part is already working)
Once the file is in there, I then want to run a HTTP POST command from Azure Pipeline in order to trigger a Gateway Event Message in Ignition gateway side.
The problem is that I run everything on pipeline without any errors, however my Gateway Event Message is not being triggered.
This is my Azure Pipeline YML script:
- powershell: |
Write-Host "Calling Ignition Message Handler RunCSVImport..."
$url = "http://<My-IP>:8088/system/gateway/message/global-project/RunCSVImport"
$username = "$(IGN_USER)"
$password = "$(IGN_PASS)"
$pair = "${username}:${password}"
$base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes($pair))
Invoke-RestMethod -Uri $url -Method POST -Headers @{Authorization=("Basic {0}" -f $base64AuthInfo)} -ContentType "application/json" -Body "{}"
displayName: "Trigger CreateTagsByCSV"
This is my Gateway Event Message (RunCSVImport):
def handleMessage(payload):
import system
system.util.getLogger("RunCSVImport").info("Message Handler Triggered!")
system.util.getLogger("RunCSVImport").info("Payload received: %s" % str(payload))
The message right now just contains logging information as I wanted to debug what was going on, however, checking the logs on Ignition side, I can’t see anything related.
Where can I find more information related with this subject?
Best Regards.