Skip to content

Instantly share code, notes, and snippets.

View charlottestjohn's full-sized avatar

Charlotte St. John charlottestjohn

View GitHub Profile
@charlottestjohn
charlottestjohn / check_deploy_hashes.go
Last active August 29, 2015 14:13
Checks the git hash inside of /opt/sendgrid/[dir]/current to verify all servers got the correct release installed
package main
import (
"bytes"
"flag"
"os"
"os/exec"
"time"
)
@charlottestjohn
charlottestjohn / example.go
Created January 9, 2015 17:53
Go script that should work, but doesn't with grep. Replace "grep & "-v bees" with "wc" and "-l" to get it to work.
package main
import (
"os"
"os/exec"
)
func main() {
karg0 := "ls"
karg1 := "-al"
+-----------------------------------------+----------+-----------------------------------------------------------+---------+
| ref | pack | description | enabled |
+-----------------------------------------+----------+-----------------------------------------------------------+---------+
| chatops.notify | chatops | Notification rule to send results of action executions to | True |
| | | stream for chatops | |
| hubot.notify_hubot | hubot | Notification rule to send messages to Hubot | True |
| hubot.restart_hubot | hubot | Restart local hubot instance. | False |
| packtest.build_jobs | packtest | Build jobs for lazy developers. | True |
| packtest.inception
2015-12-23T01:23:02.717590+00:00 localhost st2rulesengine[12473]: INFO 140445298568080 log [-] Found 0 rules defined for trigger st2.generic.actiontrigger (type=core.st2.generic.actiontrigger)
2015-12-23T01:23:02.718608+00:00 localhost st2rulesengine[12473]: DEBUG 140445298568080 log [-] [1st_pass] 0 rule(s) found to enforce for st2.generic.actiontrigger.
2015-12-23T01:23:02.719485+00:00 localhost st2rulesengine[12473]: DEBUG 140445298568080 log [-] [2nd_pass] 0 rule(s) found to enforce for st2.generic.actiontrigger.
2015-12-23T01:23:02.720428+00:00 localhost st2rulesengine[12473]: INFO 140445298568080 log [-] 0 rule(s) found to enforce for st2.generic.actiontrigger.
2015-12-23T01:23:02.721660+00:00 localhost st2rulesengine[12473]: INFO 140445298568080 log [-] Matched 0 rule(s) for trigger_instance st2.generic.actiontrigger (type=core.st2.generic.actiontrigger)
---
name: "stagelockalias"
description: "Unlock, Unlock all, Lock, or Read a list of repos"
action_ref: packtest.stagelock
formats:
- "stagelock {{action}} {{repos}}"
- "sl {{action}} {{repos}}"
ack:
format: "roar"
result:
---
chain:
-
name: stagelock_driver
ref: core.local
params:
cmd: "/opt/stackstorm/packs/packtest/actions/stagelock_driver"
vagrant@ip-192-168-33-10:~$ st2 execution get 569565315c8d971f0ab40772
/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/connectionpool.py:791: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html
InsecureRequestWarning)
/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/connectionpool.py:791: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html
InsecureRequestWarning)
id: 569565315c8d971f0ab40772
action.ref: packtest.stagelock
status: failed
error: /opt/stackstorm/packs/packtest/actions/stagelock_driver:10:in `<main>': aakldsfjakldf (RuntimeError)
traceback: None
+-----------------+--------------------------------------------------------------+
| Property | Value |
+-----------------+--------------------------------------------------------------+
| id | 569568095c8d971f0ab4077e |
| action.ref | packtest.stagelock |
| context.user | chatops_bot |
| parameters | { |
| | "action": "unlock", |
| | "repos": "apid" |
| | } |
---
name: "notify_hipchat_status_room"
pack: "packtest"
description: "Notify specific hipchat room of announcements"
enabled: true
trigger:
type: "core.st2.generic.notifytrigger"
parameters: {}
+-----------------+--------------------------------------------------------------+
| Property | Value |
+-----------------+--------------------------------------------------------------+
| id | 56956bc85c8d97032ce25319 |
| trigger | core.st2.generic.actiontrigger |
| occurrence_time | 2016-01-12T21:10:32.210000Z |
| payload | { |
| | "status": "succeeded", |
| | "start_timestamp": "2016-01-12 21:10:30.813292+00:00", |
| | "parameters": { |