#OSCON
@GeekGoneNomad
#OSCON
@GeekGoneNomad
#OSCON
@GeekGoneNomad
#OSCON
@GeekGoneNomad
#OSCON
@GeekGoneNomad
#OSCON
@GeekGoneNomad
#OSCON
@GeekGoneNomad
#OSCON
@GeekGoneNomad
#OSCON
@GeekGoneNomad
#OSCON
@GeekGoneNomad
#OSCON
@geekgonenomad
#OSCON
@geekgonenomad
...a development practice that requires developers to integrate code into a shared repository several times a day. Each check-in is then verified by an automated build, allowing teams to detect problems early.
–https://www.thoughtworks.com/continuous-integration
#OSCON
@geekgonenomad
...a development practice that requires developers to integrate code into a shared repository several times a day. Each check-in is then verified by an automated build, allowing teams to detect problems early.
#OSCON
@geekgonenomad
...a development practice that requires developers to integrate code into a shared repository several times a day. Each check-in is then verified by an automated build, allowing teams to detect problems early.
#OSCON
@geekgonenomad
...a development practice that requires developers to integrate code into a shared repository several times a day. Each check-in is then verified by an automated build, allowing teams to detect problems early.
#OSCON
@geekgonenomad
...a development practice that requires developers to integrate code into a shared repository several times a day. Each check-in is then verified by an automated build, allowing teams to detect problems early.
#OSCON
@geekgonenomad
...a development practice that requires developers to integrate code into a shared repository several times a day. Each check-in is then verified by an automated build, allowing teams to detect problems early.
#OSCON
@GeekGoneNomad
#OSCON
@GeekGoneNomad
#OSCON
@GeekGoneNomad
#OSCON
@GeekGoneNomad
#OSCON
@GeekGoneNomad
#OSCON
@GeekGoneNomad
#OSCON
@GeekGoneNomad
#OSCON
@GeekGoneNomad
#OSCON
@GeekGoneNomad
#OSCON
@GeekGoneNomad
#OSCON
@GeekGoneNomad
#OSCON
@GeekGoneNomad
language: node_js
node_js:
- "stable"
- "5.1"
- "4"
Node.js
PHP
Python
Java
Ruby
GO
Objective-C
Perl
Android
C
C#
C++
Clojure
Crystal
Haskell
Julia
Perl6
Rust
Scala
Haxe
Dart
...
#OSCON
@GeekGoneNomad
#OSCON
@GeekGoneNomad
#OSCON
@GeekGoneNomad
# THIS PROJECT USES NODE.JS
language: node_js
# BUILD USING THE LATEST STABLE VERSION OF NODE
node_js:
- "stable"
# RUN OUR TESTS BY CALLING MOCHA
script: mocha
#OSCON
@GeekGoneNomad
#OSCON
@GeekGoneNomad
#OSCON
@GeekGoneNomad
0.37s$ git clone --depth=50 --branch=master https://github.com/ktyacke/travis-node-example.git ktyacke/travis-node-example
Cloning into 'ktyacke/travis-node-example'...
remote: Counting objects: 75, done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 75 (delta 1), reused 1 (delta 1), pack-reused 68
Unpacking objects: 100% (75/75), done.
Checking connectivity... done.
$ cd ktyacke/travis-node-example
$ git checkout -qf 55d11fa1be7c186db1bd4b154b3cc343be17534a
This job is running on container-based infrastructure, which does not allow use of 'sudo', setuid and setguid executables.
If you require sudo, add 'sudo: required' to your .travis.yml
See https://docs.travis-ci.com/user/workers/container-based-infrastructure/ for details.
1.60s$ nvm install stable
######################################################################## 100.0%
Checksums empty
Now using node v5.8.0
$ node --version
v5.8.0
$ npm --version
3.7.3
$ nvm --version
0.23.3
install
2.57s$ npm install
npm WARN deprecated graceful-fs@2.0.3: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible.
travis-node-example@1.0.0 /home/travis/build/ktyacke/travis-node-example
├─┬ chai@3.5.0
│ ├── assertion-error@1.0.1
│ ├─┬ deep-eql@0.1.3
│ │ └── type-detect@0.1.1
│ └── type-detect@1.0.0
└─┬ mocha@2.4.5
├── commander@2.3.0
├─┬ debug@2.2.0
│ └── ms@0.7.1
├── diff@1.4.0
├── escape-string-regexp@1.0.2
├─┬ glob@3.2.3
│ ├── graceful-fs@2.0.3
│ ├── inherits@2.0.1
│ └─┬ minimatch@0.2.14
│ ├── lru-cache@2.7.3
│ └── sigmund@1.0.1
├── growl@1.8.1
├─┬ jade@0.26.3
│ ├── commander@0.6.1
│ └── mkdirp@0.3.0
├─┬ mkdirp@0.5.1
│ └── minimist@0.0.8
└── supports-color@1.2.0
0.60s$ npm test
> travis-node-example@1.0.0 test /home/travis/build/ktyacke/travis-node-example
> mocha
hello
✓ Returns a string of hello plus the name that was passed.
1 passing (10ms)
The command "npm test" exited with 0.
Done. Your build exited with 0.
#OSCON
@GeekGoneNomad
#OSCON
@GeekGoneNomad
INSTALL
before_install
install
BUILD
before_script
script
after_success
after_failure
after_script
DEPLOY
before_deploy
deploy
after_deploy
#OSCON
@GeekGoneNomad
INSTALL
before_install
install
BUILD
before_script
script
after_success
after_failure
after_script
DEPLOY
before_deploy
deploy
after_deploy
#OSCON
@GeekGoneNomad
INSTALL
before_install
install
BUILD
before_script
script
after_success
after_failure
after_script
DEPLOY
before_deploy
deploy
after_deploy
#OSCON
@GeekGoneNomad
INSTALL
before_install
install
BUILD
before_script
script
after_success
after_failure
after_script
DEPLOY
before_deploy
deploy
after_deploy
#OSCON
@GeekGoneNomad
#OSCON
@GeekGoneNomad
#OSCON
@GeekGoneNomad
language: node_js
node_js:
- stable
script:
- mocha
#OSCON
@GeekGoneNomad
#OSCON
@GeekGoneNomad
#OSCON
@GeekGoneNomad
#OSCON
@GeekGoneNomad
language: node_js
node_js:
- stable
before_script:
- npm install -g jscs
script:
- jscs src
- mocha
#ConfHandle
@geekgonenomad
#OSCON
@GeekGoneNomad
#OSCON
@GeekGoneNomad
MySQL
PosgreSQL
SQLite3
MongoDB
CouchDB
Redis
#OSCON
@GeekGoneNomad
services:
- couchdb
before_script:
- curl -X PUT http://127.0.0.1:5984/travis-node-demo
- curl -X GET http://127.0.0.1:5984/_all_dbs
#OSCON
@GeekGoneNomad
#OSCON
@GeekGoneNomad
$ sudo service couchdb start
couchdb start/running, process 2303
$ curl -X PUT http://127.0.0.1:5984/travis-node-demo
{"ok":true}
$ curl -X GET http://127.0.0.1:5984/_all_dbs
["_replicator","_users","travis-node-demo"]
#OSCON
@GeekGoneNomad
Heroku
NPM
PyPi
Amazon S3
RubyGems
Github
#OSCON
@GeekGoneNomad
before_deploy:
- npm version patch
deploy:
provider: npm
email: ktyacke@gmail.com
api_key:
secure: XXXXXXXXXXXXX
on:
tags: true
repo: ktyacke/travis-node-example
all_branches: true
#OSCON
@GeekGoneNomad
# ENCRYPT AND ADD KEY TO CONFIG
travis encrypt YOUR_API_KEY --add deploy.api_key
# USE CLI TO ADD DEPLOYMENT PROVIDER
travis setup npm
#OSCON
@GeekGoneNomad
#OSCON
@GeekGoneNomad
Installing deploy dependencies
Preparing deploy
NPM version: 3.8.3
Authenticated with email ktyacke@gmail.com
Cleaning up git repository with `git stash --all`. If you need build artifacts for deployment, set `deploy.skip_cleanup: true`.
See https://docs.travis-ci.com/user/deployment/#Uploading-Files.
Deploying application
NPM API key format changed recently. If your deployment fails, check your API key in ~/.npmrc.
http://docs.travis-ci.com/user/deployment/npm/
~/.npmrc size: 48
+ travis-node-example@1.0.4
#OSCON
@GeekGoneNomad
IRC
HipChat
Slack
Webhooks
#OSCON
@GeekGoneNomad
notifications:
email:
recipients:
- foo@bar.com
on_success: always
on_failure: always
slack:
rooms:
- secure: XXXXXXXXXXXXX
on_success: always
on_failure: always
on_start: always
#OSCON
@GeekGoneNomad
# ENCRYPT AND ADD TOKEN TO CONFIG
travis encrypt "<account>:<token>" --add notifications.slack.rooms
#OSCON
@GeekGoneNomad
#OSCON
@GeekGoneNomad
#OSCON
@GeekGoneNomad
#OSCON
@GeekGoneNomad