Details
-
Improvement
-
Status: Resolved (View Workflow)
-
Major
-
Resolution: Not A Defect
-
None
Description
The `sh` step adds a "Shell Script" step in the Pipeline. However, there could be multiple such steps including steps from various plugins (e.g., Docker), which makes it hard to distinguish the steps. We should perhaps add an optional parameter to sh to specify a name or alias which would then appear in the pipeline steps.
e.g., the following can be the step for npm which would show as "Shell script: npm" in the pipeline view.
sh cmd:"npm install", name: "npm"
Attachments
Issue Links
- duplicates
-
JENKINS-26107 Allow stage to operate as a labelled block
-
- Closed
-
-
JENKINS-37324 We would like a more meaningful description of a step
-
- Closed
-
Saving scripts into files is a common approach, but not really what we want to do in every case.
Let's say I have a simple step which runs Lint checks and it looks like
sh "./gradlew lint"
I wouldn't create a file in workspace with this single instruction. And probably it's not always possible to have write access to the repository on which you operate.
Proposed solution sounds more like a workaround, but having possibility to name shell steps is really good to have.