CI/CD Environment variables (OD-1348)
Artem Veschitsky opened 3 years ago

I not found how export variables. Now i use Execute Commands and export VAR=VALUE

But I think would be better if onedev have this feature.

gitlab have variables sections:

global:

variables:
  GLOBAL_VAR: "A global variable"

and on job

job1:
  variables:
    JOB_VAR: "A job variable"
  • Robin Shen commented 3 years ago

    Yes, this is preferred way to define environment variables. If you want to define variable for different jobs, consider define a property, and export the variable in command step something like below:

    export var = @property@

    This way you can maintain var value in one place.

  • Robin Shen commented 3 years ago

    export var = @property@

    Correct: export varName=@property:<property name>@

  • Robin Shen changed state to 'Closed' 3 years ago
    Previous Value Current Value
    Open
    Closed
issue 1/1
Type
New Feature
Priority
Normal
Assignee
Issue Votes (0)
Watchers (4)
Reference
OD-1348
Please wait...
Connection lost or session expired, reload to recover
Page is in error, reload to recover