forked from screwdriver-cd-test/quickstart-nodejs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7bad4fc
commit 7a253ea
Showing
4 changed files
with
81 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,31 @@ | ||
# quickstart-nodejs | ||
# quickstart-nodejs | ||
|
||
Node.js sample application for Screwdriver | ||
|
||
## Pipeline | ||
|
||
### Fail to Publish | ||
|
||
The `publish` job is properly defined in the `screwdriver.yaml`. The package is purposely configured to fail. | ||
|
||
Given that this package is basic, we don't want to flood the NPM Registry with quickstart modules. The included `package.json` file contains a `private: true` flag to safeguard against publishing to the NPM Registry. | ||
|
||
## Dev | ||
|
||
### Requirements | ||
|
||
* [NodeJS](https://nodejs.org/en/) | ||
* NPM (included in the NodeJS package) | ||
|
||
### Install dependencies | ||
|
||
``` | ||
$ npm install | ||
``` | ||
|
||
### Run tests | ||
|
||
``` | ||
$ npm test | ||
``` | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
'use strict'; | ||
|
||
module.exports = () => { | ||
return 'Hello Node'; | ||
}; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"name": "screwdriver-quickstart-nodejs", | ||
"version": "1.0.0", | ||
"description": "A quickstart repository, which serves as an example of how to use Screwdriver with NodeJS", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "mocha" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/screwdriver-cd-test/quickstart-nodejs.git" | ||
}, | ||
"keywords": [ | ||
"screwdriver", | ||
"screwdriver-cd", | ||
"yahoo", | ||
"continuous delivery", | ||
"cd", | ||
"continuous integration", | ||
"ci" | ||
], | ||
"author": "Darren Matsumoto <[email protected]>", | ||
"license": "BSD-3-Clause", | ||
"bugs": { | ||
"url": "https://github.com/screwdriver-cd-test/quickstart-nodejs/issues" | ||
}, | ||
"homepage": "https://github.com/screwdriver-cd-test/quickstart-nodejs#readme", | ||
"private": true, | ||
"devDependencies": { | ||
"chai": "^3.5.0", | ||
"mocha": "^3.2.0" | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
'use strict'; | ||
|
||
const expect = require('chai').expect; | ||
|
||
describe('Index Unit Test', () => { | ||
it('works', () => { | ||
const main = require('../'); | ||
const result = main(); | ||
|
||
expect(result).to.equal('Hello Node'); | ||
}); | ||
}); |