From 949952077bdb8fe329c971ae246ca63529107c82 Mon Sep 17 00:00:00 2001 From: Mark Waite Date: Sun, 18 Sep 2022 19:33:53 -0600 Subject: [PATCH] Fix Pipeline syntax errors Reported in documentation feedback sheet --- .../plugins/workflow/steps/FileExistsStep/help-file.html | 6 +++--- .../plugins/workflow/steps/FileExistsStep/help.html | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/resources/org/jenkinsci/plugins/workflow/steps/FileExistsStep/help-file.html b/src/main/resources/org/jenkinsci/plugins/workflow/steps/FileExistsStep/help-file.html index 45a3dcb9..7cc43822 100644 --- a/src/main/resources/org/jenkinsci/plugins/workflow/steps/FileExistsStep/help-file.html +++ b/src/main/resources/org/jenkinsci/plugins/workflow/steps/FileExistsStep/help-file.html @@ -5,12 +5,12 @@
  • Both Unix and Windows path are supported using a
    /
    separator:

     node('Linux') {
    -    if (fileExists('/usr/local/bin/jenkins.sh') {
    +    if (fileExists('/usr/local/bin/jenkins.sh')) {
             sh '/usr/local/bin/jenkins.sh'
         }
     }
     node('Windows') {
    -    if (fileExists('C:/jenkins.exe') {
    +    if (fileExists('C:/jenkins.exe')) {
             bat 'C:/jenkins.exe'
         }
     }
    @@ -18,7 +18,7 @@
         When using a Windows path with the backslash (
    \
    ) separator, do not forget to escape it:

    node('Windows') { - if (fileExists('src\\main\\resources') { + if (fileExists('src\\main\\resources')) { echo 'Found a directory resources.' } } diff --git a/src/main/resources/org/jenkinsci/plugins/workflow/steps/FileExistsStep/help.html b/src/main/resources/org/jenkinsci/plugins/workflow/steps/FileExistsStep/help.html index cef6d35b..a612fad1 100644 --- a/src/main/resources/org/jenkinsci/plugins/workflow/steps/FileExistsStep/help.html +++ b/src/main/resources/org/jenkinsci/plugins/workflow/steps/FileExistsStep/help.html @@ -9,8 +9,8 @@ agent any # Could be a top-level directive or a stage level directive steps { script { - if (fileExists('src/main/rersources/index.html') { - echo "File src/main/rersources/index.html found!" + if (fileExists('src/main/resources/index.html')) { + echo "File src/main/resources/index.html found!" } } } @@ -22,8 +22,8 @@

     # Scripted Syntax
     node {
    -    if (fileExists('src/main/rersources/index.html') {
    -        echo "File src/main/rersources/index.html found!"
    +    if (fileExists('src/main/resources/index.html')) {
    +        echo "File src/main/resources/index.html found!"
         }
     }