Reputation: 3500
In My Azure Pipeline, I am giving Build number format as Build_$(Date:yyyy.MM.dd)$(Rev:.rr)
which gives my build number as Build_2019.04.04.05.
I want to use same in Artifact Name property in Publish Artifact task. When I give
Artifact Name: Build_$(Date:yyyy.MM.dd)$(Rev:.rr)
it is not working.
In logs it says invalid special characters in artifact name and it keeps on re-trying for few times.
How to make it work?
SOLUTION:
Thanks to 4c74356b41. I gave like below and it is working fine now
Artifact Name: $(Build.BuildNumber)
Upvotes: 1
Views: 2739
Reputation: 72191
I think that that particular format is only allowed in the build name, can you try and use $(Build.BuildNumber) instead? that's an automatic variable that contains current build number. that should work.
ps. I dont think thats a good idea, because that way you'd have to account for that when pulling this artifact.
Upvotes: 4