Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the travis build to work in stages #948

Merged
merged 5 commits into from Aug 27, 2018
Merged

Update the travis build to work in stages #948

merged 5 commits into from Aug 27, 2018

Conversation

ericcornelissen
Copy link
Contributor

@ericcornelissen ericcornelissen commented Aug 26, 2018

Improve the CI (test, build, and deploy) process by using build stages rather than a (somewhat hard to understand and arbitrary) build matrix. For now it just improves the readability of the .travis.yml file and the understandability of the build status page.

For clarity, I added two commits showing the build report when something goes wrong. The first is when the website cannot be build, and the second is when there is a linting error. As seen in the images below:

build website error

linting error


To summarize, Travis will now first lint & build the website (in parallel), and only if both succeed will it try to deploy. That only happens if the commit is on master. So it is ignored most of the time, as seen here.

In the future, with #898 in mind, this would make it easier to build to website in one step, and have it be deployed in another one (if that is even needed 馃), Possibly we could even load external files (e.g. simple-icons-pdf), and include them in the website. Also, extra test steps (such as described in #905) are now easier to add.

@ericcornelissen ericcornelissen changed the title [WIP] Update the travis build to work in stages Update the travis build to work in stages Aug 26, 2018
Copy link
Contributor

@birjj birjj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great idea!

Note that when it comes to building and deploying in two separate stages, storage isn't shared amongst stages - this means that although we can (and should) use a single stage for testing that the build works, we will also have to run the build in the deploy stage.

[Edit] Whoops, didn't submit the inline comment. Guess it'll have to be here instead.
Minor thing, but could we add a conditional branch = master to the deploy stage, so that PRs targetting develop don't run an empty stage?

So PRs targetting develop don't run an empty stage.

Related Travis Documentation:
https://docs.travis-ci.com/user/conditional-builds-stages-jobs/
@ericcornelissen
Copy link
Contributor Author

Minor thing, but could we add a conditional branch = master to the deploy stage, so that PRs targetting develop don't run an empty stage?

Good idea, I added the conditional and it seems to work. I left the conditional in the deploy: as well just to be sure (this one), but I would be happy to remove it 馃槃

@birjj
Copy link
Contributor

birjj commented Aug 27, 2018

馃憤 Nice work on this!

@birjj birjj merged commit e414ade into simple-icons:develop Aug 27, 2018
@ericcornelissen ericcornelissen deleted the tools/ci-stages branch August 27, 2018 15:52
@ericcornelissen
Copy link
Contributor Author

I'm happy to report that the deployment still works, see this Travis build 馃帀

@davidklebanoff davidklebanoff added the meta Issues or pull requests regarding the project or repository itself label Mar 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
meta Issues or pull requests regarding the project or repository itself
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants