Jenkins job auto-triggering when code commit on SVN repo using POST COMMIT hook
up vote
4
down vote
favorite
I am trying to implement CI/CD pipeline using Jenkins , docker and Ansible. I am using SVN code repository for my version control system. For deployment and SVN code repo, I am using AWS EC2. Deployment and code repo is in separate VM.
My Requirement
When I am committing my code into SVN repository , I need to trigger one Jenkins Job. That job will call a ansible playbook.Later it will build project, build Docker image and deploy into EC2. So for any change to my SVN code repository, I need to build Jenkins job.
My Current Attempt
I added the following script in post-commit.tmpl file under $repo/hooks folder.
REPOS="$1"
REV="$2"
UUID=`svnlook uuid $REPOS`
/usr/bin/wget
--header "Content-Type:text/plain;charset=UTF-8"
--post-data "`svnlook changed --revision $REV $REPOS`"
--output-document "-"
--timeout=2
http://server/subversion/${UUID}/notifyCommit?rev=$REV
The following is the screenshot
And checked the "Poll SCM option in Jenkins Job":
NB: I am not looking minute/hours/week schedule to pull from repo. Instead of that, I am looking when there is a code change, then I need to build Jenkins project. So I did not add any schedule.
But still I am not getting the latest code in Jenkins. How can I find out the issue related with my configuration?
jenkins svn
This question has an open bounty worth +100
reputation from Jacob ending tomorrow.
The question is widely applicable to a large audience. A detailed canonical answer is required to address all the concerns.
|
show 7 more comments
up vote
4
down vote
favorite
I am trying to implement CI/CD pipeline using Jenkins , docker and Ansible. I am using SVN code repository for my version control system. For deployment and SVN code repo, I am using AWS EC2. Deployment and code repo is in separate VM.
My Requirement
When I am committing my code into SVN repository , I need to trigger one Jenkins Job. That job will call a ansible playbook.Later it will build project, build Docker image and deploy into EC2. So for any change to my SVN code repository, I need to build Jenkins job.
My Current Attempt
I added the following script in post-commit.tmpl file under $repo/hooks folder.
REPOS="$1"
REV="$2"
UUID=`svnlook uuid $REPOS`
/usr/bin/wget
--header "Content-Type:text/plain;charset=UTF-8"
--post-data "`svnlook changed --revision $REV $REPOS`"
--output-document "-"
--timeout=2
http://server/subversion/${UUID}/notifyCommit?rev=$REV
The following is the screenshot
And checked the "Poll SCM option in Jenkins Job":
NB: I am not looking minute/hours/week schedule to pull from repo. Instead of that, I am looking when there is a code change, then I need to build Jenkins project. So I did not add any schedule.
But still I am not getting the latest code in Jenkins. How can I find out the issue related with my configuration?
jenkins svn
This question has an open bounty worth +100
reputation from Jacob ending tomorrow.
The question is widely applicable to a large audience. A detailed canonical answer is required to address all the concerns.
Do you have "Prevent Cross Site Request Forgery exploits" security option enabled? And also have you checked Jenkins log if there is maybe an error logged?
– Raoslaw Szamszur
Nov 11 at 11:56
You can check it under ManageJenkins - > ConfigureGlobalSecurity and look for Prevent Cross Site Request Forgery exploits checkbox. I think from Jenkins 2.x this option is enabled by default.
– Raoslaw Szamszur
Nov 11 at 12:06
This should help stackoverflow.com/questions/42487563/…
– rohit thomas
Nov 12 at 2:53
@RaoslawSzamszur - Yes , its already checked that option in configure global security.
– Jacob
Nov 12 at 6:04
@rohitthomas - thank you for response. I will check and read about this link that you given here.
– Jacob
Nov 12 at 6:05
|
show 7 more comments
up vote
4
down vote
favorite
up vote
4
down vote
favorite
I am trying to implement CI/CD pipeline using Jenkins , docker and Ansible. I am using SVN code repository for my version control system. For deployment and SVN code repo, I am using AWS EC2. Deployment and code repo is in separate VM.
My Requirement
When I am committing my code into SVN repository , I need to trigger one Jenkins Job. That job will call a ansible playbook.Later it will build project, build Docker image and deploy into EC2. So for any change to my SVN code repository, I need to build Jenkins job.
My Current Attempt
I added the following script in post-commit.tmpl file under $repo/hooks folder.
REPOS="$1"
REV="$2"
UUID=`svnlook uuid $REPOS`
/usr/bin/wget
--header "Content-Type:text/plain;charset=UTF-8"
--post-data "`svnlook changed --revision $REV $REPOS`"
--output-document "-"
--timeout=2
http://server/subversion/${UUID}/notifyCommit?rev=$REV
The following is the screenshot
And checked the "Poll SCM option in Jenkins Job":
NB: I am not looking minute/hours/week schedule to pull from repo. Instead of that, I am looking when there is a code change, then I need to build Jenkins project. So I did not add any schedule.
But still I am not getting the latest code in Jenkins. How can I find out the issue related with my configuration?
jenkins svn
I am trying to implement CI/CD pipeline using Jenkins , docker and Ansible. I am using SVN code repository for my version control system. For deployment and SVN code repo, I am using AWS EC2. Deployment and code repo is in separate VM.
My Requirement
When I am committing my code into SVN repository , I need to trigger one Jenkins Job. That job will call a ansible playbook.Later it will build project, build Docker image and deploy into EC2. So for any change to my SVN code repository, I need to build Jenkins job.
My Current Attempt
I added the following script in post-commit.tmpl file under $repo/hooks folder.
REPOS="$1"
REV="$2"
UUID=`svnlook uuid $REPOS`
/usr/bin/wget
--header "Content-Type:text/plain;charset=UTF-8"
--post-data "`svnlook changed --revision $REV $REPOS`"
--output-document "-"
--timeout=2
http://server/subversion/${UUID}/notifyCommit?rev=$REV
The following is the screenshot
And checked the "Poll SCM option in Jenkins Job":
NB: I am not looking minute/hours/week schedule to pull from repo. Instead of that, I am looking when there is a code change, then I need to build Jenkins project. So I did not add any schedule.
But still I am not getting the latest code in Jenkins. How can I find out the issue related with my configuration?
jenkins svn
jenkins svn
edited Nov 10 at 20:15
halfer
14.1k757104
14.1k757104
asked Nov 7 at 11:02
Jacob
278422
278422
This question has an open bounty worth +100
reputation from Jacob ending tomorrow.
The question is widely applicable to a large audience. A detailed canonical answer is required to address all the concerns.
This question has an open bounty worth +100
reputation from Jacob ending tomorrow.
The question is widely applicable to a large audience. A detailed canonical answer is required to address all the concerns.
Do you have "Prevent Cross Site Request Forgery exploits" security option enabled? And also have you checked Jenkins log if there is maybe an error logged?
– Raoslaw Szamszur
Nov 11 at 11:56
You can check it under ManageJenkins - > ConfigureGlobalSecurity and look for Prevent Cross Site Request Forgery exploits checkbox. I think from Jenkins 2.x this option is enabled by default.
– Raoslaw Szamszur
Nov 11 at 12:06
This should help stackoverflow.com/questions/42487563/…
– rohit thomas
Nov 12 at 2:53
@RaoslawSzamszur - Yes , its already checked that option in configure global security.
– Jacob
Nov 12 at 6:04
@rohitthomas - thank you for response. I will check and read about this link that you given here.
– Jacob
Nov 12 at 6:05
|
show 7 more comments
Do you have "Prevent Cross Site Request Forgery exploits" security option enabled? And also have you checked Jenkins log if there is maybe an error logged?
– Raoslaw Szamszur
Nov 11 at 11:56
You can check it under ManageJenkins - > ConfigureGlobalSecurity and look for Prevent Cross Site Request Forgery exploits checkbox. I think from Jenkins 2.x this option is enabled by default.
– Raoslaw Szamszur
Nov 11 at 12:06
This should help stackoverflow.com/questions/42487563/…
– rohit thomas
Nov 12 at 2:53
@RaoslawSzamszur - Yes , its already checked that option in configure global security.
– Jacob
Nov 12 at 6:04
@rohitthomas - thank you for response. I will check and read about this link that you given here.
– Jacob
Nov 12 at 6:05
Do you have "Prevent Cross Site Request Forgery exploits" security option enabled? And also have you checked Jenkins log if there is maybe an error logged?
– Raoslaw Szamszur
Nov 11 at 11:56
Do you have "Prevent Cross Site Request Forgery exploits" security option enabled? And also have you checked Jenkins log if there is maybe an error logged?
– Raoslaw Szamszur
Nov 11 at 11:56
You can check it under ManageJenkins - > ConfigureGlobalSecurity and look for Prevent Cross Site Request Forgery exploits checkbox. I think from Jenkins 2.x this option is enabled by default.
– Raoslaw Szamszur
Nov 11 at 12:06
You can check it under ManageJenkins - > ConfigureGlobalSecurity and look for Prevent Cross Site Request Forgery exploits checkbox. I think from Jenkins 2.x this option is enabled by default.
– Raoslaw Szamszur
Nov 11 at 12:06
This should help stackoverflow.com/questions/42487563/…
– rohit thomas
Nov 12 at 2:53
This should help stackoverflow.com/questions/42487563/…
– rohit thomas
Nov 12 at 2:53
@RaoslawSzamszur - Yes , its already checked that option in configure global security.
– Jacob
Nov 12 at 6:04
@RaoslawSzamszur - Yes , its already checked that option in configure global security.
– Jacob
Nov 12 at 6:04
@rohitthomas - thank you for response. I will check and read about this link that you given here.
– Jacob
Nov 12 at 6:05
@rohitthomas - thank you for response. I will check and read about this link that you given here.
– Jacob
Nov 12 at 6:05
|
show 7 more comments
2 Answers
2
active
oldest
votes
up vote
1
down vote
Like @bahrep said its hard to troubleshoot issues like this, but my guess is that your post-commit hook doesn't work because of "Prevent Cross Site Request Forgery exploits" Jenkins security option (You've confirmed it's enabled).
From Jenkins Wiki:
If your Jenkins uses the "Prevent Cross Site Request Forgery exploits"
security option, the above request will be rejected with 403 errors
("No valid crumb was included"). The crumb needed in this request can
be obtained from the URL http://server/crumbIssuer/api/xml (or
/api/json). This can be included in the wget call above with something
like this:
--header `wget -q --output-document -
'http://server/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,":",//crumb)'`
The easiest way to confirm if this security option causes the problem to woul'd be to disable it and try if post-commit hook will work. If yes enable again and try to configure hook with crumb. (In the end, you want to have things secure :) )
And also make sure that Jenkins has enabled anonymous read access:
For this to work, your Jenkins has to allow anonymous read access
(specifically, "Job > Read" access) to the system. If access control
to your Jenkins is more restrictive, you may need to specify the
username and password, depending on how your authentication is
configured.
Thank you for your response. I disabled the "Prevent Cross Site Request Forgery exploits" option and checked. Then also its not working. I think this is not the proper reason (Security related).
– Jacob
2 days ago
@Jacob probably issue occurs before communicating with Jenkins, but still, this security option would stop your post hook. Now back to debugging, can your Jenkins job poll SCM at all (try entering any schedule value ex.:H/5 * * * *
) This will tell if the problem is with communication or your post-hook. Also you've mentioned that code is in separate VM, can your EC2 instance talk with this VM at all? (Maybe you forgot to set ALC for this AWS instance)
– Raoslaw Szamszur
2 days ago
Yes sir. I already tried and confirmed this. H/2 * * * * working. And also tried with every minute also. That also working. I am able to see my modified code in jenkins workspace. For every minute and every 2 minute , its working. Problem is related with post-hook.
– Jacob
2 days ago
@Jacob do you have enabled "Allow anonymous read access" option (I've added a screenshot in edit)? This was also mentioned in Wiki that is necessary in order to post-commit hook to work.
– Raoslaw Szamszur
yesterday
I checked the option "Allow anonymous read access " that you given like in screenshot. But that also not working.
– Jacob
yesterday
add a comment |
up vote
0
down vote
It's hard to troubleshoot this problem without seeing actual errors and the log. However, one of the possible reasons is that your SVN server requires authentication. You should specify a correct username and password and make sure that this user account has Read permissions to the SVN repository.
Thank you for your response. Yes. I already checked the user permission. When I am manually running ansible playbook its checkouting (I added maven module using ansible playbook for checkouting). Also In my local editor also its checkouting. After I added the configuration in hooks, When I am commiting , my jenkins job not building. Within Jenkins I am calling the playbook for CI/CD pipeline inclusing the svn checkout stage. Manually its checkout is working. Only problem is related with Hooks.
– Jacob
Nov 11 at 9:17
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
Like @bahrep said its hard to troubleshoot issues like this, but my guess is that your post-commit hook doesn't work because of "Prevent Cross Site Request Forgery exploits" Jenkins security option (You've confirmed it's enabled).
From Jenkins Wiki:
If your Jenkins uses the "Prevent Cross Site Request Forgery exploits"
security option, the above request will be rejected with 403 errors
("No valid crumb was included"). The crumb needed in this request can
be obtained from the URL http://server/crumbIssuer/api/xml (or
/api/json). This can be included in the wget call above with something
like this:
--header `wget -q --output-document -
'http://server/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,":",//crumb)'`
The easiest way to confirm if this security option causes the problem to woul'd be to disable it and try if post-commit hook will work. If yes enable again and try to configure hook with crumb. (In the end, you want to have things secure :) )
And also make sure that Jenkins has enabled anonymous read access:
For this to work, your Jenkins has to allow anonymous read access
(specifically, "Job > Read" access) to the system. If access control
to your Jenkins is more restrictive, you may need to specify the
username and password, depending on how your authentication is
configured.
Thank you for your response. I disabled the "Prevent Cross Site Request Forgery exploits" option and checked. Then also its not working. I think this is not the proper reason (Security related).
– Jacob
2 days ago
@Jacob probably issue occurs before communicating with Jenkins, but still, this security option would stop your post hook. Now back to debugging, can your Jenkins job poll SCM at all (try entering any schedule value ex.:H/5 * * * *
) This will tell if the problem is with communication or your post-hook. Also you've mentioned that code is in separate VM, can your EC2 instance talk with this VM at all? (Maybe you forgot to set ALC for this AWS instance)
– Raoslaw Szamszur
2 days ago
Yes sir. I already tried and confirmed this. H/2 * * * * working. And also tried with every minute also. That also working. I am able to see my modified code in jenkins workspace. For every minute and every 2 minute , its working. Problem is related with post-hook.
– Jacob
2 days ago
@Jacob do you have enabled "Allow anonymous read access" option (I've added a screenshot in edit)? This was also mentioned in Wiki that is necessary in order to post-commit hook to work.
– Raoslaw Szamszur
yesterday
I checked the option "Allow anonymous read access " that you given like in screenshot. But that also not working.
– Jacob
yesterday
add a comment |
up vote
1
down vote
Like @bahrep said its hard to troubleshoot issues like this, but my guess is that your post-commit hook doesn't work because of "Prevent Cross Site Request Forgery exploits" Jenkins security option (You've confirmed it's enabled).
From Jenkins Wiki:
If your Jenkins uses the "Prevent Cross Site Request Forgery exploits"
security option, the above request will be rejected with 403 errors
("No valid crumb was included"). The crumb needed in this request can
be obtained from the URL http://server/crumbIssuer/api/xml (or
/api/json). This can be included in the wget call above with something
like this:
--header `wget -q --output-document -
'http://server/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,":",//crumb)'`
The easiest way to confirm if this security option causes the problem to woul'd be to disable it and try if post-commit hook will work. If yes enable again and try to configure hook with crumb. (In the end, you want to have things secure :) )
And also make sure that Jenkins has enabled anonymous read access:
For this to work, your Jenkins has to allow anonymous read access
(specifically, "Job > Read" access) to the system. If access control
to your Jenkins is more restrictive, you may need to specify the
username and password, depending on how your authentication is
configured.
Thank you for your response. I disabled the "Prevent Cross Site Request Forgery exploits" option and checked. Then also its not working. I think this is not the proper reason (Security related).
– Jacob
2 days ago
@Jacob probably issue occurs before communicating with Jenkins, but still, this security option would stop your post hook. Now back to debugging, can your Jenkins job poll SCM at all (try entering any schedule value ex.:H/5 * * * *
) This will tell if the problem is with communication or your post-hook. Also you've mentioned that code is in separate VM, can your EC2 instance talk with this VM at all? (Maybe you forgot to set ALC for this AWS instance)
– Raoslaw Szamszur
2 days ago
Yes sir. I already tried and confirmed this. H/2 * * * * working. And also tried with every minute also. That also working. I am able to see my modified code in jenkins workspace. For every minute and every 2 minute , its working. Problem is related with post-hook.
– Jacob
2 days ago
@Jacob do you have enabled "Allow anonymous read access" option (I've added a screenshot in edit)? This was also mentioned in Wiki that is necessary in order to post-commit hook to work.
– Raoslaw Szamszur
yesterday
I checked the option "Allow anonymous read access " that you given like in screenshot. But that also not working.
– Jacob
yesterday
add a comment |
up vote
1
down vote
up vote
1
down vote
Like @bahrep said its hard to troubleshoot issues like this, but my guess is that your post-commit hook doesn't work because of "Prevent Cross Site Request Forgery exploits" Jenkins security option (You've confirmed it's enabled).
From Jenkins Wiki:
If your Jenkins uses the "Prevent Cross Site Request Forgery exploits"
security option, the above request will be rejected with 403 errors
("No valid crumb was included"). The crumb needed in this request can
be obtained from the URL http://server/crumbIssuer/api/xml (or
/api/json). This can be included in the wget call above with something
like this:
--header `wget -q --output-document -
'http://server/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,":",//crumb)'`
The easiest way to confirm if this security option causes the problem to woul'd be to disable it and try if post-commit hook will work. If yes enable again and try to configure hook with crumb. (In the end, you want to have things secure :) )
And also make sure that Jenkins has enabled anonymous read access:
For this to work, your Jenkins has to allow anonymous read access
(specifically, "Job > Read" access) to the system. If access control
to your Jenkins is more restrictive, you may need to specify the
username and password, depending on how your authentication is
configured.
Like @bahrep said its hard to troubleshoot issues like this, but my guess is that your post-commit hook doesn't work because of "Prevent Cross Site Request Forgery exploits" Jenkins security option (You've confirmed it's enabled).
From Jenkins Wiki:
If your Jenkins uses the "Prevent Cross Site Request Forgery exploits"
security option, the above request will be rejected with 403 errors
("No valid crumb was included"). The crumb needed in this request can
be obtained from the URL http://server/crumbIssuer/api/xml (or
/api/json). This can be included in the wget call above with something
like this:
--header `wget -q --output-document -
'http://server/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,":",//crumb)'`
The easiest way to confirm if this security option causes the problem to woul'd be to disable it and try if post-commit hook will work. If yes enable again and try to configure hook with crumb. (In the end, you want to have things secure :) )
And also make sure that Jenkins has enabled anonymous read access:
For this to work, your Jenkins has to allow anonymous read access
(specifically, "Job > Read" access) to the system. If access control
to your Jenkins is more restrictive, you may need to specify the
username and password, depending on how your authentication is
configured.
edited yesterday
answered 2 days ago
Raoslaw Szamszur
60114
60114
Thank you for your response. I disabled the "Prevent Cross Site Request Forgery exploits" option and checked. Then also its not working. I think this is not the proper reason (Security related).
– Jacob
2 days ago
@Jacob probably issue occurs before communicating with Jenkins, but still, this security option would stop your post hook. Now back to debugging, can your Jenkins job poll SCM at all (try entering any schedule value ex.:H/5 * * * *
) This will tell if the problem is with communication or your post-hook. Also you've mentioned that code is in separate VM, can your EC2 instance talk with this VM at all? (Maybe you forgot to set ALC for this AWS instance)
– Raoslaw Szamszur
2 days ago
Yes sir. I already tried and confirmed this. H/2 * * * * working. And also tried with every minute also. That also working. I am able to see my modified code in jenkins workspace. For every minute and every 2 minute , its working. Problem is related with post-hook.
– Jacob
2 days ago
@Jacob do you have enabled "Allow anonymous read access" option (I've added a screenshot in edit)? This was also mentioned in Wiki that is necessary in order to post-commit hook to work.
– Raoslaw Szamszur
yesterday
I checked the option "Allow anonymous read access " that you given like in screenshot. But that also not working.
– Jacob
yesterday
add a comment |
Thank you for your response. I disabled the "Prevent Cross Site Request Forgery exploits" option and checked. Then also its not working. I think this is not the proper reason (Security related).
– Jacob
2 days ago
@Jacob probably issue occurs before communicating with Jenkins, but still, this security option would stop your post hook. Now back to debugging, can your Jenkins job poll SCM at all (try entering any schedule value ex.:H/5 * * * *
) This will tell if the problem is with communication or your post-hook. Also you've mentioned that code is in separate VM, can your EC2 instance talk with this VM at all? (Maybe you forgot to set ALC for this AWS instance)
– Raoslaw Szamszur
2 days ago
Yes sir. I already tried and confirmed this. H/2 * * * * working. And also tried with every minute also. That also working. I am able to see my modified code in jenkins workspace. For every minute and every 2 minute , its working. Problem is related with post-hook.
– Jacob
2 days ago
@Jacob do you have enabled "Allow anonymous read access" option (I've added a screenshot in edit)? This was also mentioned in Wiki that is necessary in order to post-commit hook to work.
– Raoslaw Szamszur
yesterday
I checked the option "Allow anonymous read access " that you given like in screenshot. But that also not working.
– Jacob
yesterday
Thank you for your response. I disabled the "Prevent Cross Site Request Forgery exploits" option and checked. Then also its not working. I think this is not the proper reason (Security related).
– Jacob
2 days ago
Thank you for your response. I disabled the "Prevent Cross Site Request Forgery exploits" option and checked. Then also its not working. I think this is not the proper reason (Security related).
– Jacob
2 days ago
@Jacob probably issue occurs before communicating with Jenkins, but still, this security option would stop your post hook. Now back to debugging, can your Jenkins job poll SCM at all (try entering any schedule value ex.:
H/5 * * * *
) This will tell if the problem is with communication or your post-hook. Also you've mentioned that code is in separate VM, can your EC2 instance talk with this VM at all? (Maybe you forgot to set ALC for this AWS instance)– Raoslaw Szamszur
2 days ago
@Jacob probably issue occurs before communicating with Jenkins, but still, this security option would stop your post hook. Now back to debugging, can your Jenkins job poll SCM at all (try entering any schedule value ex.:
H/5 * * * *
) This will tell if the problem is with communication or your post-hook. Also you've mentioned that code is in separate VM, can your EC2 instance talk with this VM at all? (Maybe you forgot to set ALC for this AWS instance)– Raoslaw Szamszur
2 days ago
Yes sir. I already tried and confirmed this. H/2 * * * * working. And also tried with every minute also. That also working. I am able to see my modified code in jenkins workspace. For every minute and every 2 minute , its working. Problem is related with post-hook.
– Jacob
2 days ago
Yes sir. I already tried and confirmed this. H/2 * * * * working. And also tried with every minute also. That also working. I am able to see my modified code in jenkins workspace. For every minute and every 2 minute , its working. Problem is related with post-hook.
– Jacob
2 days ago
@Jacob do you have enabled "Allow anonymous read access" option (I've added a screenshot in edit)? This was also mentioned in Wiki that is necessary in order to post-commit hook to work.
– Raoslaw Szamszur
yesterday
@Jacob do you have enabled "Allow anonymous read access" option (I've added a screenshot in edit)? This was also mentioned in Wiki that is necessary in order to post-commit hook to work.
– Raoslaw Szamszur
yesterday
I checked the option "Allow anonymous read access " that you given like in screenshot. But that also not working.
– Jacob
yesterday
I checked the option "Allow anonymous read access " that you given like in screenshot. But that also not working.
– Jacob
yesterday
add a comment |
up vote
0
down vote
It's hard to troubleshoot this problem without seeing actual errors and the log. However, one of the possible reasons is that your SVN server requires authentication. You should specify a correct username and password and make sure that this user account has Read permissions to the SVN repository.
Thank you for your response. Yes. I already checked the user permission. When I am manually running ansible playbook its checkouting (I added maven module using ansible playbook for checkouting). Also In my local editor also its checkouting. After I added the configuration in hooks, When I am commiting , my jenkins job not building. Within Jenkins I am calling the playbook for CI/CD pipeline inclusing the svn checkout stage. Manually its checkout is working. Only problem is related with Hooks.
– Jacob
Nov 11 at 9:17
add a comment |
up vote
0
down vote
It's hard to troubleshoot this problem without seeing actual errors and the log. However, one of the possible reasons is that your SVN server requires authentication. You should specify a correct username and password and make sure that this user account has Read permissions to the SVN repository.
Thank you for your response. Yes. I already checked the user permission. When I am manually running ansible playbook its checkouting (I added maven module using ansible playbook for checkouting). Also In my local editor also its checkouting. After I added the configuration in hooks, When I am commiting , my jenkins job not building. Within Jenkins I am calling the playbook for CI/CD pipeline inclusing the svn checkout stage. Manually its checkout is working. Only problem is related with Hooks.
– Jacob
Nov 11 at 9:17
add a comment |
up vote
0
down vote
up vote
0
down vote
It's hard to troubleshoot this problem without seeing actual errors and the log. However, one of the possible reasons is that your SVN server requires authentication. You should specify a correct username and password and make sure that this user account has Read permissions to the SVN repository.
It's hard to troubleshoot this problem without seeing actual errors and the log. However, one of the possible reasons is that your SVN server requires authentication. You should specify a correct username and password and make sure that this user account has Read permissions to the SVN repository.
answered Nov 10 at 13:47
bahrep
21.6k1073106
21.6k1073106
Thank you for your response. Yes. I already checked the user permission. When I am manually running ansible playbook its checkouting (I added maven module using ansible playbook for checkouting). Also In my local editor also its checkouting. After I added the configuration in hooks, When I am commiting , my jenkins job not building. Within Jenkins I am calling the playbook for CI/CD pipeline inclusing the svn checkout stage. Manually its checkout is working. Only problem is related with Hooks.
– Jacob
Nov 11 at 9:17
add a comment |
Thank you for your response. Yes. I already checked the user permission. When I am manually running ansible playbook its checkouting (I added maven module using ansible playbook for checkouting). Also In my local editor also its checkouting. After I added the configuration in hooks, When I am commiting , my jenkins job not building. Within Jenkins I am calling the playbook for CI/CD pipeline inclusing the svn checkout stage. Manually its checkout is working. Only problem is related with Hooks.
– Jacob
Nov 11 at 9:17
Thank you for your response. Yes. I already checked the user permission. When I am manually running ansible playbook its checkouting (I added maven module using ansible playbook for checkouting). Also In my local editor also its checkouting. After I added the configuration in hooks, When I am commiting , my jenkins job not building. Within Jenkins I am calling the playbook for CI/CD pipeline inclusing the svn checkout stage. Manually its checkout is working. Only problem is related with Hooks.
– Jacob
Nov 11 at 9:17
Thank you for your response. Yes. I already checked the user permission. When I am manually running ansible playbook its checkouting (I added maven module using ansible playbook for checkouting). Also In my local editor also its checkouting. After I added the configuration in hooks, When I am commiting , my jenkins job not building. Within Jenkins I am calling the playbook for CI/CD pipeline inclusing the svn checkout stage. Manually its checkout is working. Only problem is related with Hooks.
– Jacob
Nov 11 at 9:17
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53188210%2fjenkins-job-auto-triggering-when-code-commit-on-svn-repo-using-post-commit-hook%23new-answer', 'question_page');
}
);
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Do you have "Prevent Cross Site Request Forgery exploits" security option enabled? And also have you checked Jenkins log if there is maybe an error logged?
– Raoslaw Szamszur
Nov 11 at 11:56
You can check it under ManageJenkins - > ConfigureGlobalSecurity and look for Prevent Cross Site Request Forgery exploits checkbox. I think from Jenkins 2.x this option is enabled by default.
– Raoslaw Szamszur
Nov 11 at 12:06
This should help stackoverflow.com/questions/42487563/…
– rohit thomas
Nov 12 at 2:53
@RaoslawSzamszur - Yes , its already checked that option in configure global security.
– Jacob
Nov 12 at 6:04
@rohitthomas - thank you for response. I will check and read about this link that you given here.
– Jacob
Nov 12 at 6:05