github.com/upcmd/up@v0.8.1-0.20230108151705-ad8b797bf04f/tests/functests/e0194.yml (about) 1 notes: | 2 documented in docs: 3 goup ngo -p test_eprofile_exec -d ./tests/functests -t e0194.yml --configdir=./tests/functests 4 5 ### CICD Pipeline integration 6 7 To integrate with pipeline, one challenge is to manage the input args. By using execution profile, we aim to reduce the number of input parameters and fill in or configure the manually in many places in cicd platforms or pipelines 8 9 In order to achieve this, we can use two optional fields: 10 11 ``` 12 taskname: a_entry_task_name 13 verbose: vvv 14 ``` 15 16 It simply instruct up cli to use the indicated task name and verbose level instead of the task name and verbose as command line argument 17 18 so this turns the command line from: 19 20 ``` 21 up ngo task_to_call_dictated_by_eprofile -v v 22 ``` 23 24 to: 25 26 ``` 27 up ngo -p test_eprofile_exec 28 ``` 29 30 eprofiles: 31 - name: test_eprofile_exec 32 instance: dev 33 taskname: task_to_call_dictated_by_eprofile 34 verbose: vvv 35 36 evars: 37 - name: ENV_VAR_AAA 38 value: aaa 39 40 tasks: 41 - 42 name: task 43 desc: this task now is not entry anymore 44 task: 45 - 46 func: cmd 47 do: 48 - name: print 49 cmd: hahaha 50 51 - 52 name: task_to_call_dictated_by_eprofile 53 task: 54 - 55 func: cmd 56 desc: | 57 if you use eprofile, then evar UP_EXEC_ENTRY_TASK_NAME's value will be used as entry task, it will override whatever has been input from command line 58 do: 59 - name: print 60 cmd: this is a entry task according to the evar - UP_EXEC_ENTRY_TASK_NAME 61 - 62 func: shell 63 desc: | 64 UP_EXEC_ENTRY_TASK_NAME should be empty as it is not register into env vars but only used for program entry 65 do: 66 - echo """UP_EXEC_ENTRY_TASK_NAME:${UP_EXEC_ENTRY_TASK_NAME}""" 67 - echo """ENV_VAR_AAA:${ENV_VAR_AAA}""" 68 - env |grep ENV_VAR_AAA 69 - source ./tests/functests/test_env.src; env |grep UP_GLOBAL