New tutorial: snap CD from travis #283

Merged
merged 2 commits into from Jul 13, 2017

Conversation

Projects
None yet
3 participants
Contributor

caldav commented Jul 13, 2017

Markdown port and review for #239

Contributor

caldav commented Jul 13, 2017

@elopio, small updates here and there, please check

Some minor text quibbles :)

+## 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

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

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

+
+![](images/3.png)
+
+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

evilnick Jul 13, 2017

Contributor

There are a lot of 'Now's 😄 . I think it would be okay to drop this one.

+## 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

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.
@evilnick

evilnick Jul 13, 2017

Contributor

s /will try/tries/

+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:
@evilnick

evilnick Jul 13, 2017

Contributor

Docker?

+
+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:
@evilnick

evilnick Jul 13, 2017

Contributor

need to install...

Contributor

evilnick commented on 83b824f Jul 13, 2017

👍 thanks!

+
+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

elopio Jul 13, 2017

What does this positive mean?

@caldav

caldav Jul 13, 2017

Contributor

It creates an orange info box ("negative" creates a red one)

@elopio

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 caldav merged commit fb96df6 into master Jul 13, 2017

Contributor

evilnick commented 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!

@WillMoggridge WillMoggridge deleted the continuous-snap-delivery-from-travis-ci branch Oct 9, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment