I have a python script that uploads the build artifacts to onedrive path and set of env variables that defines path for uploading which are often changing, so i have written a properties file so that i can change the properties file and need not change the script always.
i tried to call the properties file but it didnt work, can anyone suggest a way.
Thanks in advance.
mybitbucket-pipelines.yml :-
image: python 3.5.1
pipelines:
default:
- step:
script:
- pip install requests
- bash ./gradlew build
- python uploadscript1.py $file.properties
in my uploadscript1.py
i defined like this :
path: $PATH_TO_UPLOAD
and that path was defined in properties file
Do you have experience accessing properties from a file in python? Without seeing your whole script, it would need to use a fs handler to create an object representing the file and read it.
Alternately you can use the contents of the file to set environment variables (which would still need to be explicitly read by python script)
Once you get it working locally it will behave the same in pipelines.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.