GitHub webhooks for a URL by default only fire on repo pushes. There appears to be no way in the web UI to set up webhooks for other events. And so we go to the API. I prefer to do this type of thing with Hurl.
{
"name": "web",
"active": true,
@echo off | |
SET tfs=http://YOUR_TFS_SERVER:8080/ | |
:number | |
ECHO Enter changeset number (0 to exit): | |
SET /p chg= | |
IF NOT %chg% GTR 0 GOTO end | |
"%ProgramFiles%\Microsoft Visual Studio 9.0\Common7\IDE\TF.exe" changeset /server:%tfs% %chg% /noprompt | |
GOTO number | |
:end |
GitHub webhooks for a URL by default only fire on repo pushes. There appears to be no way in the web UI to set up webhooks for other events. And so we go to the API. I prefer to do this type of thing with Hurl.
{
"name": "web",
"active": true,
var AWS = require('aws-sdk'); | |
exports.handler = function(event, context) { | |
var ec2 = new AWS.EC2({region: 'us-east-1'}); | |
ec2.startInstances({InstanceIds : ['i-0114833f8ffc9151c'] },function (err, data) { | |
if (err) console.log(err, err.stack); | |
else console.log(data); | |
context.done(err,data); | |
}); | |
}; |
Link to these links: https://git.io/vKSVZ
Module 1:
jenkins -jar jenkins.war
docker run -d \
--restart unless-stopped \
--name jenkins \
#!/bin/bash | |
yum install httpd -y | |
/sbin/chkconfig --levels 235 httpd on | |
service httpd start | |
instanceId=$(curl http://169.254.169.254/latest/meta-data/instance-id) | |
region=$(curl http://169.254.169.254/latest/dynamic/instance-identity/document | grep region | awk -F\" '{print $4}') | |
echo "<h1>$instanceId</h1>" > /var/www/html/index.html | |
aws ec2 create-tags --resources "$instanceId" --tags Key=Name,Value="PROD-$instanceId" --region "$region" |
#!/usr/bin/env bash | |
set -e # exit on command errors | |
set -o nounset # abort on unbound variable | |
set -o pipefail # capture fail exit codes in piped commands | |
# set -x | |
# Config: | |
# ~/.ssh/config | |
# Host i-* |
| Title | Description