英文:
PNG images are not uploaded correctly when I publish pipeline artifact in Azure DevOps
问题
在Azure DevOps管道中构建Docker镜像时,当我部署应用程序时,PNG图像无法显示。为了交叉检查,我只是发布了管道的artifact以检查PNG图像文件。图像是可用的,但当我下载并打开文件时,它显示“Windows照片查看器无法显示此图片,因为文件似乎已损坏、损坏或太大”。
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'
在使用Azure DevOps管道时,如何正确上传PNG图像,因为当我在本地构建Docker镜像时,图像对我的应用程序正常工作。
英文:
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.
答案1
得分: 0
问题与“遇到了1个应该是指针但不是的文件”相关
使用 GUI 更新了图像而不是使用 VS Code。
英文:
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.
答案2
得分: 0
也许有个提示:.artifactignore
PathtoPublish 的值中是否缺少了'.'?
英文:
maybe a hint : .artifactignore
is there a missing '.' in PathtoPublish value ?
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论