Forum Discussion
Ygallardo
Jun 28, 2023Copper Contributor
Error publishing pipeline artifact
We are reusing a pipeline across two different organisations, in the first organisation the pipeline works but in the new one it fails and I don't know why. In both cases we use the same pipeline and vmImage: 'ubuntu-latest'.
The error occurs at the end of the PublishPipelineArtifact@1 task (you can find the error below), does the organisation need some extra configuration, why the same pipeline works in the first organisation and not in the second one? What am I missing? where can I check if the Shared Platform Service is registered?
trigger: - main stages: - stage: Build jobs: - job: Build_code pool: vmImage: 'ubuntu-latest' steps: ... - task: PublishPipelineArtifact@1 inputs: targetPath: '$(Pipeline.Workspace)' artifact: 'artifact1' publishLocation: 'pipeline'
Error:
2023-06-28T13:56:30.7428628Z ##[section]Starting: PublishPipelineArtifact 2023-06-28T13:56:30.7432206Z ============================================================================== 2023-06-28T13:56:30.7432311Z Task : Publish Pipeline Artifacts 2023-06-28T13:56:30.7432370Z Description : Publish (upload) a file or directory as a named artifact for the current run 2023-06-28T13:56:30.7432475Z Version : 1.199.0 2023-06-28T13:56:30.7432541Z Author : Microsoft Corporation 2023-06-28T13:56:30.7432600Z Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/publish-pipeline-artifact 2023-06-28T13:56:30.7432697Z ============================================================================== 2023-06-28T13:56:31.0478735Z Artifact name input: artifact1 2023-06-28T13:56:31.0580092Z Uploading pipeline artifact from /home/vsts/work/1 for build #25 2023-06-28T13:56:31.0968745Z Using default max parallelism. 2023-06-28T13:56:31.0986153Z Max dedup parallelism: 192 2023-06-28T13:56:31.6851994Z ApplicationInsightsTelemetrySender will correlate events with X-TFS-Session aa1cc944-707c-4f1b-ad8e-bc3769f6d92c 2023-06-28T13:56:31.7051002Z DedupManifestArtifactClient will correlate http requests with X-TFS-Session aa1cc944-707c-4f1b-ad8e-bc3769f6d92c 2023-06-28T13:56:31.7303653Z Processing .artifactignore file surfaced 31 files. Total files under source directory: 247 2023-06-28T13:56:31.8191759Z 11 files processed. 2023-06-28T13:56:31.8199095Z 16 files processed. 2023-06-28T13:56:32.6356098Z 116 files processed. 2023-06-28T13:56:34.9326134Z 216 files processed. 2023-06-28T13:56:34.9330190Z Processed 216 files from /home/vsts/work/1 successfully. 2023-06-28T13:56:36.7141833Z Uploading 216 files from directory /home/vsts/work/1. 2023-06-28T13:56:36.7142344Z Uploaded 0 out of 878,369,234 bytes. 2023-06-28T13:56:39.4949220Z Uploaded 1,391,982 out of 878,359,204 bytes 2023-06-28T13:56:39.4949831Z Content upload is done! 2023-06-28T13:56:39.4965052Z 2023-06-28T13:56:39.4965329Z Content upload statistics: 2023-06-28T13:56:39.4965606Z Total Content: 1,756.7 MB 2023-06-28T13:56:39.4967541Z Physical Content Uploaded: 0.8 MB 2023-06-28T13:56:39.4967667Z Logical Content Uploaded: 1.4 MB 2023-06-28T13:56:39.4967784Z Compression Saved: 0.6 MB 2023-06-28T13:56:39.4967918Z Deduplication Saved: 1,755.3 MB 2023-06-28T13:56:39.4968036Z Number of Chunks Uploaded: 16 2023-06-28T13:56:39.4968167Z Total Number of Chunks: 51,866 2023-06-28T13:56:39.4968223Z 2023-06-28T13:56:39.9900340Z ApplicationInsightsTelemetrySender correlated 2 events with X-TFS-Session aa1cc944-707c-4f1b-ad8e-bc3769f6d92c 2023-06-28T13:56:39.9940713Z ##[error]Could not find service 'XXXX' from host'XXXX'. Please ensure the service is registered with the Shared Platform Service. 2023-06-28T13:56:40.0215538Z ##[section]Finishing: PublishPipelineArtifact
2 Replies
- Praveen1575Copper Contributor
In mycase, using the PublishBuildArtifact instead of PublishPipelineArtifact solved the problem. I had a discussion with Microsoft support and it seems like an issue on this particular task.
- Praveen1575Copper ContributorI have the same problem in the PublishPipelineArtifact step and it fails with exactly the same error. In my case, the hosted agent was recently added and it is new Devops instance.