-
Notifications
You must be signed in to change notification settings - Fork 2
How the project is set up
This document will describe what happens from the moment a contributor decides to make a change to the code, to the moment that change is visible to the users.
Optimally, a contributor follows the contribution guidelines.
The contributor will then:
- clone the repository and make a new branch or create a new fork
- write code and push it to their branch or fork
- create tests for their code and push them to the same branch or fork
- create a pull request containing code and necessary new tests
After the pull request is created, another contributor can approve it and it can then be merged with the master branch. An explanation of branches can also be found in the contribution guidelines.
When branches are merged into master, or changes are pushed directly to master, the CI/CD pipeline will be activated automagically.
The pipeline steps are as follows:
- TravisCI fetches the code from the master branch, build the project and start running the tests.
- If the tests pass, TravisCI will deploy the build folder to Netlify.
- Netlify is set to auto publish any deploy, so when the build is received, Netlify will publish it.
- The changes are now visible on the production website!
The steps TravisCI performs is defined in the project's .travis.yml file. To add, remove or edit build, testing and deployment steps you can edit this file and push it to the repo. Documentation can be found here. TravisCI also runs tests on commits pushed to branches. A running build is shown as a yellow dot next to the branch name, a successful build shows a green check mark and a failed build shows a red cross. The build history is public, so anyone with the link can view the logs. If your build fails, this is where you would find the error message that appears. Locate the build that belongs to your branch and scroll down.
Netlify is also configured to have public logs, but you are greatly encouraged to create an account or you won't be able to view the whole history. These logs will tell you when the last deploy was made and when the latest deploy was published.