@@ -147,6 +147,20 @@ async function run() {
147147 const primaryStats = fs . statSync ( primaryFilePath ) ;
148148 const primaryFilename = path . basename ( primaryFilePath ) ;
149149
150+ // Get labels (if passed in) and parse into an array
151+ const labelsInput = tl . getInput ( 'labels' ) || '' ;
152+ const labels = labelsInput
153+ . split ( / \r ? \n / ) // split by newline
154+ . map ( label => label . trim ( ) ) // remove extra spaces
155+ . filter ( label => label . length > 0 ) ; // remove blanks
156+
157+ // Get architectures (if passed in) and parse into an array
158+ const architecturesInput = tl . getInput ( 'architectures' ) || '' ;
159+ const architectures = architecturesInput
160+ . split ( / \r ? \n / )
161+ . map ( architecture => architecture . trim ( ) )
162+ . filter ( architecture => architecture . length > 0 ) ;
163+
150164 // Prepare request payload
151165 const payload = {
152166 structure : structure ,
@@ -160,6 +174,8 @@ async function run() {
160174 version_component_extra : tl . getInput ( 'versionComponentExtra' ) ,
161175 version_component_meta : tl . getInput ( 'versionComponentMeta' ) ,
162176 custom_build_number : tl . getInput ( 'customBuildNumber' ) ,
177+ labels : labels ,
178+ architectures : architectures ,
163179 source : 'azure-devops' ,
164180 ci_pipeline : azureBuildPipeline ,
165181 ci_run_id : azureBuildId ,
0 commit comments