Skip to content

Exit batch script with error if docker commands fail - #428

Merged
nuclearsandwich merged 1 commit into
masterfrom
brawner/exit_on_failure
Apr 14, 2020
Merged

nuclearsandwich merged 1 commit into
masterfrom
brawner/exit_on_failure

Conversation

@brawner

@brawner brawner commented Apr 10, 2020

Copy link
Copy Markdown
Contributor

If commands fail in a batch script, it tends to continue without failing. Unfortunately, there is not a cmd equivalent of set -e so it's common to use the || exit /b %errorlevel% paradigm used below. I'm adding it to just the commands that are likely to fail in this script.

Depends on #427
New commit: d00fbb7

@brawner brawner self-assigned this Apr 10, 2020

@cottsay cottsay left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Build Status

@nuclearsandwich

Copy link
Copy Markdown
Member

@brawner there's a conflict that needs to be resolved. If you give me the 👌 I'll do a dry run to make sure this PR doesn't introduce a deploy error then merge and deploy it this afternoon.

@brawner
brawner force-pushed the brawner/exit_on_failure branch from d00fbb7 to 3dee491 Compare April 14, 2020 20:28
@nuclearsandwich

Copy link
Copy Markdown
Member

@cottsay since this PR touches the job templates only I'm not sure that your CI job exercised it at all. Am I missing something?

@cottsay

cottsay commented Apr 14, 2020

Copy link
Copy Markdown
Member

You're correct - I was mistaken.

@nuclearsandwich nuclearsandwich left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works when dry-run locally.

@nuclearsandwich
nuclearsandwich merged commit bb8cfb3 into master Apr 14, 2020
@nuclearsandwich
nuclearsandwich deleted the brawner/exit_on_failure branch April 14, 2020 21:45
@nuclearsandwich

Copy link
Copy Markdown
Member

Deployed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants