Skip to content
This plugin provides a generator for basic Intershop CI setup source artifacts.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
gradle/wrapper
src
.gitignore
.travis.yml
README.asciidoc
build.gradle
buildTravis.sh
gradlew
gradlew.bat
license-2.0.txt
settings.gradle

README.asciidoc

Intershop CI Setup Plugin

Summary

This plugin provides tasks for the configuration of necessary sources for the setup of the CI process as proposed by Intershop. Based on a configuration the source projects are created from templates provided by this plugin. It is possible to use the template project as a starting point for the setup of the CI process, as described in the Intershop documentation (see Cookbook - Setup CI Infrastructure).

Usage

To use the Gradle Intershop CI plugin, include the following in the build script:

plugins {
    id 'com.intershop.gradle.cisetup' version '2.2.0'
}

IntershopCISetup {
    /**
     *  Configures directories that sources are generated into.
     **/
    directories {

        /**
         * Base directory for all generated sources.
         **/
            //TODO: Provide an absolute path, e.g. '/home/developer/intershop-ci/source' on Linux resp.'C:/developer/intershop-ci' on Windows
        setupDirectory = ''

        /**
         *  ... contains
         *        - corporate distribution
         *        - deployment example project
         **/
        devOpsDir = "\${setupDirectory}/devops"

        /**
         *  ... contains all projects
         *        - oracle driver project
         *        - project directories
         **/
        projectsDir = "\${setupDirectory}/projects"
    }

     /**
     *  Repository Settings
     *  For build and deployment a remote repository is necessary.
     *  This configuration is used by a special corporate distribution.
     *  The configuration parameters are also used in the configuration of the
     *  wrapper in all projects.
     **/
    repository {
        /**
         * Technical enterprise or corporate name.
         * This is used for group/organization of generated artifacts in
         * the artifact repository.
         */
        //TODO: Provide a reverse domain name, e.g. 'com.corporate'
        corporateName = ''

        /**
         * Base URL for all repositories on the repository server.
         */
         //TODO: Provide URL (e.g. http://nexus:8081/nexus/content/repositories)
        repoBaseURL = ''

        /**
         *  A list of alternative host names. Can be used when having multiple
         *  repository servers proxying each other.
         */
        //repoHosts = ['nexus', 'nexus.corporate.com']

        /**
         * If you use different repositories for ivy and mvn
         * this property must configured with false.
         * Default: true
         */
        // singleRepos = false

        /**
         * Repository path of snapshots.
         */
        repoSnapshotsPath = 'repositories/snapshots'

        /**
         * Group path of all repositories with component releases
         */
        groupReleasePath = 'groups/components'

        /**
         * Ivy repository path with releases
         * This configuration is only necessary if singleRepos is false.
         * Default: ivy-releases
         */
        // ivyRepoReleasesPath = 'ivy-releases'

        /**
         * Maven repository path with releases
         * This configuration is only necessary if singleRepos is false.
         * Default: ivy-releases
         */
        // mvnRepoReleasesPath = 'mvn-releases'

        /**
         * Ivy repository path with snapshots
         * This configuration is only necessary if singleRepos is false.
         * Default: ivy-releases
         */
        // ivyRepoSnapshotsPath = 'ivy-snapshots'

        /**
         * Maven repository path with snapshots
         * This configuration is only necessary if singleRepos is false.
         * Default: ivy-releases
         */
        // mvnRepoSnapshotsPath = 'mvn-snapshots'

        /**
         * Gradle version to base corporate distribution on.
         * Must be compatible with Gradle tools version defined in versions block.
         */
        gradleBaseVersion = '2.11'

        /**
        * Initial version of the corporate distribution.
        */
        distributionVersion = '2.0.0'

        /**
        * If the distribution stored on an alternative path (separate web server)
        * It is necessary to specify the whole URL. Otherwise the URL will be
        * generated from the previous configuration.
        *
        * Defaults to
        * ${repoBaseURL}/distributions/gradle-dist/${getDistributionName()}/${distributionVersion}/${getDistributionName()}-${distributionVersion}.zip
        */
        //distributionURL=''
    }

    /**
     *  Version settings
     *  For build and deployment of projects it is necessary to configure the information about the used Intershop versions.
     **/
    versions {
        /**
         * Version of the deployment bootstrap plugin
         * Please check for updates!
         */
        intershopDeploymentBootstrapVersion = '2.11.6'

        /**
         * Oracle client version.
         */
        //TODO: Specify the version of used Oracle driver
        oracleClientVersion = '12.1.0.2.0'
    }

    intershopProject {
        /**
         * Technical name of the project. This is also used for the name of the multi project,
         * that contains all components (cartridges) and the assembly build.
         **/
        //TODO: Provide a name using only letters, numbers and underscores (no spaces or other special characters), e.g. 'corporateshop'
        projectName = ''
    }

    /**
     *  CI server configurationen settings
     **/
    ciServer {
        // Hostname of the ci server or ci server agent which runs the assembly integration test
        hostName = 'ciserver'
    }
}

Tasks

The CI setup plugin adds different template tasks to the project.

Task name

Type

Description

intershopCISetupAll

Create all necessary source artefacts for the CI setup

createCorporateDistribution

CorporateDistribution

Creates a structure of a corporate distribution package project.

createOracleComponentSet

OracleComponentSet

Creates a special component set for publishing Oracle JDBC drivers

createProject

IntershopProject

Creates a structure of a project configuration.

createDeploymentConfig

IntershopDeployment

Creates a structure of a deployment configuration.

Project Extension 'IntershopCISetup'

This plugin adds an extension IntershopCISetup to the project.

Type: CISetupExtension

Configuration directories

This configuration contains all output directories.

Property

Type

Default value

Description

setupDirectory

String

Base directory for all generated sources.

devOpsDir

String

${setupDirectory}/devops

…​ contains
- corporate distribution
- deployment example project

projectsDir

String

${setupDirectory}/projects

…​ contains all projects
- oracle driver project
- empty project directories

Configuration repository

This extensions is the necessary repository configuration for the Intershop project setup.

Property

Type

Default value

Description

corporateName

String

Technical enterprise or corporate name.
This is used for group/organization of generated artifacts in the artifact repository.

repoBaseURL

String

Base URL for all repositories on the repository server.
e.g. http://nexus:8081/nexus/content

repoHosts

List<String>

A list of alternative host names. Can be used when having multiple repository servers proxying each other.
optional

singleRepos

boolean

true

If you use different repositories for ivy and mvn this property must configured with false.

These path configurations are only necessary if singleRepos is true.

repoSnapshotsPath

String

repositories/snapshots

Repository path of snapshots.

groupReleasePath

String

groups/components

Group path of all repositories with component releases

These path configurations are only necessary if singleRepos is false.

ivyRepoReleasesPath

String

ivy-release

Ivy repository path with releases

mvnRepoReleasesPath

String

mvn-release

Maven repository path with releases

ivyRepoSnapshotsPath

String

ivy-snapshots

Ivy repository path with snapshots

mvnRepoSnapshotsPath

String

mvn-snapshots

Maven repository path with snapshots

 

gradleBaseVersion

String

2.11

Gradle version to base corporate distribution on.+ Must be compatible with Gradle tools version defined in versions block.

distributionVersion

String

2.0.0

Initial version of the corporate distribution.

getDistributionName()

String

Returns the name of the corporate distribution. This is the corporate name without spaces and convertet to lower cases.

distributionURL

String

<Generated URL>

If the distribution stored on an alternative path (separate web server)
It is necessary to specify the whole URL. Otherwise the URL will be generated from the previous configuration.
${repoBaseURL}/distributions/gradle-dist/${getDistributionName()}/
${distributionVersion}/${getDistributionName()}-${distributionVersion}.zip

optional

Configuration versions

All versions that are used in this configuration.

Property

Type

Default value

Description

intershopDeploymentBootstrapVersion

String

Version of the deployment bootstrap plugin

oracleClientVersion

String

Oracle client version.

It is necessary to specify correct version numbers without wildcards. The version settings are verified by the plugin. Furthermore it is necessary to specify the Oracle client version in the assembly build.
Add to the gradle.properties of the assembly project: version.com.intershop.3rd_oracle = <version>

Configuration intershopProject

The project directory structure can be configured in this part of the configuration.

Property

Type

Default value

Description

projectName

String

Technical name of the project.

Configuration ciServer

This configuration contains information of the ci server.

Property

Type

Default value

Description

hostName

String

ciserver

Hostname of the ci server or ci server agent which runs the assembly integration test

License

Copyright 2014-2016 Intershop Communications.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

You can’t perform that action at this time.