Step state depending first command failed, not the last one (OD-1538)
bufferUnderrun opened 2 years 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 2 years 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 2 years 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' 2 years ago
    Previous Value Current Value
    Open
    Closed
  • bufferUnderrun commented 2 years ago

    late, but thank it works !!

issue 1/1
Type
Improvement
Priority
Normal
Assignee
Labels
No labels
Issue Votes (0)
Watchers (2)
Reference
OD-1538
Please wait...
Connection lost or session expired, reload to recover
Page is in error, reload to recover