We are testing a Project with the workflow using GitHub, CircleCI and deployment to Pantheon upstream. At present, We could see that the CircleCI pipeline gets triggered when a Pull request is created. What we are trying to achieve is
Need to run the pipeline which includes the PHP code sniffer and other tests when a pull request is created by developer. Once the pull request is created, the pipeline will be executed and the output of the tests will be shown in CircleCI and GitHub.
As the next step, After Manual code review, the TL approves the pull request, The developers feature branch will be merged to the main branch (May be the ‘develop’ branch) and we will need the pipeline to be trigger but not with the tests but with the ‘build’ and ‘deploy’ part in the pipeline. How to trigger the pipeline when a PR request is accepted?
So,
When a Pull request is created - The ‘tests’ part of the pipeline needs to be executed
When a Pull request is accepted - The ‘build’ and the ‘deployment’ part of the pipeline needs to be executed.
You can add your develop branch as a default branch so that a build is triggered upon a merge of a PR. You can use branch filtering and logic statements which can be used on a steps level or workflow level depending on your needs.
Does CircleCI charge based on the number of user accounts. Suppose if i have 10 developers working on the project and have access to the GitHub repository and does all of them require access to the CircleCI account to trigger the CircleCI pipeline based on the pull request they create in GitHub?
Also, Is it possible for disable all triggers based on pull requests created in CircleCI and only trigger the pipeline when a change occurs on (develop, QA, Stage and Master branches) selected branches. For example, Suppose if a developer works on a feature branch and creates a pull request to merge his changes to the develop branch, We don’t want the pipeline to be executed but when the TL reviews the code and then accepts the Pull Request, We will need to run the pipeline. The same way we will need to trigger the pipeline when a change is merged in to QA branch or stage branch or Master branch.