Help with step values

I have just started testing with buildkite and even though I try to familiarize myself with its code I cannot find a way to solve my problem.
I use this Script Bash to do the job automatically.

But every time I run the build I need to modify these parameters:

                     SCRIPTROM=" "  (Text)
                     SCRIPTSYNC=" " (Yes or No)
                     PATCHROMS=" " (Yes or No)

To do it in a more visual and simple way, for when I have to configure the script from the mobile I have made these adjustments in the pipeline.yml

#################################################
steps:

  • label: Android
    input: “Build”
    fields:

    • select: “ROM”
      key: SCRIPTROM
      hint: “What rom do you want compile? :fork:
      required: false
      default: “aicp”
      options:

      • label: “Aex”
        value: “aex”
      • label: “Aokp”
        value: “aokp”
      • label: “Aicp”
        value: “aicp”
    • select: “Sync”
      key: "SCRIPTSYNC
      required: true
      default: “no”
      options:

      • label: “Yes”
        value: “yes”
      • label: “No”
        value: “no”
    • select: “Patch”
      key: “PATCHROMS”
      required: true
      default: “no”
      options:

      • label: “Yes”
        value: “yes”
      • label: “No”
        value: “no”
  • command: “/home/jimgsey/script/build.sh”
    label: “:shipit:
    env:
    SCRIPTROM: “”
    SCRIPTSYNC: “”

########################################################

I would like what I select on that initial screen to correspond to the variables that are executed on the bash script.

Thank you very much for your help and for this wonderful tool.

Regards

I’m afraid that input values aren’t automatically exposed as environment variables; you’ll need to have the script fetch them from the build metadata at runtime:

command: |
  export SCRIPTSYNC="$$(buildkite-agent meta-data get SCRIPTSYNC)"
  export SCRIPTROM="$$(buildkite-agent meta-data get SCRIPTROM)"
  /home/jimgsey/script/build.sh
1 Like
  • First I apologize for not responding earlier.
  • Second I just tried it and it works perfectly with my script.

Adding this entry in the pipeline has been enough. When I have time to touch up everything I want to add, I will upload my pipeline next to the script publicly in case anyone needs to see it as an example.

I appreciate your time and knowledge, thank you very much for your help.