Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Bitbucket runner configuration to call a kas build process

andreas_jung
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 12, 2026

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:

env:
   KEY_HEX: none

 

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

 

 

1 answer

0 votes
Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 14, 2026

Hi @andreas_jung 

You'll need to explicitly export the variable.

You can do so either in the bash script:

  • export KEY_HEX=<generated_value>

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)

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events