All of lore.kernel.org
 help / color / mirror / Atom feed
* [yocto and jenkins]
@ 2014-06-02 22:38 Insop Song
  2014-06-02 23:03 ` Paul Barker
  0 siblings, 1 reply; 6+ messages in thread
From: Insop Song @ 2014-06-02 22:38 UTC (permalink / raw)
  To: Yocto Project Discussion, Khem Raj

All,

I've been building yocto using jenkins.

I want to include yocto's build environment variable "BUILD_NUMBER" to
yocto's kernel.

1, I've tried this in one of my conf file, add

GS_SDK_VERSION = "GS-SDK-V1.5-${BUILD_NUMBER}"

But ${BUILD_NUMBER} is not expended


2, I've looked at Keon's example from
https://git.linaro.org/openembedded/jenkins-setup.git

I've put the following in conf/local.conf

JENKINS_BUILD_NUMBER = "`echo ${BUILD_NUMBER}`"

Then add GS_SDK_VERSION = "GS-SDK-V1.5-${JENKINS_BUILD_NUMBER}"

It still doesn't expand.

So my question is

- how to include environment variable to yocto's running?

Thank you,

Insop


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [yocto and jenkins]
  2014-06-02 22:38 [yocto and jenkins] Insop Song
@ 2014-06-02 23:03 ` Paul Barker
  2014-06-03  0:26   ` Insop Song
  0 siblings, 1 reply; 6+ messages in thread
From: Paul Barker @ 2014-06-02 23:03 UTC (permalink / raw)
  To: Insop Song; +Cc: Yocto Project Discussion

[-- Attachment #1: Type: text/plain, Size: 1185 bytes --]

On Mon, Jun 02, 2014 at 03:38:43PM -0700, Insop Song wrote:
> All,
> 
> I've been building yocto using jenkins.
> 
> I want to include yocto's build environment variable "BUILD_NUMBER" to
> yocto's kernel.
> 
> 1, I've tried this in one of my conf file, add
> 
> GS_SDK_VERSION = "GS-SDK-V1.5-${BUILD_NUMBER}"
> 
> But ${BUILD_NUMBER} is not expended
> 
> 
> 2, I've looked at Keon's example from
> https://git.linaro.org/openembedded/jenkins-setup.git
> 
> I've put the following in conf/local.conf
> 
> JENKINS_BUILD_NUMBER = "`echo ${BUILD_NUMBER}`"
> 
> Then add GS_SDK_VERSION = "GS-SDK-V1.5-${JENKINS_BUILD_NUMBER}"
> 
> It still doesn't expand.
> 
> So my question is
> 
> - how to include environment variable to yocto's running?

As a guess, bitbake is ignoring the value of the BUILD_NUMBER environment
variable. You can add the variable to BB_ENV_EXTRAWHITE but you need to do so
outside of bitbake as the value needs to be set when bitbake starts
(BB_ENV_EXTRAWHITE is an environment variable).

Googling BB_ENV_EXTRAWHITE should provide more information.

-- 
Paul Barker

Email: paul@paulbarker.me.uk
http://www.paulbarker.me.uk

[-- Attachment #2: Type: application/pgp-signature, Size: 501 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [yocto and jenkins]
  2014-06-02 23:03 ` Paul Barker
@ 2014-06-03  0:26   ` Insop Song
  2014-06-03  6:50     ` Nicolas Dechesne
  2014-06-04  9:53     ` Paul Eggleton
  0 siblings, 2 replies; 6+ messages in thread
From: Insop Song @ 2014-06-03  0:26 UTC (permalink / raw)
  To: Paul Barker; +Cc: Yocto Project Discussion

Thank you very much Paul.

Setting "export BB_ENV_EXTRAWHITE=${BUILD_NUMBER}" fixed the issue.

Regards,

Insop

On Mon, Jun 2, 2014 at 4:03 PM, Paul Barker <paul@paulbarker.me.uk> wrote:
> On Mon, Jun 02, 2014 at 03:38:43PM -0700, Insop Song wrote:
>> All,
>>
>> I've been building yocto using jenkins.
>>
>> I want to include yocto's build environment variable "BUILD_NUMBER" to
>> yocto's kernel.
>>
>> 1, I've tried this in one of my conf file, add
>>
>> GS_SDK_VERSION = "GS-SDK-V1.5-${BUILD_NUMBER}"
>>
>> But ${BUILD_NUMBER} is not expended
>>
>>
>> 2, I've looked at Keon's example from
>> https://git.linaro.org/openembedded/jenkins-setup.git
>>
>> I've put the following in conf/local.conf
>>
>> JENKINS_BUILD_NUMBER = "`echo ${BUILD_NUMBER}`"
>>
>> Then add GS_SDK_VERSION = "GS-SDK-V1.5-${JENKINS_BUILD_NUMBER}"
>>
>> It still doesn't expand.
>>
>> So my question is
>>
>> - how to include environment variable to yocto's running?
>
> As a guess, bitbake is ignoring the value of the BUILD_NUMBER environment
> variable. You can add the variable to BB_ENV_EXTRAWHITE but you need to do so
> outside of bitbake as the value needs to be set when bitbake starts
> (BB_ENV_EXTRAWHITE is an environment variable).
>
> Googling BB_ENV_EXTRAWHITE should provide more information.
>
> --
> Paul Barker
>
> Email: paul@paulbarker.me.uk
> http://www.paulbarker.me.uk


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [yocto and jenkins]
  2014-06-03  0:26   ` Insop Song
@ 2014-06-03  6:50     ` Nicolas Dechesne
  2014-06-04  9:53     ` Paul Eggleton
  1 sibling, 0 replies; 6+ messages in thread
From: Nicolas Dechesne @ 2014-06-03  6:50 UTC (permalink / raw)
  To: Insop Song; +Cc: Yocto Project Discussion

On Tue, Jun 3, 2014 at 2:26 AM, Insop Song <insop.song@gmail.com> wrote:
> Setting "export BB_ENV_EXTRAWHITE=${BUILD_NUMBER}" fixed the issue.

and just for the record, the Linaro jenkins script set IMAGE_NAME in
the generated site.conf file, see [1]. this file is generated by the
Jenkins build scripts, prior to the build.

[1] https://git.linaro.org/openembedded/jenkins-setup.git/blob/HEAD:/functions.sh#l304


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [yocto and jenkins]
  2014-06-03  0:26   ` Insop Song
  2014-06-03  6:50     ` Nicolas Dechesne
@ 2014-06-04  9:53     ` Paul Eggleton
  2014-06-05  0:57       ` Insop Song
  1 sibling, 1 reply; 6+ messages in thread
From: Paul Eggleton @ 2014-06-04  9:53 UTC (permalink / raw)
  To: Insop Song; +Cc: yocto

On Monday 02 June 2014 17:26:08 Insop Song wrote:
> Thank you very much Paul.
> 
> Setting "export BB_ENV_EXTRAWHITE=${BUILD_NUMBER}" fixed the issue.

I think that should be "export BB_ENV_EXTRAWHITE=BUILD_NUMBER" (since it's the 
variable name you're allowing through, not just the value).

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [yocto and jenkins]
  2014-06-04  9:53     ` Paul Eggleton
@ 2014-06-05  0:57       ` Insop Song
  0 siblings, 0 replies; 6+ messages in thread
From: Insop Song @ 2014-06-05  0:57 UTC (permalink / raw)
  To: Paul Eggleton; +Cc: Yocto Project Discussion

Thank you for the corection Paul, yes you are right.

I actually run the following from jenkins job

export BB_ENV_EXTRAWHITE="BUILD_NUMBER"
source SOURCE_THIS
bitbake our_image

On Wed, Jun 4, 2014 at 2:53 AM, Paul Eggleton
<paul.eggleton@linux.intel.com> wrote:
> On Monday 02 June 2014 17:26:08 Insop Song wrote:
>> Thank you very much Paul.
>>
>> Setting "export BB_ENV_EXTRAWHITE=${BUILD_NUMBER}" fixed the issue.
>
> I think that should be "export BB_ENV_EXTRAWHITE=BUILD_NUMBER" (since it's the
> variable name you're allowing through, not just the value).
>
> Cheers,
> Paul
>
> --
>
> Paul Eggleton
> Intel Open Source Technology Centre


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-06-05  0:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-02 22:38 [yocto and jenkins] Insop Song
2014-06-02 23:03 ` Paul Barker
2014-06-03  0:26   ` Insop Song
2014-06-03  6:50     ` Nicolas Dechesne
2014-06-04  9:53     ` Paul Eggleton
2014-06-05  0:57       ` Insop Song

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.