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

Workaround AzDo issue when evaluating Build.SourcesDirectory variable in a docker container #1982

Merged
merged 2 commits into from
Jan 21, 2020

Conversation

safern
Copy link
Member

@safern safern commented Jan 21, 2020

Since we don't know how long it is going to take for a fix to roll out from AzDo use a workaround they suggested for issue: #1967

We can revert this change once their fix rolls out.

Copy link
Member

@trylek trylek left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -112,7 +112,7 @@ jobs:
- ${{ if ne(parameters.liveCoreClrBuildConfig, '') }}:
- template: /eng/pipelines/common/download-artifact-step.yml
parameters:
unpackFolder: $(_coreClrDownloadPath)
unpackFolder: ${_CORECLRDOWNLOADPATH}
Copy link
Member

Choose a reason for hiding this comment

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

Does this work when passed as a task arg? ${...} is a shell scripting syntax, not known by cmd or AzDO as far as I know.

# Unzip artifact
- task: ExtractFiles@1
displayName: 'Unzip ${{ parameters.displayName }}'
inputs:
archiveFilePatterns: $(Build.SourcesDirectory)/__download__/${{ parameters.artifactName }}/${{ parameters.artifactFileName }}
destinationFolder: ${{ parameters.unpackFolder }}

Copy link
Member

Choose a reason for hiding this comment

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

Looks like not, macOS is choking:

/usr/bin/tar -xvf /Users/runner/runners/2.164.3/work/1/s/__download__/CoreCLRProduct_OSX_x64_release/CoreCLRProduct_OSX_x64_release.tar.gz -C /Users/runner/runners/2.164.3/work/1/s/${_CORECLRDOWNLOADPATH}
https://dev.azure.com/dnceng/public/_build/results?buildId=491593&view=logs&j=165846b8-a05f-59ec-06e6-141fc8c9f9e4&t=f25ddc43-e446-5261-e436-e8dc261f76c0&l=13

Then fails during the build trying to use /Users/runner/runners/2.164.3/work/1/s/artifacts/transport/coreclr.

Copy link
Member

Choose a reason for hiding this comment

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

I think a workaround might be to run a script step on the affected Linux platforms that uses an AzDO command to reset the value of _coreClrDownloadPath to ${_CORECLRDOWNLOADPATH}, then maybe we can continue to use $(_coreClrDownloadPath) in subsequent steps as normal.

Copy link
Member Author

Choose a reason for hiding this comment

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

Or just use this directly in the declaration of the variable, instead of here... also we could condition that to use this syntax if container != ''

Copy link
Member Author

Choose a reason for hiding this comment

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

For some reason I thought it was a yaml syntax thing. I just pushed a commit that only uses this in the _coreClrArtifactsPathArg declaration and when container != ''

@safern
Copy link
Member Author

safern commented Jan 21, 2020

All the build legs are green and all the tests that ran are green. Will merge to unblock other PRs.

@safern safern merged commit 50efd22 into dotnet:master Jan 21, 2020
@safern safern deleted the WorkAroundBuildSourcesDirectoryDocker branch January 21, 2020 23:58
@ghost ghost locked as resolved and limited conversation to collaborators Dec 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants