I have configured a task as check out source code from Bit-Bucket and it is working fine.
As per some comments I can see the below lines is working fine.
/usr/bin/python <<EOF
print "Hello, World!"
EOF
I an trying to run my python file from the check out source code.
As per the documentation got the current working directory from the below code,
${bamboo.working.directory}
Got the result :
/opt/atlassian/atlassian-bamboo-home-6.4.1/xml-data/build-dir/XXXXSCRIP-XXXXSCRIP-JOB1
and My repository path is
ProjectName/app.py
Added an script task and given the below as inline comments,
/usr/bin/python /opt/atlassian/atlassian-bamboo-home-6.4.1/xml-data/build-dir/XXXXSCRIP-XXXXSCRIP-JOB1/ProjectName/app.py
But, failed to execute. Please see the below error message.
python: can't open file '/opt/atlassian/atlassian-bamboo-home-6.4.1/xml-data/build-dir/XXXXSCRIP-XXXXSCRIP-JOB1/ProjectName/app.py': [Errno 2] No such file or directory
How do I solve this issue.
Hi @Vineesh,
That type of error can have two main causes:
How to mitigate them?
If not of those options are the case, try to navigate to the working directory from the terminal and check if you can run the script using the exact same command Bamboo is using.
Let me know how it goes.
@Vineesh Did you find a solution for this?
@Daniel Santos What if I do not have terminal access to the file? Like, I am using Bamboo in a corporate environment, I do not have access to it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Found it. It is because of User Permissions.
In case someone has the same problem of not having terminal access. Just Do:
1. Script Task and write Inline, "chmod XXX <filename>".
2. Create another Script Task and call the file there.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm sorry, I didn't have time to answer your message.
Yes, I would say that any time you need terminal you can use a script task for that.
I'm glad you found your own way. =]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.