The files I create seem to be deleted after the script is completed. If I print the existing files in the python script they show, but aren't to be found in the repository. Is there any option I have to set for the files to stay?
This is the part of the gitlab-ci.yml responsible for running the python script:
retrieve-tags:
stage: build
script:
- pip3 install python-gitlab
- pip3 install markdown
- python3 retrieve_tags.py
image: python
artifacts:
paths:
- .*
This is the part of the python script that should create files, but doesn't really:
path = CENSORED FOR REASONS
file_name = "test.txt"
with open(os.path.join(path,file_name), 'w') as fp:
fp.write("TAG_CONTENTS")
fp.close()
print(os.listdir(path))
I expect this to create files in the gitlab repository, in which the cicd pipeline is running and to view created files in the repository after the script ran.