I'm trying to upload a file to my gitlab repository using this way:
x = project.upload("Jenkinsfile", filepath="./Jenkinsfile") however it not work for me, so
x1 = project.upload("Jenkinsfile", filepath="/media/conde/Trabajo/Trabajo/DevOps/BOMH/bomh/Jenkinsfile") , not work, let's go to trying the documentation example because it not need a filesystem path, so it have at least to create a new file empty:
x2 = project.upload("filename.txt", filedata="data")
But never a file is uploaded. The output of each comand is:
x={'url': '/uploads/c52cf003900c7afe6843909317049cc3/Jenkinsfile', 'markdown': 'Jenkinsfile', 'alt': 'Jenkinsfile'}
x1 = {'url': '/uploads/c52cf003900c7afe6843909317049cc3/Jenkinsfile', 'markdown': 'Jenkinsfile', 'alt': 'Jenkinsfile'}
x2 = {'url': '/uploads/3c2a389555609ba08c3bd54bee0e7339/filename.txt', 'markdown': 'filename.txt', 'alt': 'filename.txt'}
What is wrong, the documentation, the API? I can create the repository, the branchs and create some files, but not upload a file from my computer.