summaryrefslogtreecommitdiff
path: root/yarns/200-ick-workers.yarn
blob: fe78278345b635b06312325932497caec4dd2eb8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Ick workers for my CI system

Ick is my CI program. It needs workers on which it runs builds. These
need to be accessible over ssh, and the remote user must have
passwordless sudo access to run pbuilder.

I have a number of the ick workers. Yarn does not provide a looping
construct or parameterised scenarios. However, since they are all
maintained using Ansible, and should thus be identical, I avoid having
to repeat the scenario for each worker by just blindly assuming that
if one works, they all work.

    SCENARIO ick workers can build packages

Basic checks.

    GIVEN server name is ick-debian8-amd64
    AND server has account ick
    THEN server responds to ping
    AND server hostname is as expected
    AND server account has sudo
    
Do a test build of the Debian hello package.

    GIVEN a remote temporary directory to use
    AND a directory RESULT on the server
    WHEN server runs apt-get source --download-only hello
    WHEN server runs test -e *.dsc
    WHEN server runs sudo pbuilder --build --buildresult RESULT
    ... --basetgz /var/cache/pbuilder/release.tgz hello_2.9-2+deb8u1.dsc
    THEN remote files RESULT/*.deb exist

Cleanup.

    FINALLY remove remote temporary directory