How to pass artifact to a trigger

Hi all,

I have a script like the following:

Script for build 1

steps:

  • wait
  • label: “create artifact”
    command: echo “something” > textfile
    artifact_paths: [“textfile”]
  • trigger: another_build

Script for another_build

steps:

  • wait
  • label: “display artifact”
    command: cat textfile

My question is how to pass the artifact “textfile” from one job to another job?

Thank you