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

Copy via bash on windows hosted agent not copying as expected #9158

Open
psibi opened this issue Dec 23, 2018 · 4 comments

Comments

Projects
None yet
3 participants
@psibi
Copy link

commented Dec 23, 2018

Troubleshooting

Checkout how to troubleshoot failures and collect debug logs: https://docs.microsoft.com/en-us/vsts/build-release/actions/troubleshooting

Environment

  • Server - Azure Pipelines or TFS on-premises?

Using Azure Pipelines. You can find the environment here: https://dev.azure.com/commercialhaskell/stack/_build/results?buildId=143

  • Agent - Hosted or Private:

Agent name: vs2017-win2016

Issue Description

Something like this doesn't seem to work for Windows agent (although works fine for Linux and MacOS):

  - bash: |
      cp somefile $(Build.ArtifactStagingDirectory)
    displayName: Copy
  - task: PublishBuildArtifacts@1
    inputs:
      pathtoPublish: '$(Build.ArtifactStagingDirectory)'
      artifactName: some-artifact-name

The actual build pipeline replicating the issue: https://dev.azure.com/commercialhaskell/stack/_build/results?buildId=143

No build artifacts are published for the Windows environment.

You can see in the above build that the same thing works for both Linux and OSX.

@psibi

This comment has been minimized.

Copy link
Author

commented Dec 23, 2018

Replacing the same logic of bash with powershell makes it work.

@madhurig

This comment has been minimized.

Copy link
Contributor

commented Feb 26, 2019

@bryanmacfarlane - Looks like an issue with bash on windows not copying the files.

@bryanmacfarlane

This comment has been minimized.

Copy link
Member

commented Feb 26, 2019

@psibi - we may need more details on the repro. What is somefile in your case? Is it a relative or full path? Just a file name?

@bryanmacfarlane bryanmacfarlane changed the title Build artifacts not working as expected for Windows agent Copy via bash on windows hosted agent not copying as expected Feb 26, 2019

@psibi

This comment has been minimized.

Copy link
Author

commented Feb 27, 2019

@bryanmacfarlane IIRC, it was just a file name present in the current path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.