forked from Cloudbox/Cloudbox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
105 lines (86 loc) · 3.23 KB
/
appveyor.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
---
version: 1.0.0-{build}
skip_tags: true
skip_commits:
files:
# git
- '.gitignore'
- '.gitmodules'
- '.github/**/*'
# docs
- '*.md'
# vagrant
- 'Vagrantfile'
# ansible config
- 'defaults/**/*'
- 'filter_plugins/**/*'
- 'inventories/**/*'
- 'library/**/*'
# ansible roles
- 'roles/*/files/**/*'
- 'roles/settings/**/*'
- 'roles/backup/**/*'
- 'roles/restore/**/*'
# ansible roles extras
- 'roles/cloudflare/**/*'
- 'roles/ddclient/**/*'
- 'roles/feeder/**/*'
- 'roles/mariadb/**/*'
- 'roles/nginx/**/*'
- 'roles/notify/**/*'
- 'roles/nvidia/**/*'
- 'roles/nzbthrottle/**/*'
- 'roles/plex_auth_token/**/*'
- 'roles/plex_dupefinder/**/*'
- 'roles/plex_patrol/**/*'
- 'roles/python-plexlibrary/**/*'
- 'roles/resilio-sync/**/*'
- 'roles/sickbeard_mp4_automator/**/*'
- 'roles/subliminal/**/*'
- 'roles/traktarr/**/*'
message: /\[minor\]/
image: Ubuntu1804-minimal
matrix:
fast_finish: true
# to disable automatic builds
build: off
init:
- sh: curl -s https://cloudbox.works/scripts/dep.sh | sudo -H sh &> /dev/null
install:
- sh: git submodule update --init --recursive
- sh: for i in defaults/*; do cp -n $i "$(basename "${i%.*}")"; done
- sh: sudo ansible-playbook cloudbox.yml --syntax-check
- sh: sudo ansible-playbook cloudbox.yml --tags core --skip-tags "settings" --extra-vars '{"continuous_integration":true}'
- sh: sudo docker login -u $DOCKER_USER -p $DOCKER_PWD
- sh: |
sudo ansible-playbook cloudbox.yml --tags "cloudbox,emby,netdata,sabnzbd" \
--skip-tags "settings" \
--extra-vars '{"continuous_integration":true}'
# https://boblokerse.github.io/2015/11/03/GitVersion-versioning-made-easy-and-dry/
on_finish:
- ps: |
function gitVersion() {
$env:newhash=git rev-parse HEAD
write-host "newhash = $env:newhash"
$env:shorthash=git rev-parse --short HEAD
write-host "shorthash = $env:shorthash"
$env:gitCommits=git describe --tags $env:APPVEYOR_REPO_BRANCH | %{$_.split('-')[1]}
write-host "gitCommits = $env:gitCommits"
$env:gitVersion=git describe --tags --abbrev=0 $env:APPVEYOR_REPO_BRANCH
write-host "gitVersion = $env:gitVersion"
$env:newVersion="$env:gitVersion-$env:gitCommits"
write-host "newVersion = $env:newVersion"
$env:appveyor_info_version="$env:newVersion-$env:APPVEYOR_REPO_BRANCH"
write-host "appveyor_info_version = $env:appveyor_info_version"
$env:appveyor_build_version="$env:newVersion"
write-host "appveyor_build_version = $env:appveyor_build_version"
appveyor UpdateBuild -Version "$env:newVersion"
if ($LastExitCode -ne 0) { appveyor UpdateBuild -Version "$env:APPVEYOR_BUILD_VERSION" }
write-host "=========================================="
write-host "Using hash for build version: $env:newhash"
write-host "Update appveyor build version to: $env:appveyor_build_version"
write-host "Update appveyor info version to: $env:appveyor_info_version"
}
if( -not ($env:APPVEYOR_PULL_REQUEST_NUMBER) -and ($env:APPVEYOR_REPO_BRANCH –eq "develop") ){
gitVersion
}