Questions tagged [azure-pipeline-python-script-task]

This task is used in a build or release pipeline to run a Python script.

This task is used in a build or release pipeline to run a Python script.

13 questions
2
votes
2 answers

Access variables from Variable Groups inside Python script task in Azure DevOps Yaml pipeline

I'm using a Python script task of type 'file' in my Azure DevOps Yaml pipeline. I need to use the variables that I defined in my Variable Group in the Python file. The following is my task on Azure devops yaml pipeline. - task: PythonScript@0 …
1
vote
2 answers

How to create directory in remote system using python script

I want to create a directory in my remote system using python script or by socket programming. I have remote system's Username, password and IP address. I am able to do this in my local machine but not in remote. Please help!
1
vote
0 answers

Getting error on pywinos for executing command

Using python pywinos package, while using below code getting error from pywinos import WinOSClient tool = WinOSClient( logger_enabled=False) response = tool.run_cmd(command='whoami') Error: File…
1
vote
1 answer

Is the logout command blocked via pythons os.system command?

I am currently writing a little script that should automatically be executed as soon as certain users log onto the server. They are then allowed to add a user and should be logged out afterward instantly so that they dont meddle with my server. To…
0
votes
1 answer

How to find collar number in python

Take the first four characters of your surname - this is your dog name. Now, using the mapping suggested in Lecture 8 (slides 18 and 19), work out your collar number. For example "My dog name is LEVI and my collar number is 214873" I want to know…
0
votes
1 answer

Scripting Azure authentication with Terraform on Linux using a token

I want to create a python script utilizing the Terraform VM deployment on Azure (It's an educational project - so no real reasoning behind this, but all should be done with a single script) I have successfully created VM using Azure CLI and…
0
votes
0 answers

How to access secret variable within the python script

I have a simple script to read the secret variable set in the azure-pipeline. I am able to print from "script" step directly, but not able to resolve in the python script. When I print inline, it works. This seems like a very basic thing, but I have…
0
votes
1 answer

how to change azure devops script execution path

Is there a way to avoid executing a python script in the temp directory? I mean, even though I set the working directory to be the repository on which I want to execute my python script I cannot manage to tell Azure DevOps to run the script on my…
0
votes
0 answers

Python - error on azure python script task - ##[error]C:\ProgramData\Anaconda3\python.exe failed with return code: 0

Code in azure python script task: import unittest class MySampleTests(unittest.TestCase): def test_for_200_code(self): self.assertEqual(200, 200) if __name__ == '__main__': unittest.main() If I enable 'Fail on standard error',…
-1
votes
1 answer

Run a Python pgm for multiple PDF

I have a program exp.py which provides a yes/no result. I want to know how to run the script for multiple PDF and capture the output. example input: xyz.pdf, abc.pdf, mno.pdf ; 1.output: xyz yes abc no mno yes Please advice.
-1
votes
1 answer

Writing Python validation script for different data files from different data sources on premises for different rules

i am new to python and i want to move data files from different on premises data sources to azure data lake storage and i want to validate these data files for different rules of validation before the get moved using azure data factory pipeline and…
-2
votes
1 answer

how to Run .py file

I have written a "random movie suggester" code that will basically read the files of the directory where the .py file is stored and randomly pick one of them and print it out. My problem is - How to make .py file simple to run for non-technical…