Package io.jenkins.plugins.checks.gitea
Class SCMFacade
java.lang.Object
io.jenkins.plugins.checks.gitea.SCMFacade
Facade to 
GiteaSCMSource and GitSCM in Jenkins.
 Used for finding a supported SCM of a job.- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionOptional<com.cloudbees.plugins.credentials.common.StandardCredentials>findGiteaAppCredentials(Job<?, ?> job, String credentialsId) FindStandardCredentialswith thecredentialsIdused by thejob.Optional<org.jenkinsci.plugin.gitea.GiteaSCMSource>findGiteaSCMSource(Job<?, ?> job) FindGiteaSCMSource(or Gitea repository) used by thejob.Optional<hudson.plugins.git.GitSCM>findGitSCM(Job<?, ?> job) Finds theGitSCMused by thejob.Optional<hudson.plugins.git.GitSCM>findGitSCM(Run<?, ?> run) Finds theGitSCMused by therun.Optional<jenkins.plugins.git.GitSCMSource>findGitSCMSource(Job<?, ?> job) FindGitSCMSourceused by thejob.findHash(jenkins.scm.api.SCMRevision revision) Find the hash value inrevision.Optional<jenkins.scm.api.SCMHead>FindSCMHead(or branch) used by thejob.Optional<jenkins.scm.api.SCMRevision>findRevision(jenkins.scm.api.SCMSource source, jenkins.scm.api.SCMHead head) Fetch the currentSCMRevisionused by theheadof thesource.Optional<jenkins.scm.api.SCMRevision>findRevision(org.jenkinsci.plugin.gitea.GiteaSCMSource source, Run<?, ?> run) Find the currentSCMRevisionof thesourceandrunlocally throughSCMRevisionAction.jenkins.scm.api.SCMSourcefindSCMSource(Job<?, ?> job) FindGiteaSCMSource(or Gitea repository) used by thejob.Returns the SCM in a given job.Returns the SCM in a given build.
- 
Constructor Details- 
SCMFacadepublic SCMFacade()
 
- 
- 
Method Details- 
findSCMSourceFindGiteaSCMSource(or Gitea repository) used by thejob.- Parameters:
- job- the Jenkins project
- Returns:
- the found Gitea SCM source used or empty
 
- 
findGiteaSCMSourceFindGiteaSCMSource(or Gitea repository) used by thejob.- Parameters:
- job- the Jenkins project
- Returns:
- the found Gitea SCM source used or empty
 
- 
findGitSCMSourceFindGitSCMSourceused by thejob.- Parameters:
- job- the Jenkins project
- Returns:
- the found Git SCM source or empty
 
- 
findGitSCMFinds theGitSCMused by therun.- Parameters:
- run- the run to get the SCM from
- Returns:
- the found GitSCM or empty
 
- 
findGitSCMFinds theGitSCMused by thejob.- Parameters:
- job- the job to get the SCM from
- Returns:
- the found GitSCM or empty
 
- 
findGiteaAppCredentialspublic Optional<com.cloudbees.plugins.credentials.common.StandardCredentials> findGiteaAppCredentials(Job<?, ?> job, String credentialsId) FindStandardCredentialswith thecredentialsIdused by thejob.- Parameters:
- job- the Jenkins project
- credentialsId- the id of the target credentials
- Returns:
- the found Gitea App credentials or empty
 
- 
findHeadFindSCMHead(or branch) used by thejob.- Parameters:
- job- the Jenkins project
- Returns:
- the found SCM head or empty
 
- 
findRevisionpublic Optional<jenkins.scm.api.SCMRevision> findRevision(jenkins.scm.api.SCMSource source, jenkins.scm.api.SCMHead head) Fetch the currentSCMRevisionused by theheadof thesource.- Parameters:
- source- the Gitea repository
- head- the branch
- Returns:
- the fetched revision or empty
 
- 
findRevisionpublic Optional<jenkins.scm.api.SCMRevision> findRevision(org.jenkinsci.plugin.gitea.GiteaSCMSource source, Run<?, ?> run) Find the currentSCMRevisionof thesourceandrunlocally throughSCMRevisionAction.- Parameters:
- source- the Gitea repository
- run- the Jenkins run
- Returns:
- the found revision or empty
 
- 
findHashFind the hash value inrevision.- Parameters:
- revision- the revision for a build
- Returns:
- the found hash or empty
 
- 
getScmReturns the SCM in a given build. If no SCM can be determined, then aNullSCMinstance will be returned.- Parameters:
- run- the build to get the SCM from
- Returns:
- the SCM
 
- 
getScmReturns the SCM in a given job. If no SCM can be determined, then aNullSCMinstance will be returned.- Parameters:
- job- the job to get the SCM from
- Returns:
- the SCM
 
 
-