Issue #75 open

Create a CI build instance for betterrev

Mani Sarkar
created an issue

Like every project we should have a CI build instance for betterrev running on a regular basis on the http://adopt-openjdk.ci.cloudbees.com server.

We don't have a pom.xml file so investigate if the project can be built and if cloudbees supports play, scala, etc...

Comments (20)

  1. Mani Sarkar reporter

    We now have an instance of Betterrev running regularly on Adopt OpenJDK's Cloudbees instance @ https://adopt-openjdk.ci.cloudbees.com/job/betterrev/

    Currently its still pointing to Mani Sarkar's account, Martijn Verburg can you please add Cloudbees' SSH Key to Betterrev's SSH's key list in bitbucket,

    Cloudbees' SSH Key can be found on Betterrev's CloudBees configuration page.

    Once that is done, the Betterev config will need updating, i.e. the bitbucket url will need to point to Betterrev.git under AdoptOpenJDK organisation on Bitbucket. At the moment SBT is building the project successfully using SBT 0.13.1. I tried running play test and it failed as cloudbees still have play 1.12 running - on searching for support for play framework 2.0 I came across - http://wiki.cloudbees.com/bin/view/DEV/Playframework - Cloudbees answer to Play framework 2.0 on Cloudbees.

    Where does SBT create the artifacts when it builds successfully? Are we on the right path?

  2. Daniel Bryant

    Update sbt sub-directory to 'betterrev' as we have a nested directory structure within our repo

    Added 'test' action to build options.

    Build failed for unknown reasons?

  3. Daniel Bryant

    Thanks Martijn - I forgot to update this ticket yesterday.

    I have raised some points for discussion via the mailing list, and will update this ticket when a consensus is reached. In particular, we need to decide how to approach testing of the scripts and external resources.

    I will try and look at the failing tests this weekend.

  4. Mani Sarkar reporter

    So I started by doing a mvn clean install on my machine (Ubuntu 12.04 LTS), and got the below:

    [INFO] Running 'gulp dist --no-color' in /home/satyasai/LJCAdvocate/OpenJDKStuff/betterrev/betterrev/src/main/angularjsapp
    [INFO] [11:56:00] Using gulpfile ~/LJCAdvocate/OpenJDKStuff/betterrev/betterrev/src/main/angularjsapp/gulpfile.js
    [INFO] [11:56:00] Starting 'clean-build-test'...
    [INFO] [11:56:00] Starting 'clean-build'...
    [INFO] [11:56:00] Starting 'clean'...
    [INFO] [11:56:00] Finished 'clean' after 81 ms
    [INFO] [11:56:00] Starting 'assets'...
    [INFO] [11:56:00] Finished 'assets' after 2.95 ms
    [INFO] [11:56:00] Starting 'partials'...
    [INFO] [11:56:00] Finished 'partials' after 1.53 ms
    [INFO] [11:56:00] Starting 'lib'...
    [INFO] [11:56:00] [gulp-bower-files] DEPRECATED  Please use main-bower-files (http://npmjs.org/package/main-bower-files)
    [INFO] [11:56:00] 'lib' errored after 1.99 ms
    [INFO] [11:56:00] Error in plugin 'gulp-bower-files'
    [INFO] Bower components directory does not exist at ./bower_components
    [INFO] [11:56:00] 'clean-build-test' errored after 92 ms
    [INFO] [11:56:00] Error: [object Object]
    [INFO]     at formatError (/home/satyasai/LJCAdvocate/OpenJDKStuff/betterrev/betterrev/src/main/angularjsapp/node_modules/gulp/bin/gulp.js:169:10)
    [INFO]     at Gulp.<anonymous> (/home/satyasai/LJCAdvocate/OpenJDKStuff/betterrev/betterrev/src/main/angularjsapp/node_modules/gulp/bin/gulp.js:195:15)
    [INFO]     at Gulp.emit (events.js:117:20)
    [INFO]     at Gulp.Orchestrator._emitTaskDone (/home/satyasai/LJCAdvocate/OpenJDKStuff/betterrev/betterrev/src/main/angularjsapp/node_modules/gulp/node_modules/orchestrator/index.js:264:8)
    [INFO]     at /home/satyasai/LJCAdvocate/OpenJDKStuff/betterrev/betterrev/src/main/angularjsapp/node_modules/gulp/node_modules/orchestrator/index.js:275:23
    [INFO]     at finish (/home/satyasai/LJCAdvocate/OpenJDKStuff/betterrev/betterrev/src/main/angularjsapp/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:21:8)
    [INFO]     at cb (/home/satyasai/LJCAdvocate/OpenJDKStuff/betterrev/betterrev/src/main/angularjsapp/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:29:3)
    [INFO]     at finish (/home/satyasai/LJCAdvocate/OpenJDKStuff/betterrev/betterrev/src/main/angularjsapp/node_modules/run-sequence/index.js:48:5)
    [INFO]     at Gulp.onError (/home/satyasai/LJCAdvocate/OpenJDKStuff/betterrev/betterrev/src/main/angularjsapp/node_modules/run-sequence/index.js:55:4)
    [INFO]     at Gulp.emit (events.js:117:20)
    [INFO] [11:56:00] 'clean-build' errored after 92 ms
    [INFO] [11:56:00] Error: [object Object]
    [INFO]     at formatError (/home/satyasai/LJCAdvocate/OpenJDKStuff/betterrev/betterrev/src/main/angularjsapp/node_modules/gulp/bin/gulp.js:169:10)
    [INFO]     at Gulp.<anonymous> (/home/satyasai/LJCAdvocate/OpenJDKStuff/betterrev/betterrev/src/main/angularjsapp/node_modules/gulp/bin/gulp.js:195:15)
    [INFO]     at Gulp.emit (events.js:117:20)
    [INFO]     at Gulp.Orchestrator._emitTaskDone (/home/satyasai/LJCAdvocate/OpenJDKStuff/betterrev/betterrev/src/main/angularjsapp/node_modules/gulp/node_modules/orchestrator/index.js:264:8)
    [INFO]     at /home/satyasai/LJCAdvocate/OpenJDKStuff/betterrev/betterrev/src/main/angularjsapp/node_modules/gulp/node_modules/orchestrator/index.js:275:23
    [INFO]     at finish (/home/satyasai/LJCAdvocate/OpenJDKStuff/betterrev/betterrev/src/main/angularjsapp/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:21:8)
    [INFO]     at cb (/home/satyasai/LJCAdvocate/OpenJDKStuff/betterrev/betterrev/src/main/angularjsapp/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:29:3)
    [INFO]     at finish (/home/satyasai/LJCAdvocate/OpenJDKStuff/betterrev/betterrev/src/main/angularjsapp/node_modules/run-sequence/index.js:48:5)
    [INFO]     at Gulp.onError (/home/satyasai/LJCAdvocate/OpenJDKStuff/betterrev/betterrev/src/main/angularjsapp/node_modules/run-sequence/index.js:55:4)
    [INFO]     at Gulp.emit (events.js:117:20)
    [INFO] [11:56:00] 'clean-build' errored after 94 ms
    [INFO] [11:56:00] Error: [object Object]
    [INFO]     at formatError (/home/satyasai/LJCAdvocate/OpenJDKStuff/betterrev/betterrev/src/main/angularjsapp/node_modules/gulp/bin/gulp.js:169:10)
    [INFO]     at Gulp.<anonymous> (/home/satyasai/LJCAdvocate/OpenJDKStuff/betterrev/betterrev/src/main/angularjsapp/node_modules/gulp/bin/gulp.js:195:15)
    [INFO]     at Gulp.emit (events.js:117:20)
    [INFO]     at Gulp.Orchestrator._emitTaskDone (/home/satyasai/LJCAdvocate/OpenJDKStuff/betterrev/betterrev/src/main/angularjsapp/node_modules/gulp/node_modules/orchestrator/index.js:264:8)
    [INFO]     at /home/satyasai/LJCAdvocate/OpenJDKStuff/betterrev/betterrev/src/main/angularjsapp/node_modules/gulp/node_modules/orchestrator/index.js:275:23
    [INFO]     at finish (/home/satyasai/LJCAdvocate/OpenJDKStuff/betterrev/betterrev/src/main/angularjsapp/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:21:8)
    [INFO]     at cb (/home/satyasai/LJCAdvocate/OpenJDKStuff/betterrev/betterrev/src/main/angularjsapp/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:29:3)
    [INFO]     at finish (/home/satyasai/LJCAdvocate/OpenJDKStuff/betterrev/betterrev/src/main/angularjsapp/node_modules/run-sequence/index.js:48:5)
    [INFO]     at Gulp.onError (/home/satyasai/LJCAdvocate/OpenJDKStuff/betterrev/betterrev/src/main/angularjsapp/node_modules/run-sequence/index.js:55:4)
    [INFO]     at Gulp.emit (events.js:117:20)
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 04:13 min
    [INFO] Finished at: 2014-12-20T11:56:00+00:00
    [INFO] Final Memory: 20M/92M
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:0.0.19:gulp (gulp dist) on project betterrev: Failed to run task: 'gulp dist --no-color' failed. (error code 1) -> [Help 1]
    [ERROR] 
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    [ERROR] 
    [ERROR] For more information about the errors and possible solutions, please read the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
    

    Do you guys get past this ?

  5. Mani Sarkar reporter

    $ bower install wouldn't work directly so I had to follow these instructions at http://www.euperia.com/development/install-nodejs-and-bower-on-ubuntu-12-04-precise/1269

    bower was installed successfully and I chose angular#1.2.28 to complete the installation.

    Running the mvn install again shows progress in build, but then gives me this:

    [INFO]   Home Page Tests
    [INFO] 
    [INFO] 
    [INFO]   0 passing (1s)
    [INFO]   1 failing
    [INFO] 
    [INFO]   1) Contributions Page Tests Contributions Table exists:
    [INFO]      NoSuchElementError: No element found using locator: By.id("contributionsTable")
    [INFO]       at new bot.Error (/home/satyasai/LJCAdvocate/OpenJDKStuff/betterrev/betterrev/src/main/angularjsapp/node_modules/protractor/node_modules/selenium-webdriver/lib/atoms/error.js:113:18)
    [INFO]       at /home/satyasai/LJCAdvocate/OpenJDKStuff/betterrev/betterrev/src/main/angularjsapp/node_modules/protractor/lib/protractor.js:713:17
    [INFO]       at /home/satyasai/LJCAdvocate/OpenJDKStuff/betterrev/betterrev/src/main/angularjsapp/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/base.js:1582:15
    [INFO]       at [object Object].webdriver.promise.ControlFlow.runInNewFrame_ (/home/satyasai/LJCAdvocate/OpenJDKStuff/betterrev/betterrev/src/main/angularjsapp/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:1654:20)
    [INFO]       at notify (/home/satyasai/LJCAdvocate/OpenJDKStuff/betterrev/betterrev/src/main/angularjsapp/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:465:12)
    [INFO]       at notifyAll (/home/satyasai/LJCAdvocate/OpenJDKStuff/betterrev/betterrev/src/main/angularjsapp/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:442:7)
    [INFO]       at resolve (/home/satyasai/LJCAdvocate/OpenJDKStuff/betterrev/betterrev/src/main/angularjsapp/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:420:7)
    [INFO]       at fulfill (/home/satyasai/LJCAdvocate/OpenJDKStuff/betterrev/betterrev/src/main/angularjsapp/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:535:5)
    [INFO]       at /home/satyasai/LJCAdvocate/OpenJDKStuff/betterrev/betterrev/src/main/angularjsapp/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/base.js:1582:15
    [INFO]       at [object Object].webdriver.promise.ControlFlow.runInNewFrame_ (/home/satyasai/LJCAdvocate/OpenJDKStuff/betterrev/betterrev/src/main/angularjsapp/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:1654:20)
    [INFO]   ==== async task ====
    [INFO]       at Context.ret (/home/satyasai/LJCAdvocate/OpenJDKStuff/betterrev/betterrev/src/main/angularjsapp/node_modules/protractor/node_modules/selenium-webdriver/testing/index.js:119:12)
    [INFO]       at Test.Runnable.run (/home/satyasai/LJCAdvocate/OpenJDKStuff/betterrev/betterrev/src/main/angularjsapp/node_modules/mocha/lib/runnable.js:217:15)
    [INFO]       at Runner.runTest (/home/satyasai/LJCAdvocate/OpenJDKStuff/betterrev/betterrev/src/main/angularjsapp/node_modules/mocha/lib/runner.js:373:10)
    [INFO]       at /home/satyasai/LJCAdvocate/OpenJDKStuff/betterrev/betterrev/src/main/angularjsapp/node_modules/mocha/lib/runner.js:451:12
    [INFO]       at next (/home/satyasai/LJCAdvocate/OpenJDKStuff/betterrev/betterrev/src/main/angularjsapp/node_modules/mocha/lib/runner.js:298:14)
    [INFO]       at /home/satyasai/LJCAdvocate/OpenJDKStuff/betterrev/betterrev/src/main/angularjsapp/node_modules/mocha/lib/runner.js:308:7
    [INFO]       at next (/home/satyasai/LJCAdvocate/OpenJDKStuff/betterrev/betterrev/src/main/angularjsapp/node_modules/mocha/lib/runner.js:246:23)
    [INFO]       at Object._onImmediate (/home/satyasai/LJCAdvocate/OpenJDKStuff/betterrev/betterrev/src/main/angularjsapp/node_modules/mocha/lib/runner.js:275:5)
    [INFO]       at processImmediate [as _immediateCallback] (timers.js:345:15)
    [INFO]   Error
    [INFO]       at [object Object].ElementArrayFinder.applyAction_ (/home/satyasai/LJCAdvocate/OpenJDKStuff/betterrev/betterrev/src/main/angularjsapp/node_modules/protractor/lib/protractor.js:434:23)
    [INFO]       at [object Object].self.(anonymous function) [as isDisplayed] (/home/satyasai/LJCAdvocate/OpenJDKStuff/betterrev/betterrev/src/main/angularjsapp/node_modules/protractor/lib/protractor.js:126:21)
    [INFO]       at [object Object].self.(anonymous function) [as isDisplayed] (/home/satyasai/LJCAdvocate/OpenJDKStuff/betterrev/betterrev/src/main/angularjsapp/node_modules/protractor/lib/protractor.js:740:13)
    [INFO]       at Context.<anonymous> (/home/satyasai/LJCAdvocate/OpenJDKStuff/betterrev/betterrev/src/main/angularjsapp/test/integration/contributions.spec.js:11:64)
    [INFO]       at /home/satyasai/LJCAdvocate/OpenJDKStuff/betterrev/betterrev/src/main/angularjsapp/node_modules/protractor/node_modules/selenium-webdriver/testing/index.js:121:22
    [INFO]       at [object Object].webdriver.promise.ControlFlow.runInNewFrame_ (/home/satyasai/LJCAdvocate/OpenJDKStuff/betterrev/betterrev/src/main/angularjsapp/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:1654:20)
    [INFO]       at [object Object].webdriver.promise.ControlFlow.runEventLoop_ (/home/satyasai/LJCAdvocate/OpenJDKStuff/betterrev/betterrev/src/main/angularjsapp/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:1518:8)
    [INFO]       at [object Object].wrapper [as _onTimeout] (timers.js:261:14)
    [INFO]       at Timer.listOnTimeout [as ontimeout] (timers.js:112:15)
    [INFO] 
    [INFO] 
    [INFO] 
    [INFO] Shutting down selenium standalone server.
    [INFO] [launcher] 0 instance(s) of WebDriver still running
    [INFO] [launcher] chrome #1 failed 1 test(s)
    [INFO] [launcher] overall: 1 failed spec(s)
    [INFO] [launcher] Process exited with error code 1
    [INFO] 
    [INFO] /home/satyasai/LJCAdvocate/OpenJDKStuff/betterrev/betterrev/src/main/angularjsapp/gulpfile.js:213
    [INFO]                 throw err;
    [INFO]                       ^
    [INFO] Error: protractor exited with code 1
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 20.387 s
    [INFO] Finished at: 2014-12-22T21:14:08+00:00
    [INFO] Final Memory: 21M/217M
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:0.0.19:gulp (gulp dist) on project betterrev: Failed to run task: 'gulp dist --no-color' failed. (error code 8) -> [Help 1]
    

    I did see the browser startup and open something before it closed and saw the above messages in the console.

  6. Mani Sarkar reporter

    I think the problem is here

    [INFO]   1) Contributions Page Tests Contributions Table exists:
    [INFO]      NoSuchElementError: No element found using locator: By.id("contributionsTable")
    [INFO]       at new bot.Error (/home/satyasai/LJCAdvocate/OpenJDKStuff/betterrev/betterrev/src/main/angularjsapp/node_modules/protractor/node_modules/selenium-webdriver/lib/atoms/error.js:113:18)
    [INFO] 
    
  7. Mani Sarkar reporter

    Cheers Martijn, that worked.

    switch JAVA_HOME to point to Java 8 while in the betterrev/betterrev/src/main/angularjsapp folder, run bower install angular when asked to select angularjs from

    Unable to find a suitable version for angular, please choose one:
        1) angular#>=1 <1.3.0 which resolved to 1.2.28 and is required by angular-bootstrap#0.12.0 
        2) angular#1.3.6 which resolved to 1.3.6 and is required by angular-route#1.3.6 
        3) angular#~1.3.8 which resolved to 1.3.8Prefix the choice with ! to persist it to bower.json
    
    ? Answer:: 2
    bower angular#1.3.6            install angular#1.3.6
    

    select 2 for angular#1.3.6

    move to the folder where the pom.xml is and run mvn clean install

    and see the below message in about 5 minutes

    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD SUCCESS
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 04:35 min
    [INFO] Finished at: 2014-12-23T22:52:29+00:00
    [INFO] Final Memory: 39M/198M
    [INFO] ------------------------------------------------------------------------
    
  8. Mani Sarkar reporter

    How is this all going to work in an headless environment like Cloudbees? I'm thinking it should be fine ? I'll give it a whirl later on to see if it gets us somewhere.

  9. Mani Sarkar reporter

    Im thinkin the same, we should be able to install this via mvn - automatically rather than manual interventions. That would be great if it does, I'll have a build in place once this works fully automatically.

  10. Log in to comment