Skip to content

Commit

Permalink
Add check job to perform a dry-run update
Browse files Browse the repository at this point in the history
  • Loading branch information
zigarn committed Dec 8, 2021
1 parent e9cca30 commit d785ecd
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/examples/check-only.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
description: >
Check update (dry-run) of Strigo class from Zenika training.
usage:
version: 2.1

orbs:
training-material: zenika/[email protected]
ztraining2strigo: zenika-training/[email protected]

workflows:
version: 2

build-and-check-update:
jobs:
- training-material/build
- ztraining2strigo/check:
requires:
- training-material/build
context: strigo-api
22 changes: 22 additions & 0 deletions src/jobs/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
description: >
Check update (dry-run) of Strigo class from Zenika training.
parameters:
config-file:
type: string
default: ''
docker:
- image: zenika/ztraining2strigo
steps:
- checkout
- attach_workspace:
at: ./
- run:
name: Check update of Strigo class
command: |
mkdir --parents pdf/
mv dist/pdf/* pdf/
if [ -n "<< parameters.config-file >>" ]; then
CONFIG_OPT='--config << parameters.config-file >>'
fi
python3 -m ztraining2strigo ${CONFIG_OPT} update --dry-run --diff

0 comments on commit d785ecd

Please sign in to comment.