-
Notifications
You must be signed in to change notification settings - Fork 4
/
f0045.yml
35 lines (27 loc) · 917 Bytes
/
f0045.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
doc_meta: |
folder: env-vars
title: client validation
head: |
This showcases:
* Fail fast if a env var is not in the current shell session
It is always better to provide this type of validation so that it fail fast to ensure all the initial required data are gathered.
sections:
- title: Demo
log: yes
notes:
goal:
- show that if required ENV var is empty and it will fail if this is empty
storys:
- the env vars:
student_name: if it can not find it, it fails fast and execution stops
scopes:
- name: global
dvars:
- name: student_name
desc: show that if required ENV var is empty and it will fail if this is empty
value: '{{ env "STUDENT_NAME" |validateMandatoryFailIfNone "student_name" }}'
#same as below:
# value: '{{ expandenv "$STUDENT_NAME" |validateMandatoryFailIfNone "student_name" }}'
tasks:
-
name: task