Class GitScm

    • Constructor Detail

      • GitScm

        public GitScm​(Job job,
                      String path)
    • Method Detail

      • localBranch

        public GitScm localBranch​(String branch)
      • enableRecursiveSubmoduleProcessing

        public void enableRecursiveSubmoduleProcessing()
      • calculateChangelog

        public GitScm calculateChangelog​(String remote,
                                         String branch)
        Add behaviour "Calculate changelog against specific branch"
        Parameters:
        remote - Remote to compare with
        branch - Branch to compare with
        Returns:
        this, to allow function chaining
      • commitAuthorInChangelog

        public GitScm commitAuthorInChangelog()
        Add behaviour "Use commit author in changelog"
        Returns:
        this, to allow function chaining
      • cleanAfterCheckout

        public GitScm cleanAfterCheckout()
        Add behaviour "Clean after checkout"
        Returns:
        this, to allow function chaining
      • cleanBeforeCheckout

        public GitScm cleanBeforeCheckout()
        Add behaviour "Clean before checkout"
        Returns:
        this, to allow function chaining
      • createTagForBuild

        public GitScm createTagForBuild()
        Add behaviour "Create tag for every build"
        Returns:
        this, to allow function chaining
      • customScmName

        public GitScm customScmName​(String name)
        Add behaviour "Custom SCM name"
        Parameters:
        name - Custom name
        Returns:
        this, to allow function chaining
      • customNameAndMail

        public GitScm customNameAndMail​(String name,
                                        String email)
        Add behaviour "Custom user name/e-mail address"
        Parameters:
        name - Custom name
        Returns:
        this, to allow function chaining
      • sparseCheckout

        public GitScm.SparseCheckoutPaths sparseCheckout()
        Add behaviour "Sparse checkout"
        Returns:
        behaviour, to access .addPath() method
      • advancedClone

        public GitScm.AdvancedClone advancedClone()
        Add behaviour "Advanced clone behaviours"
        Returns:
        behaviour, to access its method
      • advancedCheckout

        public GitScm.AdvancedCheckout advancedCheckout()
        Add behaviour "Advanced checkout behaviours"
        Returns:
        behaviour, to access its method
      • chooseBuildStrategy

        public GitScm chooseBuildStrategy​(String strategy)
        Select strategy for choosing what to build
        Parameters:
        strategy - Strategy to use ("Default" || "Inverse")
        Returns:
        this, to allow function chaining
      • chooseBuildStrategy

        public GitScm chooseBuildStrategy​(String strategy,
                                          int age,
                                          String ancestor)
        Select strategy for choosing what to build
        Parameters:
        strategy - Strategy to use ("Ancestry" || "Default" || "Inverse")
        age - Age in days (only for strategy "Ancestry")
        ancestor - SHA1 commit hash (only for strategy "Ancestry")
        Returns:
        this, to allow function chaining
      • repositoryBrowser

        public GitScm repositoryBrowser​(String name)
        Select repository browser type
        Parameters:
        name - Type of repository browser
        Returns:
        this, to allow function chaining
      • urlRepositoryBrowser

        public GitScm urlRepositoryBrowser​(String url)
        Set URL for repository browser
        Parameters:
        url - URL to be set
        Returns:
        this, to allow function chaining
      • mergeBeforeBuild

        public GitScm.MergeBeforeBuild mergeBeforeBuild()
        Add behaviour "Merge before build"
        Returns:
        behaviour, to access its method