| 构造器和说明 |
|---|
SCMFacade() |
| 限定符和类型 | 方法和说明 |
|---|---|
Optional<org.jenkinsci.plugins.github_branch_source.GitHubAppCredentials> |
findGitHubAppCredentials(Job<?,?> job,
String credentialsId)
Find
GitHubAppCredentials with the credentialsId used by the job. |
Optional<org.jenkinsci.plugins.github_branch_source.GitHubSCMSource> |
findGitHubSCMSource(Job<?,?> job)
Find
GitHubSCMSource (or GitHub repository) used by the job. |
Optional<hudson.plugins.git.GitSCM> |
findGitSCM(Run<?,?> run)
Finds the
GitSCM used by the run. |
Optional<String> |
findHash(jenkins.scm.api.SCMRevision revision)
Find the hash value in
revision. |
Optional<jenkins.scm.api.SCMHead> |
findHead(Job<?,?> job)
Find
SCMHead (or branch) used by the job. |
Optional<jenkins.scm.api.SCMRevision> |
findRevision(org.jenkinsci.plugins.github_branch_source.GitHubSCMSource source,
Run<?,?> run)
|
Optional<jenkins.scm.api.SCMRevision> |
findRevision(jenkins.scm.api.SCMSource source,
jenkins.scm.api.SCMHead head)
|
jenkins.scm.api.SCMSource |
findSCMSource(Job<?,?> job)
Find
GitHubSCMSource (or GitHub repository) used by the job. |
SCM |
getScm(Job<?,?> job)
Returns the SCM in a given job.
|
SCM |
getScm(Run<?,?> run)
Returns the SCM in a given build.
|
@CheckForNull public jenkins.scm.api.SCMSource findSCMSource(Job<?,?> job)
GitHubSCMSource (or GitHub repository) used by the job.job - the Jenkins projectpublic Optional<org.jenkinsci.plugins.github_branch_source.GitHubSCMSource> findGitHubSCMSource(Job<?,?> job)
GitHubSCMSource (or GitHub repository) used by the job.job - the Jenkins projectpublic Optional<hudson.plugins.git.GitSCM> findGitSCM(Run<?,?> run)
GitSCM used by the run.run - the run to get the SCM frompublic Optional<org.jenkinsci.plugins.github_branch_source.GitHubAppCredentials> findGitHubAppCredentials(Job<?,?> job, String credentialsId)
GitHubAppCredentials with the credentialsId used by the job.job - the Jenkins projectcredentialsId - the id of the target credentialspublic Optional<jenkins.scm.api.SCMHead> findHead(Job<?,?> job)
SCMHead (or branch) used by the job.job - the Jenkins projectpublic Optional<jenkins.scm.api.SCMRevision> findRevision(jenkins.scm.api.SCMSource source, jenkins.scm.api.SCMHead head)
source - the GitHub repositoryhead - the branchpublic Optional<jenkins.scm.api.SCMRevision> findRevision(org.jenkinsci.plugins.github_branch_source.GitHubSCMSource source, Run<?,?> run)
source - the GitHub repositoryrun - the Jenkins runpublic Optional<String> findHash(jenkins.scm.api.SCMRevision revision)
revision.revision - the revision for a buildpublic SCM getScm(Run<?,?> run)
NullSCM instance will be returned.run - the build to get the SCM fromCopyright © 2016–2020. All rights reserved.