Jenkins integration with Grunt

前端 未结 5 919
离开以前
离开以前 2020-12-09 09:40

I\'ve setup Jenkins v1.550 on Windows Server 2008 R2. It runs as a service at http://localhost:8080 for now. I\'m logged into the machine as an Administrator. I

5条回答
  •  一向
    一向 (楼主)
    2020-12-09 10:25

    I have grunt doing some tasks for me in Jenkins, but I went the npm script route. Grunt and grunt-cli are dev dependencies, and I have the following defined in my package.json file:

    "scripts": {
        "test": "node node_modules/grunt-cli/bin/grunt test"
    },
    

    In Jenkins (running on Windows), I added two post-build tasks:

    npm install
    
    npm test
    

    We just installed NodeJs normally on the Jenkins server.

提交回复
热议问题