Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand env variables for job containers to job mount path #1292

Merged
merged 2 commits into from
Feb 4, 2022

Conversation

jsturtevant
Copy link
Contributor

When installing tools into container it is sometimes desirable to have
those tools on the path for the current process. Since the Windows
doesn't support variable expansion on the PATH variable and the
job mount path as something that isn't know at runtime we need to expand
it for the passer. This could go away if the mount path is no longer
used in the future.

A sample docker file where this would work:

FROM mcr.microsoft.com/windows/servercore:${OS} AS runtime
WORKDIR /apps
ENV PATH="%CONTAINER_SANDBOX_MOUNT_POINT%\apps\vim\;C:\Windows\system32;C:\Windows"

cc: @dcantah

@jsturtevant jsturtevant requested a review from a team as a code owner February 3, 2022 22:28
@dcantah
Copy link
Contributor

dcantah commented Feb 3, 2022

@jsturtevant Sweet sweet. CI's whining about no sign-off btw. git commit --amend -s

When installing tools into container it is sometimes desirable to have
those tools on the path for the current process.  Since the Windows
doesn't support variable expansion on the PATH variable and the
job mount path as something that isn't know at runtime we need to expand
it for the passer.  This could go away if the mount path is no longer
used in the future.

Signed-off-by: James Sturtevant <jsturtevant@gmail.com>
@jsturtevant
Copy link
Contributor Author

@jsturtevant Sweet sweet. CI's whining about no sign-off btw. git commit --amend -s

sorry I need to set this up so it's automatic

Copy link
Contributor

@dcantah dcantah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm again, minor comment

@dcantah dcantah self-assigned this Feb 4, 2022
Signed-off-by: James Sturtevant <jsturtevant@gmail.com>
@dcantah dcantah merged commit c019e22 into microsoft:master Feb 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants