A cheap way to get build events from jenkins into graphite via statsd:
/usr/local/bin/buildstats
#!/bin/bash
. /etc/default/buildstats
echo "$BUILD_PREFIX.$JOB_NAME:1|c" | nc -w 1 -u $STATSD_SERVER $STATSD_PORT
/etc/default/buildstats:
A cheap way to get build events from jenkins into graphite via statsd:
/usr/local/bin/buildstats
#!/bin/bash
. /etc/default/buildstats
echo "$BUILD_PREFIX.$JOB_NAME:1|c" | nc -w 1 -u $STATSD_SERVER $STATSD_PORT
/etc/default/buildstats:
| package main | |
| import ( | |
| "fmt" | |
| "log" | |
| "net" | |
| ) | |
| func handleUDPConnection(conn *net.UDPConn) { |
NOTE: my endpoint is http://localhost:7000. Your endpoint will be different.
You must know the name of the s3 bucket and the s3 key (the path within the bucket) to the asset.
For our example today, I want to harvest the key 5aba86635fc9cbec3a81839abc0fc2a9.jpg inside the hancocktest bucket in s3.
| package main | |
| import ( | |
| "fmt" | |
| "log" | |
| "time" | |
| "golang.org/x/crypto/bcrypt" | |
| ) |
| package main | |
| import ( | |
| "errors" | |
| "fmt" | |
| "log" | |
| "math" | |
| "gopkg.in/yaml.v3" | |
| ) |
Generate two self-signed certificates:
openssl genrsa -out server1.key 2048
openssl req -new -x509 -sha256 -key server1.key -out server1.pem -days 3650
openssl genrsa -out server2.key 2048
openssl req -new -x509 -sha256 -key server2.key -out server2.pem -days 3650