Writing a Jenkins Pipeline: Difference between revisions
Jump to navigation
Jump to search
(→Steps) |
|||
Line 6: | Line 6: | ||
=Steps= | =Steps= | ||
These steps are used invoking on <code>stage.</code>. In a Jenkinsfile, and inside a stage, invoke on <code>this.</code> | |||
* read-file step. Reading a file from the workspace: https://jenkins.io/doc/pipeline/steps/workflow-basic-steps/#readfile-read-file-from-workspace | * read-file step. Reading a file from the workspace: https://jenkins.io/doc/pipeline/steps/workflow-basic-steps/#readfile-read-file-from-workspace |
Revision as of 05:28, 21 November 2019
Internal
Steps
These steps are used invoking on stage.
. In a Jenkinsfile, and inside a stage, invoke on this.
- read-file step. Reading a file from the workspace: https://jenkins.io/doc/pipeline/steps/workflow-basic-steps/#readfile-read-file-from-workspace
def versionFile = stage.readFile("${stage.WORKSPACE}/terraform/my-module/VERSION")