You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Dynamic jobs created via an output to /infrabox/output/infrabox.json force future docker-image jobs to lose Git context by binding /infrabox/context to /data/repo/.infrabox/output
To Reproduce
Create a dynamic job by copying an infrabox.json file to /infrabox/output/infrabox.json with a docker-image type job.
Git repo is cloned like normal
Git context is inaccessible because docker mounts are as follows:
Expected behavior
Normal docker-image jobs would have context set to the git repo (/data/repo). Context is empty unless other files are copied to /infrabox/output
Our use case was to write a tool that would run workflows (specific infrabox.json files) on specific branches. If the branch matched, the file was copied to /infrabox/output/infrabox.json (ie: master or release branch workflows). Unfortunately the workflows subsequently failed because the git repo was inaccessible to the dynamically created jobs.
Clarifying that this issue primarily affects docker-image jobs since in docker jobs the build_context can be changed (to ../.. in most examples I've seen) which I don't believe is possible with docker-image
The text was updated successfully, but these errors were encountered:
calvinmorrow
changed the title
Dynamic Jobs force Context to Output Folder
Dynamic Jobs force "docker-image" Jobs Context to Output Folder
Sep 11, 2020
Describe the bug
Dynamic jobs created via an output to /infrabox/output/infrabox.json force future
docker-image
jobs to lose Git context by binding /infrabox/context to /data/repo/.infrabox/outputTo Reproduce
docker-image
type job.Expected behavior
Normal docker-image jobs would have context set to the git repo (/data/repo). Context is empty unless other files are copied to /infrabox/output
I am assuming this is unintended behavior. At the least it seems undocumented behavior. Context is set in job.py to the Infrabox output folder in https://github.com/SAP/InfraBox/blob/master/src/job/job.py#L445-L454.
Our use case was to write a tool that would run workflows (specific infrabox.json files) on specific branches. If the branch matched, the file was copied to /infrabox/output/infrabox.json (ie:
master
orrelease
branch workflows). Unfortunately the workflows subsequently failed because the git repo was inaccessible to the dynamically created jobs.Clarifying that this issue primarily affects
docker-image
jobs since indocker
jobs the build_context can be changed (to../..
in most examples I've seen) which I don't believe is possible withdocker-image
The text was updated successfully, but these errors were encountered: