Constructor and Description |
---|
SCMFacade() |
Modifier and Type | Method and Description |
---|---|
Optional<com.cloudbees.plugins.credentials.common.StandardCredentials> |
findGiteaAppCredentials(Job<?,?> job,
String credentialsId)
Find
StandardCredentials with the credentialsId used by the job . |
Optional<org.jenkinsci.plugin.gitea.GiteaSCMSource> |
findGiteaSCMSource(Job<?,?> job)
Find
GiteaSCMSource (or Gitea repository) used by the job . |
Optional<hudson.plugins.git.GitSCM> |
findGitSCM(Job<?,?> job)
Finds the
GitSCM used by the job . |
Optional<hudson.plugins.git.GitSCM> |
findGitSCM(Run<?,?> run)
Finds the
GitSCM used by the run . |
Optional<jenkins.plugins.git.GitSCMSource> |
findGitSCMSource(Job<?,?> job)
Find
GitSCMSource used by the job . |
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.plugin.gitea.GiteaSCMSource 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
GiteaSCMSource (or Gitea 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)
GiteaSCMSource
(or Gitea repository) used by the job
.job
- the Jenkins projectpublic Optional<org.jenkinsci.plugin.gitea.GiteaSCMSource> findGiteaSCMSource(Job<?,?> job)
GiteaSCMSource
(or Gitea repository) used by the job
.job
- the Jenkins projectpublic Optional<jenkins.plugins.git.GitSCMSource> findGitSCMSource(Job<?,?> job)
GitSCMSource
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<hudson.plugins.git.GitSCM> findGitSCM(Job<?,?> job)
GitSCM
used by the job
.job
- the job to get the SCM frompublic Optional<com.cloudbees.plugins.credentials.common.StandardCredentials> findGiteaAppCredentials(Job<?,?> job, String credentialsId)
StandardCredentials
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 Gitea repositoryhead
- the branchpublic Optional<jenkins.scm.api.SCMRevision> findRevision(org.jenkinsci.plugin.gitea.GiteaSCMSource source, Run<?,?> run)
source
- the Gitea 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–2022. All rights reserved.