Skip to content

Latest commit

 

History

History
67 lines (58 loc) · 1.87 KB

setting_up_ci_jenkins1.md

File metadata and controls

67 lines (58 loc) · 1.87 KB
layout title permalink sitemap
default
Setting up Jenkins 1
/setting-up-ci-jenkins1/
priority lastmod
0.7
2016-11-03 12:40:00 +0000

Setting up a Jenkins server

To configure a Jenkins server for JHipster, refer to the following guides:

  • [Setting up Jenkins 1 on Linux]({{ site.url }}/setting-up-ci-linux/)
  • [Setting up Jenkins 1 on Windows]({{ site.url }}/setting-up-ci-windows/)

Jenkins Configuration

To setup a JHipster project in Jenkins, use the following configuration:

For Maven:

* Project name: `yourApplicationName`
* Source Code Management
    * Git Repository: `git@github.com:xxxx/yourApplicationName.git`
    * Branches to build: `*/main`
    * Additional Behaviours: `Wipe out repository & force clone`
* Build Triggers
    * Poll SCM / Schedule: `H/5 * * * *`
* Build<% if (buildTool == 'maven') { %>
    * Invoke Maven / Tasks: `-Pprod clean package`
    * Execute Shell / Command:
        ````
        mvn spring-boot:run &
        bootPid=$!
        sleep 30s
        gulp itest
        kill $bootPid
        ````
* Post-build Actions
    * Publish JUnit test result report / Test Report XMLs: `build/test-results/*.xml`

For Gradle:

* Project name: `yourApplicationName`
* Source Code Management
    * Git Repository: `git@github.com:xxxx/yourApplicationName.git`
    * Branches to build: `*/main`
    * Additional Behaviours: `Wipe out repository & force clone`
* Build Triggers
    * Poll SCM / Schedule: `H/5 * * * *`
* Build
    * Invoke Gradle script / Use Gradle Wrapper / Tasks: `-Pprod clean test bootWar`
    * Execute Shell / Command:
        ````
        ./gradlew bootRun &
        bootPid=$!
        sleep 30s
        gulp itest
        kill $bootPid
        ````
* Post-build Actions
    * Publish JUnit test result report / Test Report XMLs: `build/test-results/*.xml`