3

I have my public repository on github and i have connected it with codemagic. I have configured build such that it gets triggered on push. My understanding says that, this configuration will trigger build on push to any branch. But Even after pushing the code to master branch i couldn't see the app building on codemagic.

Screenshot of the codemagic configuration

enter image description here

Screenshot of the webhook.

enter image description here

2 Answers2

4

If you enable automatic bulild triggering it may require you to set up webhooks in github manually if codemagic is unable to do so, in that case you should also get a warning below the three checkboxes (that are shown in the screenshot) if you enable one of them. You can read more about it in the last sections of this documentation part: https://docs.codemagic.io/flutter/automatic-build-triggering/ In the end there is a link that helps you with setting up the webhooks manually as well, hope this helps!

mrk
  • 41
  • 1
  • Thanks for your answer, but i already have the webhook in place. – Programming Nut Feb 15 '21 at 12:07
  • 2
    Then make sure that the Content type is application/json in the github webhooks settings. The content type by default is not correct. If you still can't get it to work, then let me know. – mrk Feb 15 '21 at 13:51
  • Absolute genius, i was scratching my head for about 2 days for this silly thing. It works now, but my question is. The documentation says that, if your repository is hosted on github, gitlab or bitbucket you don't need to setup hooks explicitly? Anyways thanks for your help. Do you prefer using the flutter ui or the yaml form? – Programming Nut Feb 15 '21 at 19:40
0

I faced this problem too. After a few hours, I changed the app setting build from release to profile, and now it builds correctly.

Open app settings: App settings Scroll down to Build:
Build Build arguments change from "release" to "profile": Build arguments set to profile