File tree Expand file tree Collapse file tree 2 files changed +24
-1
lines changed
test/kickstart-templates/includes Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change 22
22
23
23
# Configure Red Hat containers policy to use the Red Hat public key, making
24
24
# an exception for unofficial / unreleased images that are used by tests
25
- if [ -f /etc/containers/policy.json ] ; then
25
+ if [ -e /etc/containers/policy.json ] && [ ! -e /etc/containers/policy.json.orig ] ; then
26
26
mv /etc/containers/policy.json /etc/containers/policy.json.orig
27
27
fi
28
28
cat > /etc/containers/policy.json <<' EOF'
Original file line number Diff line number Diff line change @@ -37,3 +37,26 @@ cat > /etc/containers/registries.conf.d/999-microshift-mirror.conf <<'EOF'
37
37
location = " REPLACE_MIRROR_HOSTNAME:REPLACE_MIRROR_PORT/microshift"
38
38
insecure = true
39
39
EOF
40
+
41
+ # Skip signature verification for all images by default.
42
+ # Tests that support signature verification will overwrite this file and reenable
43
+ # it for selected Red Hat registries.
44
+ if [ -e /etc/containers/policy.json ] && [ ! -e /etc/containers/policy.json.orig ]; then
45
+ mv /etc/containers/policy.json /etc/containers/policy.json.orig
46
+ fi
47
+ cat > /etc/containers/policy.json <<' EOF'
48
+ {
49
+ " default" : [
50
+ {
51
+ " type" : " insecureAcceptAnything"
52
+ }
53
+ ],
54
+ " transports" :
55
+ {
56
+ " docker-daemon" :
57
+ {
58
+ " " : [{" type" :" insecureAcceptAnything" }]
59
+ }
60
+ }
61
+ }
62
+ EOF
You can’t perform that action at this time.
0 commit comments