use of org.jenkinsci.test.acceptance.plugins.git.GitScm in project acceptance-test-harness by jenkinsci.
the class MultipleScmsPluginTest method checkout_several_scms.
@Test
public void checkout_several_scms() {
FreeStyleJob job = jenkins.jobs.create();
job.configure();
MultipleScms scms = job.useScm(MultipleScms.class);
GitScm git = scms.addScm(GitScm.class);
git.url("git://github.com/jenkinsci/acceptance-test-harness.git");
git.localDir("git-project");
SubversionScm svn = scms.addScm(SubversionScm.class);
svn.url.set("http://svn.apache.org/repos/asf/subversion/trunk/build/");
svn.local.set("svn-project");
job.addShellStep("test -d svn-project/.svn && test -f git-project/pom.xml");
job.save();
job.startBuild().shouldSucceed();
}
use of org.jenkinsci.test.acceptance.plugins.git.GitScm in project acceptance-test-harness by jenkinsci.
the class GitPluginNoDockerTest method generateJobWithBranch.
private Job generateJobWithBranch(GIT_IMPL type) {
Job job = generateJob(type);
GitScm scm = generateSCM(job).branch("recovery");
useJGitIfNeccesary(type, scm);
return job;
}
use of org.jenkinsci.test.acceptance.plugins.git.GitScm in project acceptance-test-harness by jenkinsci.
the class GitPluginNoDockerTest method generateSimpleJob.
private Job generateSimpleJob(GIT_IMPL type) {
Job job = generateJob(type);
GitScm scm = generateSCM(job);
useJGitIfNeccesary(type, scm);
return job;
}
use of org.jenkinsci.test.acceptance.plugins.git.GitScm in project acceptance-test-harness by jenkinsci.
the class GitPluginNoDockerTest method generateJobWithLocalDir.
private Job generateJobWithLocalDir(GIT_IMPL type) {
Job job = generateJob(type);
GitScm scm = generateSCM(job).localDir("local_dir");
useJGitIfNeccesary(type, scm);
return job;
}
use of org.jenkinsci.test.acceptance.plugins.git.GitScm in project acceptance-test-harness by jenkinsci.
the class GitPluginTest method test_clean_while_checkout.
/**
* Invoked by {@link #clean_after_checkout()} and {@link #clean_before_checkout()}
*
* @param before Select "clean before" or "clean after"
*/
private void test_clean_while_checkout(boolean before) {
GitRepo repo = buildGitRepo();
repo.transferToDockerContainer(host, port);
// configure and build to create untrackedFile.txt
GitScm git = job.useScm(GitScm.class).url(repoUrl).credentials(USERNAME);
if (before) {
git.cleanBeforeCheckout();
} else {
git.cleanAfterCheckout();
}
job.addShellStep("touch untrackedFile.txt");
job.save();
job.startBuild().shouldSucceed();
// configure and build to test if file has been removed
job.configure();
job.removeFirstBuildStep();
job.addShellStep("ls && test ! -f untrackedFile.txt");
job.save();
job.startBuild().shouldSucceed();
}
Aggregations