Node.js meets jenkins

Post on 29-Nov-2014

4.802 views 0 download

description

A presentation for my "Node.js Meets Jenkins, Gradle and Chef!" at Jenkins User Conference 2013 in Israel: https://www.youtube.com/watch?v=jPA1iwZ0zk8

Transcript of Node.js meets jenkins

My  name  is  Evgeny

@jenkinsconf

Polyglot  Programming

@jenkinsconf

Polyglot  Tooling

@jenkinsconf

 Node.js  meetsJenkins,  Gradle,  Chef

Evgeny  Goldin,  Trademob  GmbH

June  06,  2013

and Artifactory!

@jenkinsconf

What’s  in  it  for  you?

@jenkinsconf

Automation

@jenkinsconf

@jenkinsconf

$ npm install$ node date.js$ forever start date.js$ forever stop date.js

Easy?

@jenkinsconf

@jenkinsconf

Boostrap  and  versioning

@jenkinsconf

npm  install

@jenkinsconf

@jenkinsconf

@jenkinsconf

Before  and  after  listeners

Mongo,  Redis,  Cake,  Grunt

@jenkinsconf

Verified  start  and  stop

@jenkinsconf

Startup  scripts

@jenkinsconf

..  and  then  some  more

@jenkinsconf

@jenkinsconfhttp://www.shimweasel.com/hs_gbu/

Recipes  controlled  by  Ops

@jenkinsconf

Not  Devs!

@jenkinsconf

Stored  in  a  separate  repo

@jenkinsconf

Uploaded  to  Chef  Server

@jenkinsconf

..  and  getting  messy  

@jenkinsconf

Provisioning  !=  Build

@jenkinsconf

@jenkinsconfhttp://www.shimweasel.com/hs_gbu/

Wouldn’t  it  be  cool  if  ..

@jenkinsconf

Node.js

Gradle

Jenkins

Chef

http://www.shimweasel.com/hs_gbu/

./gradlew  -­‐i  setup

./gradlew  -­‐i  test

./gradlew  -­‐i  start

./gradlew  -­‐i  stop

@jenkinsconf

./build/setup.sh

./build/test.sh

./build/start.sh

./build/stop.sh

@jenkinsconf

npm  install  ?

@jenkinsconf

@jenkinsconf

package.json

@jenkinsconf

checksum+

tar.gz+

PUT  /  GET

Coming  next:

*.deb

upstart

@jenkinsconf

Monitoring

@jenkinsconf

http(s)://host:port

@jenkinsconf

10  boxes,  5  ports  each

50  combinations!

..  plus  https

@jenkinsconf

Wouldn’t  it  be  cool  if  ..

@jenkinsconf

http(s)://<host:port>

http(s)://<host>|<status  code>

http(s)://<host>|<status  code>|<matcher(s)>

http(s)://<host>|<status  code>|<matchers>|<time  limit  (ms)>

http(s)://<host>|<status  code>|<matchers>|<time  limit>|<user>|<pass>

E.g.  https://github.com/evgeny-­‐goldin/chef-­‐repo|404|-­‐/\d+\+?\s+commits/

@jenkinsconf

                 Positive  matcher                              :  matcher

                 Negative  matcher                          :  -­‐matcher

                 Contains  matcher                            :  text

                 Regex  matcher                                    :  /regex/

                 JSON  matcher                                        :  {  json  }  or  [  json  ]

               Multiple  matchers                            :  m1  *  m2  *  m3

@jenkinsconf

Coming  next:

PagerDuty

@jenkinsconf

What’s  in  it  for  you?

@jenkinsconf

                                                                             Go  get  it!      buildscript  {        repositories          {  maven  {  url  'http://jcenter.bintray.com'  }}        dependencies  {  classpath          'com.github.goldin.plugins.gradle:node:0.3',                                                                                                                    'com.github.goldin.plugins.gradle:monitor:0.3'  }}

@jenkinsconf

evgeny-­‐goldin.org/jenkinsbitbucket.org/evgenyg/uptime-­‐ec2bitbucket.org/evgenyg/monitorevgeny-­‐goldin.com/wiki/Gradle-­‐node-­‐pluginevgeny-­‐goldin.com/wiki/Gradle-­‐monitor-­‐plugin

Warm  regards,Evgeny  Goldin

evgenyg@gmail.com@evgeny_goldin

@jenkinsconf

Many  thanks  to  our  sponsors!

@jenkinsconf

Lunch  time!

@jenkinsconf