forked from containers/buildah
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.papr.yml
87 lines (74 loc) · 2.84 KB
/
.papr.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
84
85
86
87
branches:
- master
- auto
- try
host:
distro: fedora/28/atomic
required: true
tests:
# Let's create a self signed certificate and get it in the right places
- hostname
- ip a
- ping -c 3 localhost
- cat /etc/hostname
- mkdir -p /home/travis/auth
- openssl req -newkey rsa:4096 -nodes -sha256 -keyout /home/travis/auth/domain.key -x509 -days 2 -out /home/travis/auth/domain.crt -subj "/C=US/ST=Foo/L=Bar/O=Red Hat, Inc./CN=localhost"
- cp /home/travis/auth/domain.crt /home/travis/auth/domain.cert
- sudo mkdir -p /etc/docker/certs.d/docker.io/
- sudo cp /home/travis/auth/domain.crt /etc/docker/certs.d/docker.io/ca.crt
- sudo mkdir -p /etc/docker/certs.d/localhost:5000/
- sudo cp /home/travis/auth/domain.crt /etc/docker/certs.d/localhost:5000/ca.crt
- sudo cp /home/travis/auth/domain.crt /etc/docker/certs.d/localhost:5000/domain.crt
# Create the credentials file, then start up the Docker registry
- podman run --entrypoint htpasswd registry:2 -Bbn testuser testpassword > /home/travis/auth/htpasswd
- podman run -d -p 5000:5000 --name registry -v /home/travis/auth:/home/travis/auth:Z -e "REGISTRY_AUTH=htpasswd" -e "REGISTRY_AUTH_HTPASSWD_REALM=Registry Realm" -e REGISTRY_AUTH_HTPASSWD_PATH=/home/travis/auth/htpasswd -e REGISTRY_HTTP_TLS_CERTIFICATE=/home/travis/auth/domain.crt -e REGISTRY_HTTP_TLS_KEY=/home/travis/auth/domain.key registry:2
# Test Podman setup
- podman version
- podman info
- podman ps --all
- podman images
- ls -alF /home/travis/auth
- podman pull alpine
- podman login localhost:5000 --username testuser --password testpassword
- podman tag alpine localhost:5000/my-alpine
- podman push --creds=testuser:testpassword localhost:5000/my-alpine
- podman ps --all
- podman images
- podman rmi docker.io/alpine
- podman rmi localhost:5000/my-alpine
- podman pull --creds=testuser:testpassword localhost:5000/my-alpine
- podman ps --all
- podman images
- podman rmi localhost:5000/my-alpine
# mount yum repos to inherit injected mirrors from PAPR
- podman run --net=host --security-opt label=disable --cap-add all --security-opt seccomp=unconfined -v /etc/yum.repos.d:/etc/yum.repos.d.host:ro
-v $PWD:/go/src/github.com/containers/buildah
--workdir /go/src/github.com/containers/buildah
registry.fedoraproject.org/fedora:28 bash -c sh ./.papr.sh
---
container:
image: registry.fedoraproject.org/fedora:28
packages:
- btrfs-progs-devel
- bzip2
- device-mapper-devel
- findutils
- git
- glib2-devel
- gnupg
- golang
- libassuan-devel
- make
- ostree-devel
- skopeo-containers
required: false
pulls: true
env:
GOPATH: /go
GOSRC: /go/src/github.com/containers
tests:
- mkdir -p $GOSRC && ln -s /var/tmp/checkout $GOSRC/buildah
- cd $GOSRC/buildah && make darwin
artifacts:
- test-suite.log
context: "darwin CI"