navigation

UPcmd github source

User Manual

Chapter 1 installation and usage

  1. command line basics
  2. installation
  3. list tasks
  4. config yml
  5. command args
  6. use upcli docker image
  7. public and protected tasks
  8. working directory

Chapter 2 quick start

  1. First task - hello world
  2. Multiple Steps
  3. Yaml literal
  4. Use array
  5. manage dependencies
  6. call func (power up)
  7. use env var
  8. syntax variation
  9. how to run the examples
  10. a little taste of UPcmd

Chapter 3 vars

  1. Use variables
  2. vars in func
  3. variables in callee
  4. use vars
  5. use golang template
  6. var rendering
  7. local vars
  8. local vs reg global
  9. var scope and accessibility
  10. var scope in callee
  11. task scope
  12. taskScope vars in callee
  13. local vars from file
  14. use pure local vars
  15. taskScope vars in block
  16. probe exisitence of path
  17. use vars in desc

Chapter 4 call func

  1. assemble worlflow
  2. call func as interface
  3. overriden in callee
  4. multiple layers overriding
  5. return values
  6. sequence matters in return 1
  7. sequence matters in return 2
  8. chained calls and return values

Chapter 5 scope

  1. vars intro
  2. externalize settings
  3. leave merge
  4. runtime merge

Chapter 6 dvars

  1. dvars intro
  2. complext object
  3. string literal
  4. convert dvar
  5. externalize settings
  6. dvars in scopes
  7. complex case
  8. leave level merge
  9. instance level merge
  10. local scope merge
  11. dvars in call
  12. dynamics on dynamics
  13. load file using dvar
  14. dvar to global
  15. datakey as source
  16. void for action
  17. load from refdir
  18. datapath
  19. datatemplate

Chapter 7 golang template

  1. builtin funcs
  2. sprig funcs
  3. gtf funcs
  4. advanced usage
  5. use loop
  6. range and outer value
  7. UPcmd internal template funcs
  8. all template funcs
  9. splitLines func
  10. type compare
  11. yml obj json conversion

Chapter 8 shell func

  1. register result
  2. check result
  3. ignore error
  4. handle std err
  5. silent the shell execution

Chapter 9 design patterns

  1. workflow skeleton
  2. basic cli skeleton
  3. data structure
  4. modular tasks
  5. externalise task def
  6. call and vars
  7. design patterns
  8. private var scope

Chapter 10 environment vars

  1. basics
  2. client validation
  3. environment vars
  4. declare env var
  5. env vars in scopes
  6. environment vars
  7. virtualEnv cmd

Chapter 11 security

  1. builtin en/decryption
  2. use env var to encrypt and decrypt
  3. secure env var
  4. use valut to store secrets
  5. encrypteAesWithVault template func to retrieve and encrypt
  6. mask senstive info in shell execution
  7. retrieve secret from valut

Chapter 12 flow controll

  1. if condition
  2. if condition advanced
  3. use pause
  4. Exit result per step
  5. dynamic routing
  6. dynamic routing extra
  7. loopitem in callee's dvar
  8. use break in call
  9. non-exist value if
  10. indirect reference
  11. else in hard way
  12. else branch
  13. else with a flow
  14. None value
  15. final cleanup when shell exceution fails
  16. final cleanup without resuce
  17. guaranteed final step to ensure clean up/rescue
  18. finally steps block
  19. conditionally error handling
  20. finally/resuce support in task level
  21. final step using block
  22. finally in subtask level
  23. finally in subtask called from block
  24. finally subtask no ignoreError
  25. finally/resuce support in subtask level
  26. complex task finally in sub task
  27. finally/resuce support in subtask level
  28. task finally always emit
  29. finally/resuce support in task level

Chapter 13 loop

  1. loopitem in dvar
  2. multi-layers loop 1
  3. multi-layers loop 2
  4. loop with condition
  5. condition with until
  6. break recursive loop
  7. loop usage guide
  8. loop with var name
  9. loop with range iterator
  10. loop and retry example
  11. use dynamic variable in until

Chapter 14 config organization

  1. ref task
  2. use case 1
  3. use case 2
  4. use tasksref
  5. load from refdir
  6. config file loading

Chapter 15 cmd func

  1. print message
  2. reg and deReg
  3. read/write file
  4. sleep
  5. toObj
  6. delete in yml file
  7. modify yml content
  8. break cmd
  9. color print
  10. template using data file
  11. tmp file
  12. tmp file with dynamic file handler

Chapter 16 block func

  1. use block
  2. embeded block
  3. block in else
  4. call task from block
  5. call block from task
  6. testcase1 for block
  7. test case 1
  8. test case 2
  9. test case 3
  10. complicated test case 4
  11. complicated test case 5

Chapter 17 templating

  1. templating using dvar
  2. use template cmd
  3. datakey and datapath

Chapter 18 test and debug

  1. verbose flag
  2. pause and inspect
  3. ues trace
  4. assert and inspect
  5. failFast
  6. deactivated step
  7. deactivated sub step in cmd
  8. fail
  9. error handling

Chapter 19 user interaction

  1. profile with env vars
  2. externise exec profile
  3. prompt in taskScope
  4. user prompt
  5. chained pipein from stdin
  6. profile with env vars logs
  7. exec profile example
  8. exec profile with entry task
  9. exec profile with pure env flag
  10. exec profile with alternative entry

Chapter 20 object oriented

  1. reg/deReg/void
  2. parse yml to object
  3. query
  4. map structure result
  5. reg/set an object
  6. access and register sub object 1
  7. access and register sub object 2

Chapter 21 syntax

  1. multiline styles

Chapter 22 advanced use cases

  1. web scraping example
  2. upcmd doco auto generation

Chapter 23 modules

  1. module commands
  2. module config
  3. module repo auth
  4. HelloWorld example
  5. simple vars
  6. return value
  7. jailed exec context
  8. Complex vars
  9. Complex call layers
  10. use alias
  11. moule lock
  12. module validation
  13. multi module calls
  14. module multi vesioning
  15. max module restriction
  16. manage indirect dependencies
  17. <no value>

Chapter 24 idea and faq

  1. mutli-threads/concurrency
  2. watch and monitoring
  3. more funcs support
  4. http/rest api support
  5. cli tools work with

Chapter 26 Error_handlings

  1. last_result pass through block func