Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
New tutorial: snap CD from travis #283
Conversation
|
@elopio, small updates here and there, please check |
| +## Overview | ||
| +Duration: 1:00 | ||
| + | ||
| +Travis CI is a continuous integration service that can be used to build, test and deliver software. Travis is free for Free Software projects, while [Travis Pro] is available for private GitHub repositories. We will use Travis CI to build your snap and push it automatically to the `edge` channel of the store every time you make a change to your branch in GitHub. |
evilnick
Jul 13, 2017
Contributor
Would it help to say what store. And maybe put a link in the first time it is mentioned.
| +git push | ||
| +``` | ||
| + | ||
| +We now have a GitHub project containing packaging details for a snap, it’s time to look at Travis CI... |
evilnick
Jul 13, 2017
Contributor
I would say either "Now we have..." or "We now have... and it's time..."
I can't remember why, but either is more correct
| + | ||
| + | ||
| + | ||
| +Now, we need a `.travis.yml` file for your project. Travis CI will run the steps specified in this file on every pull request and every time a change is pushed to the master branch. These steps are going to be a few bash commands and scripts. |
evilnick
Jul 13, 2017
Contributor
There are a lot of 'Now's
| +## Building the snap in a clean environment | ||
| +Duration: 5:00 | ||
| + | ||
| +Travis CI executors are using Ubuntu 14.04, but are missing some kernel changes to be able to run snapcraft as a snap itself. Since they support Docker, we will use a snapcraft Docker container to build the snap. |
evilnick
Jul 13, 2017
Contributor
I would say:
Travis CI uses a build environment based on Ubuntu 14.04, which is missing some requirements for running snapcraft. However, it does have support for Docker, so we will use a Docker container to build the snap
| +Positive | ||
| +: **The need for a clean environment** | ||
| +When you build a snap on your machine, it could be using some dependencies that are already installed but you forgot to declare as `build-packages` in the snapcraft.yaml. | ||
| +This means that when somebody will try to build the same snap on a different machine, those undeclared packages could be missing and the build would fail. |
| +This means that when somebody will try to build the same snap on a different machine, those undeclared packages could be missing and the build would fail. | ||
| +A clean environment, such as a default Ubuntu 14.04 or 16.04 in a container, ensures reproducible builds. | ||
| + | ||
| +Let’s install docker, to get the same environment that Travis CI will use to build the snap: |
| + | ||
| +The final step to enable continuous delivery from Travis CI to all your early adopters is to add some commands to the `.travis.yml` file we created before. But we don’t really have to do much, snapcraft will take care of it for us. | ||
| + | ||
| +We need install the travis command-line utility, which will be used by snapcraft in a moment. Travis is a ruby gem, but is not available in the Ubuntu repositories, so installing it requires a few commands: |
|
|
| + | ||
| +Before we build our snap in Travis CI’s executors, we need to make sure the snap builds correctly in a Docker container. | ||
| + | ||
| +Positive |
elopio
Jul 13, 2017
Nice, thanks for the info. I suggest to make the name more clear, calling it like positive note. But I will sure enjoy a lot more writing tutorials now in markdown :D
elopio
approved these changes
Jul 13, 2017
Awesome! Thanks a lot, and I love that we are now using markdown :)
I left a question, just to understand what was happening there. But this is good to go from my side.
caldav
merged commit fb96df6
into
master
Jul 13, 2017
|
@elopio We look forward to seeing more - the Markdown we use is still a bit ...quirky, but 1000 times better than having to use a google doc! |

caldav commentedJul 13, 2017
Markdown port and review for #239