-
Notifications
You must be signed in to change notification settings - Fork 7
/
.travis.yml
51 lines (43 loc) · 1.32 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
language: shell
services:
- docker
os: linux
dist: focal
env:
global:
- IMAGE=journald-2-cloudwatch
jobs:
include:
- &test
stage: test
arch: amd64
env: TAG=amd64
before_install:
- docker build -t "$IMAGE" -f Dockerfile .
install:
- pip install coverage
- docker build -t "$IMAGE"-test -f Dockerfile.test .
script:
- docker run --rm -v "$(pwd):$(pwd)" -w "$(pwd)" "$IMAGE"-test
after_success:
- 'bash <(curl -s https://codecov.io/bash)'
deploy:
provider: script
script: >-
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
&& docker tag journald-2-cloudwatch "$DOCKER_USERNAME/$IMAGE:$TAG"
&& docker push "$DOCKER_USERNAME/$IMAGE:$TAG"
on:
branch: master
- <<: *test
arch: arm64-graviton2
group: edge
virt: vm
env: TAG=arm64
- stage: deploy
script:
- mkdir -p ~/.docker
- "echo '{\"experimental\": true}' > ~/.docker/config.json"
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker manifest create "$DOCKER_USERNAME/$IMAGE" "$DOCKER_USERNAME/$IMAGE:amd64" "$DOCKER_USERNAME/$IMAGE:arm64"
- docker manifest push "$DOCKER_USERNAME/$IMAGE"