gitlab-ci

GitLab CI python subprocess.Popen permission denied

GitLab CI python subprocess.Popen permission denied Question: I’m running a GitLab-CI job which runs a python script which starts a subprocess.Popen(…). def main(): proc = subprocess.Popen("./../binary_file –args value", stdout=subprocess.PIPE) The problem is that I’m getting PermissionError: [Errno 13] Permission denied: ‘./../binary_file’ Ok. Maybe I forgot to set appropriate permissions? $ chmod +x ./binary_file $ ls …

Total answers: 1

How to fail a gitlab CI pipeline if the python script throws error code 1?

How to fail a gitlab CI pipeline if the python script throws error code 1? Question: I have a python file that opens and checks for a word. The program returns 0 if pass and 1 if fails. import sys word = "test" def check(): with open("tex.txt", "r") as file: for line_number, line in enumerate(file, …

Total answers: 1

Upload to pypi from Gitlab Pipelines

Upload to pypi from Gitlab Pipelines Question: I’m trying to upload a package to pypi using a Gitlab CI job, but I cannot make it work :/ Anyone has a working example? What I have tried so far in my .gitlab-ci.yaml (from my local machine all of them are working): Twine with a .pypirc file …

Total answers: 7