module validation
Showcase the validation rules apply
source
rules
- no duplicated name of module, eg alias has to be unique
example
Ξ up-project/up-gitlab git:(v2) ▶ up mod list -d ./tests/modtests/$1 -i dev --configdir=./tests/modtests/$1 -w refdir 0009
loading [Config]: ./tests/modtests/0009/upconfig.yml
Main config:
Version -> 1.0.0
RefDir -> ./tests/modtests/0009
WorkDir -> refdir
TaskFile -> up.yml
Verbose -> vvv
ModuleName -> silly_pare9
MaxCallLayers -> 8
work dir:
loading [Task]: ./up.yml
module: [silly_pare9] instance id: [dev]
-list all modules:
+-----+-------------------------------+----------------------------+-------------------------------------------+---------+------------+------------+--------+
| IDX | ALIAS | DIR | REPO | VERSION | PULLPOLICY | INSTANCEID | SUBDIR |
+-----+-------------------------------+----------------------------+-------------------------------------------+---------+------------+------------+--------+
| 1 | hello-module | .upmodules/hello-module | https://github.com/upcmd/hello-module.git | master | skip | nonamed | |
| 2 | module-a | .upmodules/module-a | https://github.com/upcmd/module-a.git | master | always | nonamed | |
| 3 | himodule | himodule | https://github.com/upcmd/hello-module.git | master | skip | nonamed | |
| 4 | module-b-subdir | .upmodules/module-b-subdir | https://github.com/upcmd/module-b.git | master | skip | nonamed | a/b |
| 5 | module-c | .upmodules/module-c | https://github.com/upcmd/module-c.git | 1.0.0 | skip | nonamed | |
| 6 | hi | .upmodules/hi | https://github.com/upcmd/hello-module.git | master | skip | nonamed | |
| 7 | sayhello | .upmodules/sayhello | https://github.com/up/sayhello.git | abc123e | skip | nonamed | |
| 8 | a_relative_dir_module | c/d | | | | nonamed | |
| 9 | himod | c/d | | | | nonamed | |
| 10 | absolute_path_module | /etc/c/d | | | | nonamed | |
| 11 | absolute_path_with_iid_module | /etc/c/d | | | | dev | |
+-----+-------------------------------+----------------------------+-------------------------------------------+---------+------------+------------+--------+
-validate all modules:
config file - upconfig.yml
version: 1.0.0
Verbose: vvv
MaxCallLayers: 8
RefDir: .
TaskFile: up.yml
ConfigDir: .
ConfigFile: upconfig.yml
Modules:
- repo: https://github.com/upcmd/hello-module.git
_dir: sayhi
_alias: sayhi
_version: master
_iid: noname
- repo: https://github.com/upcmd/module-a.git
pullpolicy: always
- repo: https://github.com/upcmd/hello-module.git
dir: himodule
alias: himodule
_version: master
_iid: noname
- repo: https://github.com/upcmd/module-b.git
subdir: a/b
alias: module-b-subdir
_dir: sayhi
:>alias: require setup to make it clear what the module name is
_version: master
_iid: noname
- repo: https://github.com/upcmd/module-c.git
version: 1.0.0
_dir: sayhi
_alias: sayhi
_iid: noname
- repo: https://github.com/upcmd/hello-module.git
alias: hi
_version: master
_dir: sayhi
_iid: noname
- repo: https://github.com/up/sayhello.git
version: abc123e
_alias: sayhello
_dir: sayhello
_iid: noname
-
dir: c/d
alias: a_relative_dir_module
:>alias: require setup to make it clear what the module name is
_iid: noname
-
dir: c/d
alias: himod
_iid: noname
- dir: /etc/c/d
:>alias: require setup to make it clear what the module name is
alias: absolute_path_module
_iid: noname
- dir: /etc/c/d
:>alias: require setup to make it clear what the module name is
alias: absolute_path_with_iid_module
iid: dev
Main log file
loading [Config]: ./tests/modtests/0009/upconfig.yml
Main config:
Version -> 1.0.0
RefDir -> ./tests/modtests/0009
WorkDir -> refdir
AbsWorkDir -> /up_project/up/tests/modtests/0009
TaskFile -> up.yml
Verbose -> v
ModuleName -> self
ShellType -> /bin/sh
MaxCallLayers -> 8
Timeout -> 3600000
MaxModuelCallLayers -> 256
EntryTask -> Main
ModRepoUsernameRef ->
ModRepoPasswordRef ->
work dir: /up_project/up/tests/modtests/0009
-exec task: Main
loading [Task]: ./up.yml
module: [self], instance id: [dev], exec profile: []
Task1: [Main ==> Main: main entry ]
Logs with different verbose level
Raw logs with different verbose level