forked from freeipa/freeipa-container
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
84 lines (73 loc) · 2.77 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
75
76
77
78
79
80
81
82
83
language: minimal
os: linux
dist: focal
virt: vm
arch: arm64-graviton2
group: edge
services:
- docker
install:
- if test -n "$ca" ; then sudo apt-get install -y libnss3-tools ; fi
- export docker=${docker:-docker}
- if test "$docker" == "sudo podman" -o "$docker" == 'podman' ; then . /etc/os-release && echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/ /" | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list && curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/Release.key | sudo apt-key add - && sudo apt-get update -y && sudo apt-get install -y podman ; fi
- if [ "$docker" = 'podman' ] ; then sudo apt-get install -y fuse-overlayfs uidmap slirp4netns ; fi
before_script:
- perl -e 'print map "$_=$ENV{$_}".chr(10), sort keys %ENV'
script:
- $docker load -i local-freeipa-server-$dockerfile.tar
- $docker run --rm --entrypoint rpm local/freeipa-server:$dockerfile -qa | sort
- tests/run-master-and-replica.sh local/freeipa-server:$dockerfile
after_failure:
- $docker ps -aq | while read i ; do $docker rm -f $i ; done
- tests/run-partial-tests.sh Dockerfile.$dockerfile
stages:
- build
- test
jobs:
include:
- &build-stage
stage: build
env: dockerfile=fedora-32
install: export docker=${docker:-docker}
script: $docker build -t local/freeipa-server:$dockerfile -f Dockerfile.$dockerfile . && $docker save --output local-freeipa-server-$dockerfile.tar local/freeipa-server:$dockerfile
after_failure: skip
workspaces:
create:
name: fedora-32
paths:
- local-freeipa-server-$dockerfile.tar
- <<: *build-stage
env: dockerfile=centos-8
before_script: sed -i 's%registry.centos.org/centos:8%docker.io/arm64v8/centos:8%' Dockerfile.centos-8
workspaces:
create:
name: centos-8
paths:
- local-freeipa-server-$dockerfile.tar
- stage: test
env: dockerfile=fedora-32 readonly=--read-only
workspaces:
use: fedora-32
- env: dockerfile=fedora-32 docker='sudo podman'
workspaces:
use: fedora-32
- env: dockerfile=fedora-32 docker=podman replica=none
workspaces:
use: fedora-32
- env: dockerfile=centos-8 readonly=--read-only
workspaces:
use: centos-8
- env: dockerfile=centos-8 docker='sudo podman'
workspaces:
use: centos-8
- &test-k3s
env: dockerfile=fedora-32
install: skip
after_failure: skip
script: tests/run-master-in-k3s.sh local/freeipa-server:$dockerfile local-freeipa-server-$dockerfile.tar
workspaces:
use: fedora-32
- <<: *test-k3s
env: dockerfile=centos-8
workspaces:
use: centos-8