Class SCMVar

  • All Implemented Interfaces:
    ExtensionPoint

    @Extension
    public class SCMVar
    extends org.jenkinsci.plugins.workflow.cps.GlobalVariable
    Adds an scm global variable to the script. This makes it possible to run checkout scm to get your project sources in the right branch.
    • Constructor Detail

      • SCMVar

        public SCMVar()
    • Method Detail

      • getName

        @NonNull
        public String getName()
        Specified by:
        getName in class org.jenkinsci.plugins.workflow.cps.GlobalVariable
      • getValue

        @NonNull
        public SCM getValue​(@NonNull
                            org.jenkinsci.plugins.workflow.cps.CpsScript script)
                     throws Exception
        Specified by:
        getValue in class org.jenkinsci.plugins.workflow.cps.GlobalVariable
        Throws:
        Exception