Hello,
I need a hint how to handle variables in a self hosted runner on Linux, using KAS for setting up a Yocto project.
In my bitbucket-pipeline.yml file I have defined as follows:
definitions:
steps:
- step: &build
name: KAS Build
runs-on: [self.hosted, linux.shell]
script:
- kas checkout build.yml
- source generate_key.sh
- kas build --skip repos_checkout build.yml
The kas build.yml file contains:
My issue: the script generate_key.sh assigns a key to the variable KEY_HEX .
The kas build call should then forward the variable to the bitbake environment via BB_ENV_PASSTHROUGH_ADDITIONS.
But the variable content is not forwarded to bitbake.
My question is: how to export a variable from the script generate_key.sh to kas?
I guess all three calls within the script generate child processes that do not know variables from other.
Thank you very much for any advice!
Regards
Andreas
You'll need to explicitly export the variable.
You can do so either in the bash script:
Or export it in your YAML after sourcing:
script:
- kas checkout build.yml
- source generate_key.sh
- export KEY_HEX
- kas build --skip repos_checkout build.yml
If you're still not able to achieve this, please let me know your timezone so I can raise a support ticket on your behalf. Alternatively, you may also raise a ticket with our support team directly - as you have a paid workspace:
Having a formal support ticket allows us to grant access to your build environment so we can assist more easily.
Cheers!
- Ben (Bitbucket Cloud Support)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.