Skip to content

Commit 008fee7

Browse files
authored
Simplifty the Snaps documentation
1 parent 6b6f298 commit 008fee7

File tree

1 file changed

+25
-11
lines changed

1 file changed

+25
-11
lines changed

user/installing-dependencies.md

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -142,32 +142,46 @@ addons:
142142

143143
> Note: If `apt-get install` fails, the build is marked an error.
144144

145-
### Installing Snap Packages
145+
### Installing Snap Packages with the Snaps Addon
146146

147-
You can install [snap](http://snapcraft.io/) packages in the sudo enabled infrastructure using the Trusty dist:
147+
You can install [snap](http://snapcraft.io/) packages using our Xenial images:
148148

149149
```yaml
150-
sudo: required
151-
dist: trusty
150+
dist: xenial
152151
```
153152
{: data-file=".travis.yml"}
154153

154+
The Ubuntu Snap store offers many packages directly maintained by upstream developers, often with newer versions than the ones available in the Apt archive. For example, you can install and run the latest version of [hugo](http://gohugo.io/):
155155

156-
The Ubuntu snap store offers many packages directly maintained by upstream developers, with newer versions than the ones available in the Trusty archive, or even packages that didn't exist when Trusty was released. For example, you can install and run the latest version of [hugo](http://gohugo.io/):
156+
```yaml
157+
dist: xenial
158+
159+
addons:
160+
snaps:
161+
- hugo
162+
163+
script:
164+
- hugo new site test-site
165+
```
166+
{: data-file=".travis.yml"}
167+
168+
If you need to install a package from a different channel, or a package that uses [classic confinement](https://blog.ubuntu.com/2017/01/09/how-to-snap-introducing-classic-confinement), you can do so with the following config:
157169

158170
```yaml
159-
sudo: true
160-
dist: trusty
171+
dist: xenial
161172
162-
install:
163-
- sudo apt-get --yes install snapd
164-
- sudo snap install hugo
173+
addons:
174+
snaps:
175+
- name: aws-cli
176+
classic: true
177+
channel: latest/edge
165178
166179
script:
167-
- /snap/bin/hugo new site test-site
180+
- aws help
168181
```
169182
{: data-file=".travis.yml"}
170183

184+
171185
## Installing Packages on Container Based Infrastructure
172186

173187
To install packages not included in the default [container-based-infrastructure](/user/reference/overview/#virtualization-environments) you need to use the APT addon, as `sudo apt-get` is not available.

0 commit comments

Comments
 (0)