-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
53 lines (52 loc) · 1.68 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
sudo: required
services:
- docker
language: node_js
node_js:
- "10"
env:
- NODE_ENV=testing
before_install:
- wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.2.10.tgz
- tar xfz mongodb-linux-x86_64-3.2.10.tgz
- export PATH=`pwd`/mongodb-linux-x86_64-3.2.10/bin:$PATH
- mkdir -p data/db
- mongod --dbpath=data/db &
- sleep 3
install:
- sudo apt update -y
- sudo apt install --only-upgrade docker-ce -y
before_script:
- mongo test --eval 'db.createCollection("IoT");'
- mongo test --eval 'db.createCollection("ml");'
script:
- |
echo "Updating Docker to have docker manifest command"
curl https://get.docker.com | sh
echo "Enabling docker client experimental features"
mkdir -p ~/.docker
echo '{ "experimental": "enabled" }' > ~/.docker/config.json
docker version
# test code
- npm i
- npm run compile
- npm run test-ci
# prepare qemu
- docker run --rm --privileged multiarch/qemu-user-static:register --reset
# build image
- docker build -t haegi/silex .
# test image
# push image
- >
if [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
docker login -u="$DOCKER_USER" -p="$DOCKER_PASS"
TAG=0.3
docker tag haegi/silex haegi/silex:arm-$TAG
docker push haegi/silex:arm-$TAG
docker manifest create haegi/silex:$TAG haegi/silex:arm-$TAG
docker manifest annotate haegi/silex:$TAG haegi/silex:arm-$TAG --os linux --arch arm --variant v6
docker manifest push haegi/silex:$TAG
docker manifest create haegi/silex haegi/silex:arm-$TAG
docker manifest annotate haegi/silex haegi/silex:arm-$TAG --os linux --arch arm --variant v6
docker manifest push haegi/silex
fi