forked from TasmoAdmin/TasmoAdmin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
74 lines (60 loc) · 2.35 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
65
66
67
68
69
70
71
72
73
74
sudo: 'required'
services:
- 'docker'
language:
- 'bash'
env:
global:
- TARGET=raymondmm/tasmoadmin
- QEMU_VERSION=v2.12.0
before_install:
- mkdir tmp
- ./.docker/docker.sh prepare
install: true
before_script:
# Create _releases directory
- mkdir _releases
# Set BUILD_VERSION
- if [ ! -z "$TRAVIS_TAG" ]; then export BUILD_VERSION=$TRAVIS_TAG; else export BUILD_VERSION=$TRAVIS_BRANCH; fi
script:
# Build Docker images
- ./.docker/docker.sh build
# Test Docker images
- ./.docker/docker.sh test
# Pack TasmoAdmin src to tar.gz
- tar -zcf ./_releases/tasmoadmin_${BUILD_VERSION}.tar.gz tasmoadmin
- zip -q -r ./_releases/tasmoadmin_${BUILD_VERSION}.zip tasmoadmin
# Pack TasmoAdmin XAMPP portable
- cat portable/xampp.zip.* > portable/xampp.zip
- unzip -q portable/xampp.zip -d ./tmp/
- cp -R tasmoadmin ./tmp/xampp/htdocs/
- cp -R portable/root_xampp/* ./tmp/xampp/
- >
pushd tmp &&
zip -q -r ../_releases/tasmoadmin_${BUILD_VERSION}_xampp_portable.zip xampp &&
popd
deploy:
# Deploy TasmoAdmin release to github
provider: releases
api_key:
- secure: BWGbGGe1/OY5JA+NopazqM9pL+lAExG5U2s99bdEIvBewladc2OSW4VRhLcx7OxRAifh0IdMtdDV6pV8SH3StI3hBxqQa/9TpbjORDovAt3khD/eW3uEw5qLB+JcnlmFV7yFkSq1HuVOBct9gDCNPisRsIvmqUuYPW50wOILj5usXOtt7wx6hDPfvwuDyOTFsEq1XTLK1UUgFdoghs5KAU7i7U76MFV+7YwEU65z7WDRNU5/0bJDK4oMADQcXJkFnhoIm3Ctuv7LsgUGPU3HYSW65hKpjLZgPuh3ON6Qz9ZTDD3Nxd322TMsMRThxMtpmpXWOi0C+18zB0P/mGfsP7wxPyozOeRoOIlri4qjPXwL+P80jCRoXASsVL4LXfnGxaXC2P99CYw3MvGsgq/ZZoEZVtqssXQ2y4+pNfFfAk+/7nEhjDGT4uxfY9PGQyaTX7SjP1qkzqHu7bBxBlhbovhBES7fsc+qvXB98l5dF0QukZYjC4fBUQ7iDU0/HO/dJuyjpBEv1kWkWr/ytmEB9Yr9V80WW0mv0A1SBMfm/7u5kAzF8MEpSH95wFxbHSyqpyUeBmlri4VJ4UqqBEtwnk0SEsCSfWq/YXmWVCScBf1+MfLKE2TsY7/lVrw/Q9L9GNzWfkQU+fAvxTnS2swUMzfjXBXJaQl3SttmjNe62PI=
file: "./_releases/*"
file_glob: true
skip_cleanup: true
on:
tags: true
after_deploy:
# Push Docker images to Docker Hub
# Docker Login
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
# Tag all images
- ./.docker/docker.sh tag
# Push all images
- ./.docker/docker.sh push
# Create and push manifest list
- ./.docker/docker.sh manifest-list
# Docker Logout
- docker logout
# notify when things fail
notifications:
email: true