This repository has been archived by the owner on Jul 20, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
72 lines (57 loc) · 1.75 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
language: python
dist: xenial
python:
- "3.6"
- "3.7"
- "3.8"
addons:
apt:
packages:
- libgconf-2-4
install:
- pip install pip --upgrade
- pip install -e .
- pip install -e '.[tests]'
env:
- CYPRESS_VIDEO=false
FILENAME=/tmp/image/context.tar
DOCKER_PLATFORM=linux/386,linux/arm64,linux/amd64,linux/arm/v7,linux/arm/v6
TARGET_IMAGE=delfick/photons-interactor
before_script:
- npm install -g [email protected]
- |
echo '{"interactor": {"database": {"uri": "sqlite:///:memory:"}}}' > interactor.yml
- photons-interactor npm run -- ci
script:
- ./test.sh -v
- photons-interactor npm test --silent
- ./integrationjstest.sh
jobs:
include:
- stage: deploy
script: skip
addons: skip
install: skip
before_script: skip
if: tag IS present
before_deploy:
- pip install venvstarter
- mkdir /tmp/image
- ./docker/harpoon get_docker_context photons-interactor
- curl -fsSL https://get.docker.com | sh
- echo '{"experimental":"enabled"}' | sudo tee /etc/docker/daemon.json
- mkdir -p $HOME/.docker
- echo '{"experimental":"enabled"}' | sudo tee $HOME/.docker/config.json
- sudo service docker start
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- docker buildx create --name xbuilder --use
- echo "$DOCKER_TOKEN" | docker login -u "$DOCKER_USERNAME" --password-stdin
deploy:
provider: script
skip_cleanup: true
on:
tags: true
script: >-
cd /tmp/image
&& tar xf context.tar
&& docker buildx build --progress plain --platform $DOCKER_PLATFORM --push -t ${TARGET_IMAGE}:${TRAVIS_TAG} -t ${TARGET_IMAGE}:latest .