Pass vars to next job (OD-1397)
Closed
Daniel Kollmannsberger opened 1 year ago

At first big thx for this wonderful VCS! ❤️ Ive been looking for something like this for a long a time ago!

Currently Im rebuilding by cicd pipelines to the onedev syntax. I installed onedev in my kubernetes cluster additional an executor inside my cluster.

So every step is in another pod. But how do I pass vars from one container to another? I did a workaround by creating files with the needed value in it and use the exact same file in the next container.

Is there a better way?

Thanks! Daniel

Robin Shen commented 1 year ago

Thanks for using OneDev. Passing info by file is the only approach in OneDev, whether it is between different containers in same job, or between different job (for different job, you will need to publish these files first and then have other jobs retrieving it via dependency).

Daniel Kollmannsberger changed fields 1 year ago
Name Previous Value Current Value
Type
Support Request
Improvement
Daniel Kollmannsberger changed fields 1 year ago
Name Previous Value Current Value
Type
Improvement
New Feature
Daniel Kollmannsberger commented 1 year ago

Thanks for the response ;)

I added a New Feature Tag, if I find some time in this week Ill try to bring a pull request to you if its okay ;)

Daniel

Robin Shen commented 1 year ago

Thanks for willing to help. Mind sharing your idea before gets hand dirty?

OneDev changed state to 'Closed' 1 year ago
Previous Value Current Value
Open
Closed
OneDev commented 1 year ago

State changed as code fixing the issue is committed (de8a7820493b79d4337d96955d9437df3cb77cc5)

Robin Shen changed state to 'Open' 1 year ago
Previous Value Current Value
Closed
Open
Robin Shen commented 1 year ago

Sorry closing the wrong issue

Robin Shen changed state to 'Closed' 1 year ago
Previous Value Current Value
Open
Closed
Robin Shen commented 1 year ago

I am closing this. Feel free to reopen if this needs to be done

sokharev commented 2 weeks ago

For those who wanting pass via powershell in windows i've done following trick(strange that only this working):

  1. in first job setx MY_BYPASS_VAR MY_VALUE
  2. in any later job [Environment]::GetEnvironmentVariable('MY_BYPASS_VAR', [System.EnvironmentVariableTarget]::User)

==========

Not sure why other 'rational' (like Set Env variable for 'User') NOT working. There is 'issue' in powershell github repo about messy with this, but this is too tough.

issue 1 of 1
Type
New Feature
Priority
Normal
Assignee
Issue Votes (0)
Watchers (5)
Reference
OD-1397
Please wait...
Page is in error, reload to recover