How to use pre and post steps with orb job commands

Overview

It is natural to think to add a post or pre step within the workflow stanza along with orb commands. The correct way to define these along with parameters would be the following example.

 

Example

Here is an example


version: 2.1

#add orb stanza as usual, argocd-orb/default and argocd/deploy commands as example

jobs:
deploy-test-argo:
executor: argocd-orb/default
steps:
- attach_workspace:
at: /tmp
- argocd-orb/deploy:
app: foobar
version: v1.0.0
env: test

workflows:
build:
jobs:
- deploy-test-argo:
pre-steps: # steps to run before steps defined in the job bar
- run:
command: echo "test pre"
- attach_workspace:
at: /tmp
post-steps: # steps to run after steps defined in the job bar
- run:
command: echo "test post"
- persist_to_workspace:
root: /tmp
paths:
- path1


 

Additional Resources

Deployment overview

Was this article helpful?
1 out of 1 found this helpful

Comments

0 comments

Please sign in to leave a comment.