You've already forked sap-jenkins-library
mirror of
https://github.com/SAP/jenkins-library.git
synced 2025-11-06 09:09:19 +02:00
doc: fix generation of empty stages (#3354)
This commit is contained in:
@@ -349,12 +349,12 @@ func createPipelineStageDocumentation(stageRunConfig *config.RunConfigV1, stageT
|
|||||||
for _, step := range stage.Steps {
|
for _, step := range stage.Steps {
|
||||||
stageDoc += fmt.Sprintf("| [%v](%v/%v.md) | %v |\n", step.Name, relativeStepsPath, step.Name, getStepConditionDetails(step))
|
stageDoc += fmt.Sprintf("| [%v](%v/%v.md) | %v |\n", step.Name, relativeStepsPath, step.Name, getStepConditionDetails(step))
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
stageFilePath := filepath.Join(stageTargetPath, fmt.Sprintf("%v.md", stage.Name))
|
stageFilePath := filepath.Join(stageTargetPath, fmt.Sprintf("%v.md", stage.Name))
|
||||||
fmt.Println("writing file", stageFilePath)
|
fmt.Println("writing file", stageFilePath)
|
||||||
if err := utils.FileWrite(stageFilePath, []byte(stageDoc), 0666); err != nil {
|
if err := utils.FileWrite(stageFilePath, []byte(stageDoc), 0666); err != nil {
|
||||||
return fmt.Errorf("failed to write stage file '%v': %w", stageFilePath, err)
|
return fmt.Errorf("failed to write stage file '%v': %w", stageFilePath, err)
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
Reference in New Issue
Block a user