Is it possible to conditionally set the artifact name in my Azure DevOps build pipeline “publish artifact” task?

前端 未结 2 599
清歌不尽
清歌不尽 2020-11-30 15:45

I was wondering if it is possible to conditionally set the name of my build artifact in my Azure DevOps build pipeline \"publish artifact\" task? I want to produce differen

2条回答
  •  醉话见心
    2020-11-30 16:10

    This is the bash version in case you run the task on Linux. The NAME is a custom variable which uses the pre-defined variable as value.

    trigger_model_version=RELEASE_ARTIFACTS_${NAME^^}_BUILDNUMBER
    export version=${!trigger_model_version}
    echo Deploying ${NAME}:${version}
    

提交回复
热议问题