Requirement: Steps with their own Code Blocks ( For ex: withEnv, withCredentials, etc..) needs to implemented in steps/scripts as separate key. For ex: pipeline: stages:
stage: 'Stage1' steps:
withCredentials: 'inner part of the step definition' scripts: