Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

259
Views
Extensión de Azure Devops (VSTS) Configure una variable a la que se debe acceder en la siguiente tarea usando Javascript

Estoy tratando de acceder a la variable establecida en una tarea desde otra tarea en JavaScript.

En la primera tarea, estoy configurando la variable de la siguiente manera:

 var connection = tl.getInput("connection", true); if(connection !== undefined) { var auth = tl.getEndpointAuthorization(connection, false); let access_key_1 = auth.parameters["password"]; let username = auth.parameters["username"]; if(auth !== undefined) { console.log('##vso[task.setvariable variable=access_key_1;]', access_key_1); }

En la segunda tarea estoy tratando de acceder a la variable:

 console.log(access_key_1);

Pero estoy recibiendo un error:

 ReferenceError: access_key_1 is not defined.
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

La variable que creó es una variable de entorno, no una variable JS.

Entonces, para acceder a él, debe usar process.env.access_key_1 . si quieres imprimir:

 console.log(process.env.access_key_1)
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!