Pass environment from CI to bitbake

3 views
Skip to first unread message

Toews, Artur

unread,
Jun 13, 2024, 4:50:03 AMJun 13
to kas-...@googlegroups.com

Hello,

 

I’d like to pass some information from my CI job to the image build.

In best case an environment variable.

 

e.g. “BUILDNUMBER=1 kas …

 

Is something like that possible?

 


Mit freundlichen Grüßen  
Best regards 

i. A. Artur Töws
B.Sc.
Manager of Embedded Software Development



Turck Electronics GmbH
Gildestr. 5 | 32760 Detmold, Germany
T +49 5231 948-0 | M +49 175 246299

artur...@turck.com | www.turck.com
 

         

Digital Innovation Park
Erfahren Sie mehr über Trends und Innovationen für Industrie 4.0 und IIoT auf www.turck.de/dip | Learn more about trends and innovations for Industry 4.0 and IIoT at www.turck.com/dip
 

Datenschutzerklärung | Privacy Policy
Unsere Datenschutzhinweise finden Sie auf www.turck.de/ds | Our privacy policy can be found at www.turck.com/pp
 


Turck Electronics GmbH | Sitz: Detmold | Amtsgericht Lemgo HRB 4921 | USt-IDNr. DE218686203 | Geschäftsführung: Dr.-Ing. Michael Gürtner, Dipl.-Wirt.-Ing. (FH) Christian Seliger (MBA)

MOESSBAUER, Felix

unread,
Jun 13, 2024, 9:08:11 AMJun 13
to Artur...@turck.com, kas-...@googlegroups.com
On Thu, 2024-06-13 at 08:49 +0000, Toews, Artur wrote:
> Hello,
>  
> I’d like to pass some information from my CI job to the image build.
> In best case an environment variable.

Hi,

this is possible by defining the variables in the top-level "env" node
of the config [1]. Let me cite the docs:

Contains environment variable names with either default values or null.
These variables are made available to bitbake via
BB_ENV_PASSTHROUGH_ADDITIONS (BB_ENV_EXTRAWHITE in older Bitbake
versions) and can be overwritten by the variables of the environment in
which kas is started. Either a string or nothing (null) can be assigned
as value. The former one serves as a default value whereas the latter
one will lead to add the variable only to BB_ENV_PASSTHROUGH_ADDITIONS
and not to the environment where kas is started. Please note, that null
needs to be assigned as the nulltype (e.g. MYVAR: null), not as ‘null’.

Example:

header: 15
env:
BUILDNUMBER:

export BUILDNUMBER=1
kas build ...

[1]
https://kas.readthedocs.io/en/latest/userguide/project-configuration.html


Best regards,
Felix


>  
> e.g. “BUILDNUMBER=1 kas …”
>  
> Is something like that possible?
>  
>
> Mit freundlichen Grüßen  
> Best regards 
>
> i. A. Artur Töws
> B.Sc.
> Manager of Embedded Software Development
>
>
>
> Turck Electronics GmbH
> Gildestr. 5 | 32760 Detmold, Germany
> T +49 5231 948-0 | M +49 175 246299
> artur...@turck.com | www.turck.com
>  
>      
>
> Digital Innovation Park
> Erfahren Sie mehr über Trends und Innovationen für Industrie 4.0 und
> IIoT auf www.turck.de/dip | Learn more about trends and innovations
> for Industry 4.0 and IIoT at www.turck.com/dip
>  
> Datenschutzerklärung | Privacy Policy
> Unsere Datenschutzhinweise finden Sie auf www.turck.de/ds | Our
> privacy policy can be found at www.turck.com/pp
>  
> Turck Electronics GmbH | Sitz: Detmold | Amtsgericht Lemgo HRB 4921 |
> USt-IDNr. DE218686203 | Geschäftsführung: Dr.-Ing. Michael Gürtner,
> Dipl.-Wirt.-Ing. (FH) Christian Seliger (MBA)

--
Siemens AG, Technology
Linux Expert Center


Toews, Artur

unread,
Jun 14, 2024, 12:52:02 AMJun 14
to MOESSBAUER, Felix, kas-...@googlegroups.com
Hi,

thank you. That works for me.


Mit freundlichen Grüßen
Best regards

i. A. Artur Töws
B.Sc.
Manager of Embedded Software Development

Turck Electronics GmbH
Gildestr. 5 | 32760 Detmold, Germany
T +49 5231 948-0 | M +49 175 246299

artur...@turck.com | www.turck.com


Digital Innovation Park
Erfahren Sie mehr über Trends und Innovationen für Industrie 4.0 und IioT auf www.turck.de/dip | Learn more about trends and innovations for Industry 4.0 and IioT at www.turck.com/dip

Datenschutzerklärung | Privacy Policy
Unsere Datenschutzhinweise finden Sie auf www.turck.de/ds | Our privacy policy can be found at www.turck.com/pp

> -----Ursprüngliche Nachricht-----
> Von: MOESSBAUER, Felix <felix.mo...@siemens.com>
> Gesendet: Donnerstag, 13. Juni 2024 15:08
> An: Toews, Artur <Artur...@turck.com>; kas-...@googlegroups.com
> Betreff: Re: Pass environment from CI to bitbake
>
>
> External E-Mail
________________________________
Turck Electronics GmbH | Sitz: Detmold | Amtsgericht Lemgo HRB 4921 | USt-IDNr. DE218686203 | Geschäftsführung: Dr.-Ing. Michael Gürtner, Dipl.-Wirt.-Ing. (FH) Christian Seliger (MBA)
________________________________
Reply all
Reply to author
Forward
0 new messages