-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
64 lines (56 loc) · 2.76 KB
/
.travis.yml
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
version: ~> 1.0
# Ubuntu 18.04 LTS
dist: bionic
os: linux
# https://docs.travis-ci.com/user/languages/minimal-and-generic/
language: generic
### default steps, common for each job
before_install:
- whoami && echo $HOME && echo $PWD
### defined jobs
jobs:
include:
# feature: json_linting, 6 lines
- stage: lint
name: check JSON
install:
- npm install jsonlint -g
script:
- find . -name "*.json" -type f -exec jsonlint -q "{}" \; -exec /bin/echo "{}" \;
# feature: bash_linting, 3 lines
- name: check shell scripts
script:
- bash -c 'shopt -s globstar nullglob; shellcheck **/*.{sh,ksh,bash}'
# feature: dockerhub_upload, 16 lines
- stage: upload to dockerhub
name: yakshaving/linux docker image as Ubuntu 18.04 with autoupdate
env:
- DOCKER_USERNAME=yeesus
# encrypted DOCKER_PASSWORD
- secure: xc5vP+LjpNnZgMIfXUUeP3EBGhhNoDV5vTfophBliaWZrBX8POpLOFQGZ/Fcd0i+UBmSckLYW30BLSwHwjYLAZJGM12AfeiKbI1eub5tNfsosI2FZ3lNeb2nlpoIjzpsyS5fknJL0zQfkadUgxbrwDRDuaN+P6oOup3XMgHR9hkjb/QwVW2ozxU+OP4iRvcNECLP+XqnsOyq0YFshZzRMOd6fVYnJZuP6NTj24hCfymcmZJlS8Q5dSHISg68Lckaa/z3APxrMW+5/PORsHZ/U8yugNQr6Ty5J3YoaEuUoaMaUkGpaiuP26/lndynlRhNVlw8zQKfb7A09oom/UjnhyLE+9NuhKpo7f3l56OP/ubIvJzkrGt0hqwKnW2+EixURLxAOL7shtc/9gl8q2cPwEJg50siIRGJXkUEear/oqYr/EqEk1/6kq3dOfaDM0kRYAeHi8Kuf4+tyTbKQDULT3xYMi3ZxAYTd8gEMGsWca+PT/+IfFB4sHADmFmh6Y9VhI89Zrsrqa7C2BlS/ytuiAJHgrleKxyYKEFy78yG5Tb/AGi2UmGFMk8ShKRNrK8VJmrqixWttvyUr81iBI5uEP9copsXDnR5aZaFZF5vBi7PK85Ngwj6uREM+rjQadaPR49KQqUXFj0s3OXbwDXgMFIXAguqsji/nm4IuEeA8zA=
- DOCKER_IMAGE=yakshaveinc/linux
script:
- docker run --name linuxcon -v `pwd`/ubuntu:/01 ubuntu:18.04 /bin/sh -c "/01/01autoupdate.sh"
- docker commit linuxcon "$DOCKER_IMAGE"
deploy:
- provider: script
script: docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD" &&
docker push "$DOCKER_IMAGE"
on:
branch: master
# feature: snapcrafting, 13 lines
- stage: upload to snapcraft
name: build and publish snaps
script:
# use custom snapcraft image based on Ubuntu 18.04
- docker run yakshaveinc/snapcraft:core18 snapcraft version
- docker run -v $PWD:/src:Z -w /src/snapcrafting/yakshaveinc yakshaveinc/snapcraft:core18 snapcraft
- docker run -v $PWD:/src:Z -w /src/snapcrafting/myip yakshaveinc/snapcraft:core18 snapcraft
deploy:
# the provider uses SNAP_TOKEN set in Travis settings and generated with
# snapcraft export-login --snaps=yakshaveinc,amend --acls=package_upload --channels=stable -
- provider: snap
snap: snapcrafting/yakshaveinc/yakshaveinc*.snap
channel: stable
# use Travis dpl v2
edge: true