Search in sources :

Example 46 with ConfiguredWithReadme

use of io.jenkins.plugins.casc.misc.ConfiguredWithReadme in project configuration-as-code-plugin by jenkinsci.

the class WorkflowCpsGlobalLibTest method configure_global_library.

@Test
@ConfiguredWithReadme("workflow-cps-global-lib/README.md")
public void configure_global_library() {
    assertEquals(1, GlobalLibraries.get().getLibraries().size());
    final LibraryConfiguration library = GlobalLibraries.get().getLibraries().get(0);
    assertEquals("awesome-lib", library.getName());
    final SCMSourceRetriever retriever = (SCMSourceRetriever) library.getRetriever();
    final GitSCMSource scm = (GitSCMSource) retriever.getScm();
    assertEquals("https://github.com/jenkins-infra/pipeline-library.git", scm.getRemote());
}
Also used : SCMSourceRetriever(org.jenkinsci.plugins.workflow.libs.SCMSourceRetriever) LibraryConfiguration(org.jenkinsci.plugins.workflow.libs.LibraryConfiguration) GitSCMSource(jenkins.plugins.git.GitSCMSource) Test(org.junit.Test) ConfiguredWithReadme(io.jenkins.plugins.casc.misc.ConfiguredWithReadme)

Aggregations

ConfiguredWithReadme (io.jenkins.plugins.casc.misc.ConfiguredWithReadme)46 Test (org.junit.Test)46 Jenkins (jenkins.model.Jenkins)12 User (hudson.model.User)3 LDAPSecurityRealm (hudson.security.LDAPSecurityRealm)3 SecurityRealm (hudson.security.SecurityRealm)3 InstallSourceProperty (hudson.tools.InstallSourceProperty)3 BasicSSHUserPrivateKey (com.cloudbees.jenkins.plugins.sshcredentials.impl.BasicSSHUserPrivateKey)2 StandardUsernamePasswordCredentials (com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials)2 DockerCloud (com.nirima.jenkins.plugins.docker.DockerCloud)2 DockerTemplate (com.nirima.jenkins.plugins.docker.DockerTemplate)2 HudsonPrivateSecurityRealm (hudson.security.HudsonPrivateSecurityRealm)2 Util.toYamlString (io.jenkins.plugins.casc.misc.Util.toYamlString)2 CNode (io.jenkins.plugins.casc.model.CNode)2 AWSCredentialsImpl (com.cloudbees.jenkins.plugins.awscredentials.AWSCredentialsImpl)1 DirectEntryPrivateKeySource (com.cloudbees.jenkins.plugins.sshcredentials.impl.BasicSSHUserPrivateKey.DirectEntryPrivateKeySource)1 Credentials (com.cloudbees.plugins.credentials.Credentials)1 SecretBytes (com.cloudbees.plugins.credentials.SecretBytes)1 SystemCredentialsProvider (com.cloudbees.plugins.credentials.SystemCredentialsProvider)1 UsernamePasswordCredentials (com.cloudbees.plugins.credentials.common.UsernamePasswordCredentials)1