-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathtravis-upload-artifacts.sh
executable file
·161 lines (154 loc) · 9.2 KB
/
travis-upload-artifacts.sh
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
#!/bin/sh
if [ "$TRAVIS_SECURE_ENV_VARS" != "true" ]; then
echo "TRAVIS_SECURE_ENV_VARS not available. Aborting artifact upload."
exit
fi
#unpack autorisation information
cat > key.gpg <<EOF
-----BEGIN PGP MESSAGE-----
Version: GnuPG v1
hQQMA10L0QBKvnhZAR//YdhcPOvF55+eSmlSCdHBXX6x0/Y0PRnLiK4RgDXMf8d6
br7d57AVYBcR4SvAXOiqtMXk1i/QiT7LGQi87fp1upNOUsBusPiJGnUvTwM6qDtS
InDy1kCx2p49IadGH09xMkcb2Rbb+T6c6TT0jthIg6FxwALzStBxl8Jt6kKXgETV
ztPxLdJTsmgtitxlsoDF5ZpyTEkgmvuYNm21fuEibeoksMKQlaADasyjzA0n+bbJ
KcZcKCWi7HkPH0BGimuG3ANjvFOBKYu8JRZH0mJvGkdY+om8eK02JscP+ugJ9+Jg
cr+CVnuvJCiEBnF6/uPMb+MD3gZ8CRTuOdfzBNfcvLnfE77ybxXBa71EJ8p7u4gh
35VUhwZ0gxcIKHaHEN8Kz6tQhgEKmBBVDsAWT8V6lSon/+bnw8Q+CbuPVBmKO7r+
7l9ZTrD2JYB7s7sVnLXbHvHUBpHaTFcE8mpeX7q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FbqJDGsHlARcHF1k7UkrDGUZ1DIFRr/NqXW5D6WqmLSj0DLcKNj8lYSZlTrbE8
srWETfCVCMN+yTv3K3i6aYkSu3TghkifC9Q50fJdJVUr75+iMaNLQFpZfohfemsM
Sg5PRnJnu/8L0Q==
=ouRW
-----END PGP MESSAGE-----
EOF
echo $DEPLOY_ENCRYPTION_KEY | gpg -q --passphrase-fd 0 key.gpg
chmod og-rwx key #because it can not be used if it's world readable
#unpack host key pin
mkdir -p ~/.ssh
cat >> ~/.ssh/known_hosts <<EOF
|1|77rB9GV68KMf3QaDwxH2YiO9z4I=|yxXMIIX3291zemNIDz3ChVOv/yA= ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEZRL1Fwe8ez8PAuU8lSPPCv7YG3Iu+3Nu3+M9foZpmve6IkkXLy/L36jLEoqjIbpLB7Ti1UvKiujzHnX14Plhc=
|1|F6RqwHRXPPTzrDIXBxRA58+gois=|z0cmY0/qpO5CpCQKOUmrjeuUozg= ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEZRL1Fwe8ez8PAuU8lSPPCv7YG3Iu+3Nu3+M9foZpmve6IkkXLy/L36jLEoqjIbpLB7Ti1UvKiujzHnX14Plhc=
EOF
chmod og-rwx ~/.ssh ~/.ssh/known_hosts
#upload artifacts
cd artifacts
{
echo mkdir doc/$TRAVIS_COMMIT
echo put . doc/$TRAVIS_COMMIT/node_$TRAVIS_NODE_VERSION
} | sftp -P 1922 -r -i ../key [email protected]
echo "View the build results now on http://mqtt-control-map.starletp9.de/$TRAVIS_COMMIT/node_$TRAVIS_NODE_VERSION/"