Skip to content

Commit

Permalink
🔀 Merge pull request #111 from SaaShup/parse-image-output
Browse files Browse the repository at this point in the history
🐛 Determine if image was pulled by checking if digest is returned
  • Loading branch information
lvenier authored Jul 4, 2024
2 parents 3713008 + 93801fd commit 3512171
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 20 deletions.
61 changes: 42 additions & 19 deletions flows.json
Original file line number Diff line number Diff line change
Expand Up @@ -2749,7 +2749,7 @@
"y": 480,
"wires": [
[
"84d8b152e92556ef"
"5c79a22a8f9ad79f"
],
[],
[]
Expand Down Expand Up @@ -2813,7 +2813,7 @@
"from": "",
"to": "",
"reg": false,
"x": 780,
"x": 800,
"y": 480,
"wires": [
[
Expand Down Expand Up @@ -2855,7 +2855,7 @@
"property": "payload",
"action": "",
"pretty": false,
"x": 930,
"x": 1180,
"y": 560,
"wires": [
[
Expand All @@ -2875,7 +2875,7 @@
"winHide": false,
"oldrc": false,
"name": "images",
"x": 760,
"x": 1010,
"y": 560,
"wires": [
[
Expand Down Expand Up @@ -2904,7 +2904,7 @@
"from": "",
"to": "",
"reg": false,
"x": 1390,
"x": 1640,
"y": 500,
"wires": [
[
Expand Down Expand Up @@ -2966,7 +2966,7 @@
"from": "",
"to": "",
"reg": false,
"x": 1120,
"x": 1370,
"y": 560,
"wires": [
[
Expand All @@ -2991,7 +2991,7 @@
"authType": "",
"senderr": false,
"headers": [],
"x": 1330,
"x": 1580,
"y": 600,
"wires": [
[
Expand Down Expand Up @@ -3550,7 +3550,7 @@
"links": [
"36f439d2ba0ac71a"
],
"x": 1485,
"x": 1735,
"y": 600,
"wires": []
},
Expand All @@ -3568,7 +3568,7 @@
"type": "subflow:0455d311f0e53c09",
"z": "3ea1a4b04d852f38",
"name": "",
"x": 1350,
"x": 1900,
"y": 560,
"wires": []
},
Expand All @@ -3577,24 +3577,20 @@
"type": "switch",
"z": "3ea1a4b04d852f38",
"name": "",
"property": "$length(msg.payload)",
"propertyType": "jsonata",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "lte",
"v": "512",
"vt": "num"
"t": "false"
},
{
"t": "gt",
"v": "512",
"vt": "num"
"t": "true"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 1170,
"x": 1420,
"y": 480,
"wires": [
[
Expand Down Expand Up @@ -3624,7 +3620,7 @@
"from": "",
"to": "",
"reg": false,
"x": 1380,
"x": 1630,
"y": 460,
"wires": [
[
Expand All @@ -3641,6 +3637,33 @@
"y": 260,
"wires": []
},
{
"id": "5c79a22a8f9ad79f",
"type": "change",
"z": "3ea1a4b04d852f38",
"name": "find image digest in output",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "$count(\t $filter(\t $map(\t $split(payload, \"\\n\"),\t function($v) {\t $v != \"\" ? $eval($v)\t }\t ),\t function($v) {\t $match(\t $string($v.status),\t /^Digest:/\t )\t }\t )\t) > 0",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1210,
"y": 480,
"wires": [
[
"84d8b152e92556ef"
]
]
},
{
"id": "dcf35b57666a30f9",
"type": "http in",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "netbox-docker-agent",
"version": "0.29.1",
"version": "0.29.2",
"description": "Saashup agent for netbox manager",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 3512171

Please sign in to comment.