Skip to content

Commit d029c85

Browse files
author
R. Tyler Croy
authored
Merge pull request #58 from FQ400/update-best-practices
Include link to CPS wiki page in best_practices.md
2 parents 6f1f877 + 1e9c202 commit d029c85

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

docs/BEST_PRACTICES.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This is a collection of tips, advice, gotchas and other best practices for using
44
# General tips and advice
55
* Do everything that makes sense there within `stage`s. This will make your builds easier to visualize, debug, etc.
66
* Do all real work that involves running a shell script, building, etc, within `node` blocks, so that it actually happens on a real executor, rather than a flyweight executor on the master node.
7-
* Get your flows from source control - `Jenkinsfile`s, loading libraries, global CPS library, you name it - but if you pull the main flow from SCM (i.e., Multibranch with `Jenkinsfile`s or `Pipeline script from SCM`), be aware that you may need to whitelist a lot of method calls in the script security plugin. [JENKINS-28178](https://issues.jenkins-ci.org/browse/JENKINS-28178) has been created to simplify this, but you'll still want to be careful with that functionality due to the open security it implies.
7+
* Get your flows from source control - `Jenkinsfile`s, loading libraries, global [CPS](https://en.wikipedia.org/wiki/Continuation-passing_style) library, you name it - but if you pull the main flow from SCM (i.e., Multibranch with `Jenkinsfile`s or `Pipeline script from SCM`), be aware that you may need to whitelist a lot of method calls in the script security plugin. [JENKINS-28178](https://issues.jenkins-ci.org/browse/JENKINS-28178) has been created to simplify this, but you'll still want to be careful with that functionality due to the open security it implies.
88
* `input` shouldn’t be done within a `node` block - that eats up two executors waiting on the `input` feedback, both the flyweight executor that’s used for the `input` itself and the real executor used by the `node` block, which won’t free up until after the `input` itself has completed.
99

1010
# Parallelism
@@ -32,8 +32,3 @@ This is a collection of tips, advice, gotchas and other best practices for using
3232
# Pipeline script development tips
3333
* When developing new flows, you can often iterate faster with an inline pipeline, rather than running from SCM. You can use the 'load' operation to load common utility methods from common pipelines, and then as you finish out methods, commit them to the utility flows. This lets you strike a balance between having traceability on commits and being able to move fast.
3434
* NOTE: this isn't possible with Multibranch pipelines, since those *have* to pull their script from SCM completely, so you will probably want to do your initial development iteration on a single branch using this approach before moving to `Jenkinsfile`s.
35-
36-
37-
38-
39-

0 commit comments

Comments
 (0)