Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drone config for building nodejs app #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pipeline:
build:
image: node:slim
commands:
- npm install
- npm test
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM node:onbuild
5 changes: 5 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
console.log('=========================================')
console.log('starting...')
console.log('running nodejs built by drone...')
console.log('done...')
console.log('=========================================')
6 changes: 6 additions & 0 deletions index.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const test = require('tape')

test('this always passes', t => {
t.pass()
t.end()
})
23 changes: 23 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "drone-nodejs-spike",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "node index.js",
"test": "tape *.spec.js"
},
"repository": {
"type": "git",
"url": "git+https://github.com/drone-demos/drone-with-nodejs.git"
},
"author": "",
"license": "ISC",
"bugs": {
"url": "https://github.com/drone-demos/drone-with-nodejs/issues"
},
"homepage": "https://github.com/drone-demos/drone-with-nodejs#readme",
"devDependencies": {
"tape": "^4.6.3"
}
}