1

I have set up an aws code pipeline where Git is used for the repository and have chosen GitHub webhooks as change detection mode.

the pipeline works great when I manually trigger the pipeline by clicking on the Release change button.

But when I try a commit and then push into my mater there is no activity in the pipeline. I am not sure if the git webhook is working correctly or is there any additional configuration that I am missing.

I am just a user of the git repository which is on git hub.

Could anyone suggest what is that I am missing?

edit :

enter image description here

Have added the token and also repo and admin:repo as you can see it showed it has been used

This is my git repo :

enter image description here

as you can see there a commit a few minutes back.

This is pipeline's source :

enter image description here

As you can see there are no actions by it from past 18th min which was triggering it manually

when you click the GitHub link that source it points to the repo and the same branch and also has the latest commit info (shared in the pic of git repo)

EDIT: here is the thing I get which seems to be good. [![enter image description here][4]][4]

But I could also see there is no webhook created on the git hub repo, Should I put it manually?

sumanth shetty
  • 1,851
  • 5
  • 24
  • 57
  • Have you followed the instructions for what the tokens permissions should look like: https://docs.aws.amazon.com/codepipeline/latest/userguide/action-reference-GitHub.html#action-reference-GitHub-auth? And are you sure the changes are being deployed to the branch you reference in your pipeline? – Chris Williams Sep 10 '20 at 10:22
  • @ChrisWilliams I haven't followed this token permission steps. for the second question: yes, because when I manually trigger the pipeline. It is working – sumanth shetty Sep 10 '20 at 10:28
  • It will only trigger when code changes in that branch though, whereas triggering it will just get the latest code :) – Chris Williams Sep 10 '20 at 10:38
  • @ChrisWilliams I switched the change detection to code pipeline periodic check. It seems to be working good – sumanth shetty Sep 10 '20 at 11:13
  • @ChrisWilliams I designed the code pipeline through the console. Documents state AWS takes care of OAuth tokens. Did I understand it right or I am missing something again :( – sumanth shetty Sep 10 '20 at 11:19
  • Go to https://docs.aws.amazon.com/codepipeline/latest/userguide/GitHub-authentication.html#GitHub-view-oauth-token and follow stepsto check if the tokens permissions are there in GitHub. – Chris Williams Sep 10 '20 at 11:23
  • @ChrisWilliams I am adding the things I tried in questions – sumanth shetty Sep 10 '20 at 12:45
  • If you click the information on the GitHub source it should give you more information over exactly what the GitHub parameters are – Chris Williams Sep 10 '20 at 16:43
  • @ChrisWilliams got it it's working :D, The issue was that I didn't have full access to the repo to create the webhook from my git credentials. Thank you for your patients as always you're a lifesaver – sumanth shetty Sep 11 '20 at 06:39
  • 1
    No problem, glad this is now resolved for you – Chris Williams Sep 11 '20 at 06:40

1 Answers1

1

This likely comes down to one of the below scenarios.

The first scenario is that the permissions are not correctly configured within your GitHub account. Looking at the documentation the below permission must be attached to the generated token:

  • repo
  • admin:repo_hook

The second scenario is that the branch itself is not have changes deployed to it, its very important that the branch specified is the one receiving the changes. If this branch does not have any changes then the pipeline will not trigger until there are changes.

Chris Williams
  • 32,215
  • 4
  • 30
  • 68