Problem to solve
I need to pass variables from Stage test to stage deploy.
Stage test has multiple jobs running in parallel(test0,test1,test2).
Every job(test) when succeeded, pass a variable called EVAL*=$CI_JOB_NAME (with * the number accorded to it [0,1,2]).
In deploy job should these variable in array stored(if any), and when we iterate through it we can see which test job has succeeded(according to name) and ready to deploy(merging to master). This approach is meant to be used with 50 tests in parallel. My Configuration is below, syntax is not relevant, it is only to demonstrate the idea.
test0: stage: test tags: [ci_test] script: - do something - if something: EVAL0=$CI_JOB_NAME artifacts: when: always test1: stage: test tags: [ci_test] script: - do something - if something: EVAL1=$CI_JOB_NAME artifacts: when: always test2: stage: test tags: [ci_test] script: - do something - if something: EVAL2=$CI_JOB_NAME artifacts: when: always deploy test: stage: deploy tags: [ci_test] script: - array+=($EVAL(i) for in (0,1,2)) - for v in array; do echo v and do something with v;done artifacts: when: always
Question
Is it possible in Gitlab to do so, and if yes can you lead me through that procedure.