#835  Allow using @variables@ in RunContainerStep workingDir
Released
Matei Radu opened 2 weeks ago

Would it be possible to allow using @variables@ in workingDir of RunContainerStep?

The image name, container arguments, environment variables, and volume mount paths already allow them, with workingDir seemingly the only one left out.

For example, I want to set the working directory to match my volume target path, however the latter uses a variable and now the config is not so elegant or future-proof (e.g. project name changes):

- !RunContainerStep
  name: Run cargo test
  image: rust:latest
  workingDir: '/hardcoded-project-name' # needs to match @project_name@
  args: cargo test
  volumeMounts:
    - sourcePath: '@project_path@/'
      targetPath: '/@project_name@'
  useTTY: false
  condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
OneDev changed state to 'Closed' 2 weeks ago
Previous Value Current Value
Open
Closed
OneDev commented 2 weeks ago

State changed as code fixing the issue is committed

OneDev changed state to 'Released' 2 weeks ago
Previous Value Current Value
Closed
Released
OneDev commented 2 weeks ago

State changed as build #2870 (7.4.13) is successful

Matei Radu commented 2 weeks ago

Thanks for the quick action :)

issue 1 of 1
Type
New Feature
Priority
Minor
Assignee
Issue Votes (0)
Watchers (4)
Reference
issue onedev/server#835
Please wait...
Page is in error, reload to recover