Tabnine Logo
SCMFile.contentAsString
Code IndexAdd Tabnine to your IDE (free)

How to use
contentAsString
method
in
jenkins.scm.api.SCMFile

Best Java code snippets using jenkins.scm.api.SCMFile.contentAsString (Showing top 8 results out of 315)

origin: jenkinsci/workflow-multibranch-plugin

String script = null;
try {
  script = fs.child(scriptPath).contentAsString();
  listener.getLogger().println("Obtained " + scriptPath + " from " + rev);
} catch (IOException | InterruptedException x) {
origin: org.jenkins-ci.plugins.workflow/workflow-multibranch

String script = null;
try {
  script = fs.child(scriptPath).contentAsString();
  listener.getLogger().println("Obtained " + scriptPath + " from " + rev);
} catch (IOException | InterruptedException x) {
origin: jenkinsci/workflow-cps-plugin

try (SCMFileSystem fs = SCMFileSystem.of(build.getParent(), scm)) {
  if (fs != null) {
    String script = fs.child(expandedScriptPath).contentAsString();
    listener.getLogger().println("Obtained " + expandedScriptPath + " from " + scm.getKey());
    Queue.Executable exec = owner.getExecutable();
origin: jenkinsci/subversion-plugin

@Test
public void ofSourceRevision() throws Exception {
  sampleRepo.init();
  sampleRepo.svnkit("copy", "--message=branching", sampleRepo.trunkUrl(), sampleRepo.branchesUrl() + "/dev");
  sampleRepo.svnkit("switch", sampleRepo.branchesUrl() + "/dev", sampleRepo.wc());
  SCMSource source = new SubversionSCMSource(null, sampleRepo.prjUrl());
  SCMRevision revision = source.fetch(new SCMHead("branches/dev"), null);
  sampleRepo.write("file", "modified");
  sampleRepo.svnkit("commit", "--message=dev1", sampleRepo.wc());
  try (SCMFileSystem fs = SCMFileSystem.of(source, new SCMHead("branches/dev"), revision)) {
    assertThat(fs, notNullValue());
    SCMFile root = fs.getRoot();
    assertThat(root, notNullValue());
    Iterable<SCMFile> children = root.children();
    Iterator<SCMFile> iterator = children.iterator();
    assertThat(iterator.hasNext(), is(true));
    SCMFile file = iterator.next();
    assertThat(iterator.hasNext(), is(false));
    assertThat(file.getName(), is("file"));
    assertThat(file.contentAsString(), is(""));
  }
}
origin: jenkinsci/subversion-plugin

assertThat(iterator.hasNext(), is(false));
assertThat(file.getName(), is("file"));
assertThat(file.contentAsString(), is("modified"));
origin: jenkinsci/workflow-multibranch-plugin

      if (fs != null) { // JENKINS-33273
        try {
          String text = fs.child(step.path).contentAsString();
          listener.getLogger().println("Obtained " + step.path + " from " + standaloneSCM.getKey());
          return text;
if (trustedFS != null && (!trustCheck || tipFS != null)) {
  if (trustCheck) {
    untrustedFile = tipFS.child(step.path).contentAsString();
  content = trustedFS.child(step.path).contentAsString();
  listener.getLogger().println("Obtained " + step.path + " from " + trusted);
} else {
origin: org.jenkins-ci.plugins.workflow/workflow-multibranch

      if (fs != null) { // JENKINS-33273
        try {
          String text = fs.child(step.path).contentAsString();
          listener.getLogger().println("Obtained " + step.path + " from " + standaloneSCM.getKey());
          return text;
if (trustedFS != null && (!trustCheck || tipFS != null)) {
  if (trustCheck) {
    untrustedFile = tipFS.child(step.path).contentAsString();
  content = trustedFS.child(step.path).contentAsString();
  listener.getLogger().println("Obtained " + step.path + " from " + trusted);
} else {
origin: jenkinsci/subversion-plugin

assertThat(file2.getType(), is(SCMFile.Type.REGULAR_FILE));
assertThat(dir.getType(), is(SCMFile.Type.DIRECTORY));
assertThat(file.contentAsString(), is("modified"));
assertThat(file2.contentAsString(), is("new"));
jenkins.scm.apiSCMFilecontentAsString

Popular methods of SCMFile

  • lastModified
  • child
  • children
  • getName
  • getType
  • isRoot

Popular in Java

  • Reading from database using SQL prepared statement
  • getContentResolver (Context)
  • startActivity (Activity)
  • getExternalFilesDir (Context)
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • JCheckBox (javax.swing)
  • JFrame (javax.swing)
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now