meta data for this page
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
sw:jenkins [2018/11/08 10:43] – niziak | sw:jenkins [2019/02/20 09:24] – [Declarative Pipeline] niziak | ||
---|---|---|---|
Line 3: | Line 3: | ||
* is main Jenkins plugin which act as main build engine (from Jenkins 2.0) | * is main Jenkins plugin which act as main build engine (from Jenkins 2.0) | ||
* **replay** feature let to run job with modified by hand '' | * **replay** feature let to run job with modified by hand '' | ||
+ | | ||
- | ===== Jenkinsfile | + | ===== Scripted pipeline |
It is possible to write Jenkinsfile' | It is possible to write Jenkinsfile' | ||
- | **Scripted | + | [[https:// |
+ | [[https:// | ||
+ | [[https:// | ||
<file | jenkinsfile> | <file | jenkinsfile> | ||
node { | node { | ||
+ | stage(" | ||
+ | } | ||
+ | stage(" | ||
+ | } | ||
+ | stage(" | ||
+ | parallel ( | ||
+ | ' | ||
+ | ' | ||
+ | ) | ||
+ | } | ||
+ | stage(" | ||
+ | archiveArtifacts artifacts: ' | ||
+ | archiveArtifacts artifacts: ' | ||
+ | } | ||
+ | } | ||
</ | </ | ||
+ | |||
+ | NOTE: | ||
+ | * **parallel** expect map as argument. [[https:// | ||
+ | * | ||
+ | |||
+ | |||
+ | |||
[[https:// | [[https:// | ||
Line 18: | Line 44: | ||
[[https:// | [[https:// | ||
- | **Declarative Pipeline** | + | ==== archiveArtifacts ==== |
+ | |||
+ | **archiveArtifacts: | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | <file groovy> | ||
+ | archiveArtifacts artifacts: ' | ||
+ | archiveArtifacts artifacts: ' | ||
+ | archiveArtifacts artifacts: ' | ||
+ | archiveArtifacts artifacts: ' | ||
+ | </ | ||
+ | |||
+ | ===== Declarative Pipeline==== | ||
<file | Jenkinsfile> | <file | Jenkinsfile> | ||
pipeline { | pipeline { | ||
agent any | agent any | ||
+ | stages { | ||
+ | stage(' | ||
+ | steps { | ||
+ | sh 'make config' | ||
+ | sh 'echo " | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | post { | ||
+ | always { | ||
+ | archiveArtifacts artifacts: ' | ||
+ | } | ||
+ | } | ||
} | } | ||
</ | </ |