How can I start job after a a trigger is finished successfully?

I have a simple CI script which contains one trigger and one job, right now the trigger and the job always run in parallel, Is there a way for me to run them sequentially? (I would like to run test only after the trigger_build is completed successfully)

Below is my sample script:

- trigger_build
- test

stage: trigger_build
- “curl -X POST -F token=mytoken -F ref=ci-test

stage: test
script: cat file1.txt | grep -q “Hello”