Solutions Delivery Platform

Example Library Walkthrough

Let’s say you had a simple pipeline template to support teams using maven and ant as their build tools:

unit_test()
build()
package()
deploy_to dev

A GitHub Repository called jte-lib located at https://github.com/jte-library-example/jte-lib.git with the following directory structure:

maven/
    build.groovy
    package.groovy
    unit_test.groovy
    README.rst
ant/
    build.groovy
    package.groovy
    unit_test.groovy
    README.rst
weblogic/
    deploy_to.groovy
    README.rst
glassfish/
    deploy_to.groovy
    README.rst
sonarqube/
    static_code_analysis.groovy
    README.rst

You would then configure this repository as a library source either in the global Jenkins Templating Engine Configuration or in a Governance Tier. This will make the libraries maven, ant, weblogic, glassfish, and sonarqube accessible to be loaded.

Let’s say one application is using Maven and deploying to a Weblogic server.

Their configuration file could be:

application_environments{
    dev{
        long_name = "Development"
    }
}

libraries{
    maven
    sonarqube
    weblogic
}

while an application using Ant and deploying to a GlassFish server would have

application_environments{
    dev{
        long_name = "Development"
    }
}

libraries{
    ant
    sonarqube
    glassfish
}

and in both instances, the applications would be using the same pipeline template.