Limited Time Offer!

For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!

Enroll Now

Jenkins Tutorials: Scripted Pipeline jenkinsfile example


Pipeline: Basic Steps

  • catchError: Catch error and set build result to failure
  • deleteDir: Recursively delete the current directory from the workspace
  • dir: Change current directory
  • echo: Print Message
  • error: Error signal
  • fileExists: Verify if file exists in workspace
  • isUnix: Checks if running on a Unix-like node
  • mail: Mail
  • pwd: Determine current directory
  • readFile: Read file from workspace
  • retry: Retry the body up to N times
  • sleep: Sleep
  • stash: Stash some files to be used later in the build
  • step: General Build Step
  • timeout: Enforce time limit
  • tool: Use a tool from a predefined Tool Installation
  • unstable: Set stage result to unstable
  • unstash: Restore files previously stashed
  • waitUntil: Wait for condition
  • warnError: Catch error and set build and stage result to unstable
  • withEnv: Set environment variables
  • wrap: General Build Wrapper
  • writeFile: Write file to workspace
  • archive: Archive artifacts
  • getContext: Get contextual object from internal APIs
  • unarchive: Copy archived artifacts into the workspace
  • withContext: Use contextual object from internal APIs within a block

Rajesh Kumar
Follow me
Latest posts by Rajesh Kumar (see all)
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x