Publishing of Artifacts

%3CLINGO-SUB%20id%3D%22lingo-sub-2668109%22%20slang%3D%22en-US%22%3EPublishing%20of%20Artifacts%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2668109%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20building%20and%20publishing%20the%20artifacts%20to%20artifact%20repository%20in%20Azure%20devops%20by%20running%20the%20pipeline.%20I%20again%20ran%20the%20pipeline%20without%20making%20any%20code%20changes.%20Then%20the%20pipeline%20is%20failing%20by%20throwing%20the%20error%20that%20%22%20The%20package%20is%20already%20exists%20in%20the%20feed(feed%20id)%22.%20Please%20help%20me%20in%20resolving%20the%20issue.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EExact%20error%20will%20look%20like%20below%3C%2FP%3E%3CDIV%3E%3CDIV%3E%3CSPAN%3E%7B%22%40t%22%3A%222021-08-02T20%3A03%3A20.1099038Z%22%2C%22%40m%22%3A%22The%20package%20saclouddataservice.database.scripts%200.4.0-alpha.588%20already%20exists%20in%206d8f73fe-8ba8-700f-aa5c-df462aee5b6a%22%2C%22%40i%22%3A%2277940fb8%22%2C%22%40l%22%3A%22Error%22%2C%22SourceContext%22%3A%22ArtifactTool.Program%22%2C%22UtcTimestamp%22%3A%222021-08-02%2020%3A03%3A20.109Z%22%7D%3C%2FSPAN%3E%3C%2FDIV%3E%3C%2FDIV%3E%3CDIV%3E%3CDIV%3E%3CSPAN%3E%23%23%5Berror%5DError%3A%20An%20unexpected%20error%20occurred%20while%20trying%20to%20push%20the%20package.%20Exit%20code(17)%20and%20error(%7B%22%40t%22%3A%222021-08-02T20%3A03%3A19.5372854Z%22%2C%22%40m%22%3A%22ApplicationInsightsTelemetrySender%20will%20correlate%20events%20with%20X-TFS-Session%20f0de255e-32dc-4023-8cdb-9b17e8f094e4%22%2C%22%40i%22%3A%22a7599fe0%22%2C%22SourceContext%22%3A%22ArtifactTool.Commands.UPackPublishCommand%22%2C%22UtcTimestamp%22%3A%222021-08-02%2020%3A03%3A19.537Z%22%7D%3C%2FSPAN%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2674504%22%20slang%3D%22en-US%22%3ERe%3A%20Publishing%20of%20Artifacts%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2674504%22%20slang%3D%22en-US%22%3EAs%20per%20Azure%20artifacts%2C%20two%20package%20cannot%20own%20same%20version.%20If%20your%20pipeline%20is%20creating%20and%20publishing%20package%20to%20azure%20artifacts%20then%20version%20needs%20to%20be%20updated%3CBR%20%2F%3EExample%20in%20maven%20task%20we%20can%20go%20and%20update%20the%20POM.xml%20with%20new%20version%20number%3C%2FLINGO-BODY%3E
Occasional Visitor

Hi,

 

I'm building and publishing the artifacts to artifact repository in Azure devops by running the pipeline. I again ran the pipeline without making any code changes. Then the pipeline is failing by throwing the error that " The package is already exists in the feed(feed id)". Please help me in resolving the issue.

 

Exact error will look like below

{"@t":"2021-08-02T20:03:20.1099038Z","@m":"The package saclouddataservice.database.scripts 0.4.0-alpha.588 already exists in 6d8f73fe-8ba8-700f-aa5c-df462aee5b6a","@i":"77940fb8","@l":"Error","SourceContext":"ArtifactTool.Program","UtcTimestamp":"2021-08-02 20:03:20.109Z"}
##[error]Error: An unexpected error occurred while trying to push the package. Exit code(17) and error({"@t":"2021-08-02T20:03:19.5372854Z","@m":"ApplicationInsightsTelemetrySender will correlate events with X-TFS-Session f0de255e-32dc-4023-8cdb-9b17e8f094e4","@i":"a7599fe0","SourceContext":"ArtifactTool.Commands.UPackPublishCommand","UtcTimestamp":"2021-08-02 20:03:19.537Z"}
1 Reply
As per Azure artifacts, two package cannot own same version. If your pipeline is creating and publishing package to azure artifacts then version needs to be updated
Example in maven task we can go and update the POM.xml with new version number