Hey all, we've recently started to moving our CI/CD to Jenkins and I'm stuck now with several issues.
First, I give you a bit of background:
- We're using BitBucket cloud
- We're using feature-branches workflow, so we have like 5-10 new branches every day and same amount of PR's
- We want to use fancy `pipeline` feature and store build sequence as a code
I got Jekins 2.0-RC-1 installed, configured, and now I'm stuck with following stuff:
- BitBucket hooks not working properly. I have checked "setup webhooks automatically" in plugin configuration but Jenkins always respond with 403
<p>Problem accessing /bitbucket-scmsource-hook/notify. Reason:
<pre> No valid crumb was included in the request</pre></p><hr><i><small>Powered by Jetty://</small></i><hr/>
- Since I'm setting up very basic workflow, my build command consists of only one `./gradlew clean distTar` comand, but it fails to execute:
[Pipeline] sh
[feature%2Fjenkins-multibranch] Running shell script
+ pwd
/var/jenkins_home/workspace/portal/portal/feature%2Fjenkins-multibranch
[Pipeline] sh
[feature%2Fjenkins-multibranch] Running shell script
+ ./gradlew clean distTar
/var/jenkins_home/workspace/portal/portal/feature%2Fjenkins-multibranch@tmp/durable-1ae2cf5c/script.sh: 2: /var/jenkins_home/workspace/portal/portal/feature%2Fjenkins-multibranch@tmp/durable-1ae2cf5c/script.sh: ./gradlew: not found
And here is my Jenkinsfile:
node {
stage 'Build'
sh 'pwd'
sh './gradlew clean distTar'
}
I tried several configurations, googled over existing issues, tried to delete/rebuild workspaces etc. etc. but with no luck.
What I want to achieve
- Build only newly added/changed branches on push to BitBucket
That's it.
Hope someone help me,
Thanks.