Skip to content

Commit

Permalink
Merge pull request #305 from gabriel-check24/bugfix
Browse files Browse the repository at this point in the history
Correct switched pipeline examples
  • Loading branch information
jtnord authored Apr 9, 2024
2 parents 686f0d7 + 167077d commit b04c97d
Showing 1 changed file with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@
Returns <code>true | false</code>.

This step must be run inside a <code>node</code> context:
<p><pre>
# Scripted Syntax
node {
if (fileExists('src/main/resources/index.html')) {
echo "File src/main/resources/index.html found!"
}
}
</pre></p>

With the Declarative Syntax, it must be run in a stage with a defined agent (e.g. different than `agent none`):

<p><pre>
# Declarative Syntax
stage ('Check for existence of index.html') {
Expand All @@ -16,15 +27,4 @@
}
}
</pre></p>

With the Declarative Syntax, it must be run in a stage with a defined agent (e.g. different than `agent none`):

<p><pre>
# Scripted Syntax
node {
if (fileExists('src/main/resources/index.html')) {
echo "File src/main/resources/index.html found!"
}
}
</pre></p>
</div>

0 comments on commit b04c97d

Please sign in to comment.