Home > database >  Azure Pipeline equivalent variable of GITHUB_ENV
Azure Pipeline equivalent variable of GITHUB_ENV

Time:01-17

I'm new to Azure Pipeline and I'm converting yaml file for Github action to Azure Pipleline. Currently I'm using a python script to set session tokens. Here is the piece of the python code.

env_file = os.getenv('GITHUB_ENV')

with open(env_file, "a") as myfile:
    myfile.write("sessionId="   data['userInfo']['sessionId']   "\n")
    myfile.write("uat_sessionId="   uat_data['userInfo']['sessionId']   "\n")

Since I'm using Azure Pipeline instead of Github action, what variable in Azure Pipeline is equivalent to GITHUB_ENV that I can use. Thanks in advance!

Tried to find an equivalent variable in the predefine variables in Azure but can't find one.

CodePudding user response:

Unfortunately Azure DevOps does not have a variable or system similar to the GITHUB_ENV variable I know of. There is a way of reusing variables set in an earlier stage/job/step. But it will be more cumbersome to implement.

See these docs to get more info on output from tasks.

  • Related