#1538  Step state depending first command failed, not the last one
Closed
bufferUnderrun opened 8 months ago

Hi Robin,

Currently, the state of step (success/failed) is the return of the last command.

The design implies two ways of building the job :

  • one command by step (an ExecuteCommandStep) : slow, hard to maintain
  • group multiples commands in a script and run it : need to create this scripts and add it to the git repo

I'm looking a third way :

  • stick to the onedev-buildspec, and write raw command (cp, mv...) in step
  • when one of these command failed in a step, the step failed early

Thanks for your help

bufferUnderrun changed title 8 months ago
Previous Value Current Value
Step state depending on all commands not the last one
Step state depending first command failed, not the last one
Robin Shen commented 8 months ago

You may put multiple commands in the run command step, it will run as a script. If you want to fail the step early when a command fails, just put set -e at start.

Robin Shen changed state to 'Closed' 8 months ago
Previous Value Current Value
Open
Closed
bufferUnderrun commented 6 months ago

late, but thank it works !!

issue 1 of 1
Type
Improvement
Priority
Normal
Assignee
Labels
No labels
Issue Votes (0)
Watchers (2)
Reference
onedev/server#1538
Please wait...
Page is in error, reload to recover