g0t4 / solitaire-systemjs-course Goto Github PK
View Code? Open in Web Editor NEWStarting sample project for my Pluralsight course on SystemJS/jspm
License: Other
Starting sample project for my Pluralsight course on SystemJS/jspm
License: Other
when i runing a jenkins job
stage 'CI'
node {
git branch: 'jenkins2-course',
url: 'https://github.com/g0t4/solitaire-systemjs-course'
// pull dependencies from npm
// on windows use: bat 'npm install'
env.PATH = "/usr/local/node/bin/:/usr/local/phantomjs/bin/:${env.PATH}"
sh 'npm install'
// stash code & dependencies to expedite subsequent testing
// and ensure same code & dependencies are used throughout the pipeline
// stash is a temporary archive
stash name: 'everything',
excludes: 'test-results/**',
includes: '**'
// test with PhantomJS for "fast" "generic" results
// on windows use: bat 'npm run test-single-run -- --browsers PhantomJS'
sh 'npm run test-single-run -- --browsers PhantomJS'
// archive karma test results (karma is configured to export junit xml files)
step([$class: 'JUnitResultArchiver',
testResults: 'test-results/**/test-results.xml'])
}
def notify(status){
emailext (
to: "[email protected]",
subject: "${status}: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]'",
body: """<p>${status}: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]':</p>
<p>Check console output at <a href='${env.BUILD_URL}'>${env.JOB_NAME} [${env.BUILD_NUMBER}]</a></p>""",
)
}
have a error at npm run test-single-run -- --browsers PhantomJS
[solitaire pipeline] Running shell script
+ npm run test-single-run -- --browsers PhantomJS
> [email protected] test-single-run /var/jenkins_home/workspace/solitaire pipeline
> karma start karma.conf.js --single-run "--browsers" "PhantomJS"
�[33m07 06 2017 02:57:38.861:WARN [watcher]: �[39mPattern "/var/jenkins_home/workspace/solitaire pipeline/app/bower_components/angular/angular.js" does not match any file.
�[33m07 06 2017 02:57:38.864:WARN [watcher]: �[39mPattern "/var/jenkins_home/workspace/solitaire pipeline/app/bower_components/angular-route/angular-route.js" does not match any file.
�[33m07 06 2017 02:57:38.865:WARN [watcher]: �[39mPattern "/var/jenkins_home/workspace/solitaire pipeline/app/bower_components/angular-mocks/angular-mocks.js" does not match any file.
�[33m07 06 2017 02:57:38.865:WARN [watcher]: �[39mPattern "/var/jenkins_home/workspace/solitaire pipeline/app/bower_components/underscore/underscore.js" does not match any file.
�[33m07 06 2017 02:57:38.892:WARN [karma]: �[39mPort 9876 in use
�[33m07 06 2017 02:57:38.893:WARN [karma]: �[39mPort 9877 in use
�[32m07 06 2017 02:57:38.893:INFO [karma]: �[39mKarma v0.13.22 server started at http://localhost:9878/
�[32m07 06 2017 02:57:38.901:INFO [launcher]: �[39mStarting browser PhantomJS
�[32m07 06 2017 02:57:39.099:INFO [PhantomJS 2.1.1 (Linux 0.0.0)]: �[39mConnected on socket 4pHDy2Y0mbXAky7VAAAA with id 40750653
PhantomJS 2.1.1 (Linux 0.0.0) ERROR
ReferenceError: Can't find variable: angular
at /var/jenkins_home/workspace/solitaire pipeline/app/klondike/board.js:4
PhantomJS 2.1.1 (Linux 0.0.0) ERROR
ReferenceError: Can't find variable: angular
at /var/jenkins_home/workspace/solitaire pipeline/app/klondike/game.js:4
�[31m07 06 2017 02:57:39.178:ERROR [karma]: �[39mTypeError: Cannot read property '40750653' of null
at JUnitReporter.onBrowserComplete (/var/jenkins_home/workspace/solitaire pipeline/node_modules/karma-junit-reporter/index.js:102:23)
at Server.<anonymous> (/var/jenkins_home/workspace/solitaire pipeline/node_modules/karma/lib/events.js:13:22)
at emitTwo (events.js:111:20)
at Server.emit (events.js:191:7)
at Browser.onComplete (/var/jenkins_home/workspace/solitaire pipeline/node_modules/karma/lib/browser.js:142:13)
at Socket.<anonymous> (/var/jenkins_home/workspace/solitaire pipeline/node_modules/karma/lib/events.js:13:22)
at emitTwo (events.js:111:20)
at Socket.emit (events.js:191:7)
at /var/jenkins_home/workspace/solitaire pipeline/node_modules/socket.io/lib/socket.js:503:12
at _combinedTickCallback (internal/process/next_tick.js:73:7)
at process._tickCallback (internal/process/next_tick.js:104:9)
npm ERR! Linux 3.10.0-514.el7.x86_64
npm ERR! argv "/usr/local/node-v6.11.0-linux-x64/bin/node" "/usr/local/node/bin/npm" "run" "test-single-run" "--" "--browsers" "PhantomJS"
npm ERR! node v6.11.0
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! [email protected] test-single-run: `karma start karma.conf.js --single-run "--browsers" "PhantomJS"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] test-single-run script 'karma start karma.conf.js --single-run "--browsers" "PhantomJS"'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the solitaire package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! karma start karma.conf.js --single-run "--browsers" "PhantomJS"
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs solitaire
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls solitaire
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /var/jenkins_home/workspace/solitaire pipeline/npm-debug.log
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR: script returned exit code 1
Finished: FAILURE
the system is centos7
the jenkins runing on docker
the npm and phantomjs is installed
root@jenkins:/var/jenkins_home/workspace/solitaire pipeline# phantomjs -v
2.1.1
root@jenkins:/var/jenkins_home/workspace/solitaire pipeline# npm -v
3.10.10
it seems there is an issue with http-server 0.8.4 running on windows 7 french.
upgrading the dependency to "http-server": "^0.9.0" fixed it.
The jenkins build fails with
npm ERR! path /var/jenkins_home/workspace/solitaire/node_modules/http-server/bin/http-server
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod
npm ERR! enoent ENOENT: no such file or directory, chmod '/var/jenkins_home/workspace/solitaire/node_modules/http-server/bin/http-server'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
As suggested in https://stackoverflow.com/questions/17990647/npm-install-errors-with-error-enoent-chmod, creating a .npmignore
fixes the issue.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.