This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config.vm.network "forwarded_port", guest: 8080, host: 8080 | |
config.vm.network "forwarded_port", guest: 8000, host: 8000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config.vm.provider "virtualbox" do |vb| | |
vb.name = "git-jenkins-pof" | |
vb.memory = "2048" | |
vb.cpus = 2 | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config.vm.provision "docker" do |d| | |
d.run "jenkinsci/jenkins", | |
args: "--name jenkins -p '8000:8000' -p '5000:5000' --network=host" | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "git-jenkins-ci-cd", | |
"description": "git-jenkins-ci-cd test app", | |
"version": "0.0.1", | |
"private": true, | |
"dependencies": { | |
"express": "3.12.0" | |
}, | |
"devDependencies": { | |
"mocha": "1.20.1", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Express framework | |
var express = require('express'); | |
var app = express(); | |
// Handle requests to / | |
app.get('/', function (req, res) { | |
res.send('Hello World!'); | |
}); | |
// Setup port |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:4-onbuild | |
MAINTAINER Bryan CS <[email protected]> | |
ADD . /var/www/srv | |
WORKDIR /var/www/srv | |
RUN npm install | |
CMD ["nodejs", "app.js"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var request = require('supertest'); | |
var app = require('../app.js'); | |
describe('GET /', function() { | |
it('respond with hello world', function(done) { | |
request(app).get('/').expect('Hello World!', done); | |
}); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
./node_modules/.bin/mocha ./test/test.js |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RUN chmod +x ./test/test.sh | |
RUN ./test/test.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chmod +x deploy.sh | |
./deploy.sh |
OlderNewer