What are the `dir`, `ws` and `deleteDir` steps?
BeginnerConceptDeclarative pipeline syntax
Answer
dir('frontend') { sh 'npm ci' } changes directory for the block (creating it if needed). ws('/data/custom') { } allocates a different workspace. deleteDir() deletes the current directory recursively, often used as dir('tmp') { deleteDir() }. For full cleanup use cleanWs() from the Workspace Cleanup plugin in post { cleanup { } }.
More on Declarative pipeline syntax
What is the minimum valid declarative pipeline?BeginnerWhat agent types exist in declarative pipelines?IntermediateWhen do you use `agent none` at the top level?IntermediateHow do nested sequential stages work and why are they useful?IntermediateList the `post` conditions and when each fires.IntermediateWhat are the most useful `when` conditions?Intermediate