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
Is your feature request related to a problem? Please describe.
I need the absolute path to project directory as it is on the host OS (not as seen within container).
When developing I use containers that are bind-mounted which require absolute path to the source code. Deployment of those containers are run in a CI job with image: …. I.e. deployment is run in a container where CI_PROJECT_DIR points to /gcl-builds which is absolute path within the container, not on my machine (the host OS)
Describe the solution you'd like
A new variable with absolute path. Possible names:
HOST_CI_PROJECT_DIR
LOCAL_CI_PROJECT_DIR
Describe alternatives you've considered
Workaround:
job-supplying-full-path:
# No image. "shell" executorscript:
- echo "LOCAL_WORKING_DIR=$PWD" | tee .full-path-on-host-os.envartifacts:
reports:
dotenv: .full-path-on-host-os.envjob-requiring-full-path:
image: busybox # Runs in container - "docker" executorneeds:
- job-supplying-full-pathvariables:
LOCAL_PWD: $PWD # This does not work. Empty value.script:
- echo "Container '$CI_PROJECT_DIR'"
- echo "Container '$PWD'"
- echo "Variable workaround? '$LOCAL_PWD'"
- echo "Variable via other job '$LOCAL_WORKING_DIR'"
Output from 'job-requiring-full-path':
Container '/gcl-builds'
Container '/gcl-builds'
Variable workaround? ''
Variable via other job '/home/example/src/project'
Additional context
If the value of new variable is problematic (information leak?) then maybe the variable could be opt-in to limit info-leak? Like with the @ annotation.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
I need the absolute path to project directory as it is on the host OS (not as seen within container).
When developing I use containers that are bind-mounted which require absolute path to the source code. Deployment of those containers are run in a CI job with
image: …
. I.e. deployment is run in a container whereCI_PROJECT_DIR
points to/gcl-builds
which is absolute path within the container, not on my machine (the host OS)Describe the solution you'd like
A new variable with absolute path. Possible names:
Describe alternatives you've considered
Workaround:
Output from 'job-requiring-full-path':
Additional context
If the value of new variable is problematic (information leak?) then maybe the variable could be opt-in to limit info-leak? Like with the
@
annotation.The text was updated successfully, but these errors were encountered: