UNPKG

909 Btext/coffeescriptView Raw
1GulpCfn = require("./lib/gulp_cfn")
2NodeCfn = require("node-cfn")
3gulp = require("gulp")
4
5new GulpCfn(gulp,
6 release_names:
7 adjectives: [
8 "beautiful", "kind", "gracious", "humble", "present"
9 ]
10 nouns: [
11 "mind", "body", "spirit", "nature", "tao", "pugs"
12 ]
13 stacks:
14 test:
15 cfn: "example/cfn.coffee"
16 deployFail: (cfn) ->
17 console.log "The CloudFormation deploy failed :("
18 deploySuccess: (cfn) ->
19 api = new NodeCfn.Aws.Api.Ec2()
20 name = cfn.stack.params.stack_name
21
22 console.log "Getting EC2 instance info..."
23
24 api.listInstances(
25 Filters: [
26 Name: "tag:aws:cloudformation:stack-name"
27 Values: [ name ]
28 ]
29 ).then (output) ->
30 console.log JSON.stringify(output, null, 2)
31 restartSuccess: (instances) ->
32 console.log JSON.stringify(instances, null, 2)
33)