aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRiku Voipio <riku.voipio@linaro.org>2015-01-19 14:08:01 +0200
committerRiku Voipio <riku.voipio@linaro.org>2015-01-19 14:08:01 +0200
commit3b3432653c19b99d81b4c4651907b7ee36a192ca (patch)
tree0034c2e8097bf923ee8f65952a3cecacb939c0cb
parent0cbf2d2a3e02f592b87e805f71800ed5bf863760 (diff)
Add NOTIFY_URL feature for pingback
New parameter NOTIFY_URL allows pushing the ip of the device to an HTTP server. The HTTP service or a script polling the server can then trigger opening the hacking session automatically, avoiding the need of watching IRC and copypasting commands. Change-Id: Id3ba767ef66a03cb540e8d517b43fa6c3548b735 Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
-rw-r--r--README.rst1
-rw-r--r--hacking-session-debian.yaml1
-rwxr-xr-xinvoke_session_debian5
3 files changed, 7 insertions, 0 deletions
diff --git a/README.rst b/README.rst
index 9fd7722..222d112 100644
--- a/README.rst
+++ b/README.rst
@@ -13,6 +13,7 @@ Parameters
* PUB_KEY - A plain-text string containing the ssh public key(s) you wish to use to connect to the device over ssh
* IRC_NICK - An IRC nickname to notify when ready (Debian only)
* IRC_SERVER - The IRC server to use (Debian only)
+ * NOTIFY_URL - Url to notify when ready
* testdef - The test definition (distrbution specific)
* **hacking-session-debian.yaml** - run the hacking session on a Debian
diff --git a/hacking-session-debian.yaml b/hacking-session-debian.yaml
index 47fbee3..ae13461 100644
--- a/hacking-session-debian.yaml
+++ b/hacking-session-debian.yaml
@@ -17,4 +17,5 @@ run:
- ./setup_session_debian "$PUB_KEY"
- export IRC_SERVER
- export IRC_USER
+ - export NOTIFY_URL
- ./invoke_session_debian "$GATEWAY"
diff --git a/invoke_session_debian b/invoke_session_debian
index c01ab48..4c78166 100755
--- a/invoke_session_debian
+++ b/invoke_session_debian
@@ -45,6 +45,11 @@ ${SSH_COMMAND}
EOF
fi
fi
+if [ ! -z "${NOTIFY_URL}" ]; then
+ if apt-get install -qq wget; then
+ wget -O - "${NOTIFY_URL}?ssh=${ip_addr}"
+ fi
+fi
echo ""
mkdir -p /run
mkdir -p /run/hacking