Jenkins Integration

Functionize and Jenkins Integration Overview

Pairing Continuous Integration (CI) with functional tests is a great way to improve build process and catch code errors quickly. Deploy code to a testing environment and automatically run a Functionize orchestration of regression tests. If tests fail, the build fails and quickly find and correct the issue, then setting Jenkins, or any build pipeline tool, to try the build again. Release features with a higher degree of confidence knowing the code is being tested with every committed change.

How do I integrate with Jenkins?

  1. Open your Jenkins dashboard, select New Item
    JenkinsDashboard.png

  2. Enter an item name, select Freestyle project and click OK
    JenkinsNewItem.png

  3. On the General tab, scroll down to the Build section, select Execute Shell from the Add build step menu
    JenkinsAddBuildStep.png

  4. In the Execute shell command text box enter:
    touch {your YAML config file name}
    rm {your YAML config file name}
    echo "clientId: {your Client ID from the YAML file} \nclientSecret: {your Client Secret from the YAML file}" >> {your YAML file name}
    fze token generate --config {your YAML file name}
    fze orchestration run --wait --output junit --location . --id {Orchestration deployment ID} --config {your YAML file name}
  5. Scroll down to the Post-build Actions section, select Publish JUnit test result report from the Add post-build action menu, enter desired file name for the result report (e.g. result.junit) and click Save
    JenkinsAddPostBuildAction.png

  6. Select Build Now on the left sidebar in the Jenkins project window, view the results by clicking the build number (#1) in the lower left sidebar and selecting Console Output and the results will also display in the Orchestrations page of the Functionize UI
    JenkinsBuildNow.png