Search code examples
dockerazure-devopsazure-pipelinespngazure-artifacts

PNG images are not uploaded correctly when I publish pipeline artifact in Azure DevOps


Build docker image from azure devops pipeline and when I deploy the application, the PNG images are not displaying. To cross check, I just published pipeline artifact to check the PNG image files. The image is available but it shows windows photo viewer can’t display this picture because the file appears to be damaged, corrupted, or is too large when I download and open the file

Azure-devops-pipeline.yaml

trigger:
- none

stages:
- stage: PublishBuildArtifacts
  displayName: PublishBuildArtifacts
  jobs:
  - job: Publish
    displayName: PublishBuildArtifacts
    pool:
      vmimage: 'ubuntu-latest'
    steps:
    - task: PublishBuildArtifacts@1
      inputs:
        PathtoPublish: '$(System.DefaultWorkingDirectory)/test png'
        ArtifactName: 'drop'
        publishLocation: 'Container'

How to get upload PNG images correctly when I use Azure DevOps pipeline because when I build the Docker image locally, the image works as expected for my application.


Solution

  • The issue is related "Encountered 1 file(s) that should have been pointers, but weren't"

    Updated the Image by GUI instead of VS Code.