Thanks Milosz, I am not getting error anymore. But my job is still not able to take the value. Please find the test action I tried :
- test:
    timeout:
      minutes: 5
    definitions:
    - repository: https://lava_test_token:${GIT_TOKEN}@gitlab.com/testing/lava-tests.git
      from: git
      path: tests/cisscan/cis.yaml
      branch: lava-pipeline
      name: cis-benchmark

Is there way to call the value in job like in context or environment?

Thanks,
Sweta


From: Milosz Wasilewski <milosz.wasilewski@foundries.io>
Sent: Thursday, August 29, 2024 2:04 PM
To: Sweta Ghosh <sweta.ghosh@nagarro.com>
Cc: lava-users@lists.lavasoftware.org <lava-users@lists.lavasoftware.org>
Subject: Re: [lava-users] Not able to set variable
 
[Email from a non-Nagarro source: please exercise caution with links and attachments]


On Thu, Aug 29, 2024 at 9:31 AM Sweta Ghosh <sweta.ghosh@nagarro.com> wrote:
>
> Hello Milosz,
>
> Thanks for replying.
>
> I have a single node setup, so worker and server is same. I updated /etc/lava-server/env.yaml file with GIT_TOKEN value like below. But I get error Invalid yaml when I execute job:
> root@debian:~# cat /etc/lava-server/env.yaml
> # Configure the environment that will be used within the server and the dispatcher.
>
> # If set to true, all variables inherited by the process will be dropped.
> # The process environment is then fully controlled but you should then list all
> # variables that your process needs.
> purge: true
>
> # List the variables that will be removed from the inherited environment.
> # If purge is 'true', this list is useless.
> # default: empty list
> #removes:
> #- HTTP_PROXY
> #- HTTPS_PROXY
> #- FTP_PROXY
> #- NO_PROXY
>
> # A dictionary of (key, value) that will be added to the inherited environment.
> # If a key does not already exist in the inherited environment, it's added.
> # default: an empty dictionary
> overrides:
>   LC_ALL: C.UTF-8
>   LANG: C
> #  http_proxy: http://lava-lab-proxy
> #  https_proxy: http://lava-lab-proxy
> #  ftp_proxy: http://lava-lab-proxy
>   PATH: /usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/usr/sbin:/sbin
> GIT_TOKEN=abcd

It needs to be a valid YAML. You need to align the indentation with
other variables in "overrides" section. Also use GIT_TOKEN: "<token
value>" instead of "="

Best Regards,
Milosz