-
You may use job dependency to retrieve published artifacts of another job into workspace of current job.
-
Check this tutorial for details:
-
Thanks for your response, Robin. Much headbanging later, I sort of figured out the issue.
In the second job, my container default directory is
/. For debug purposes I have a bash container that runsls. I have to go into/onedev-build/workspaceto access the artifacts.My question is now a little different. For running separate Docker containers, is putting
/onedev-build/workspaceas the working directory the expectation? Where does the env varJOB_WORKSPACEtie into all of this? The note at the top is somewhat misleading if setting the proper working directory has nothing to do withJOB_WORKSPACE.
-
Sorry there is a mistake here. The environment varibale should be
ONEDEV_WORKSPACEinstead ofJOB_WORKSPACEhere. It points to/onedev-build/workspacewhich will always be mounted to contain job workspace files (shared with other steps).Another approach is to mount the job workspace into your container via volume mounts. To mount job workspace itself, specify the source path as
. -
Name Previous Value Current Value Type
Support Request
Bug
Affected Versions
empty <=8.6.2
-
Previous Value Current Value Using JOB_WORKSPACE in Run Docker Containers step
JOB_WORKSPACE should be ONEDEV_WORKSPACE in run container step help
-
Name Previous Value Current Value Affected Versions
<=8.6.2
<=8.6.3
-
Name Previous Value Current Value Priority
Normal
Minor
-
Awesome, thanks for looking into it!
-
OneDev
changed state to 'Closed' 2 years ago
Previous Value Current Value Open
Closed
-
State changed as code fixing the issue is committed (94979a94)
-
OneDev
changed state to 'Released' 2 years ago
Previous Value Current Value Closed
Released
-
State changed as build #3946 is successful
| Type |
Bug
|
| Priority |
Minor
|
| Assignee | |
| Affected Versions |
<=8.6.3
|
| Labels |
No labels
|
I am extremely new to Docker so apologies if I am missing something obvious.
My OneDev instance is running in a Docker container. I have a set of published artifacts in the job workspace that I want to process in another Docker container. That container starts inside the home directory.
I don't quite understand how to use the environment variable
JOB_WORKSPACEas explained in the Run Docker Container step type. I cannot use@JOB_WORKSPACE@,${JOB_WORKSPACE}, or$JOB_WORKSPACEin Working Directory. Is the variable supposed to be manually set or referenced in a different way?