Skip to content

Commit dd1a873

Browse files
committed
Add sigstore setting to registry.redhat.io configuration
1 parent f89c985 commit dd1a873

File tree

2 files changed

+16
-11
lines changed

2 files changed

+16
-11
lines changed

test/bin/mirror_registry.sh

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ EOF
4141
# TLS authentication is disabled in Quay local registry. The mirror-images.sh
4242
# helper uses skopeo without TLS options and it defaults to https, so we need
4343
# to configure registries.conf.d for skopeo to try http instead.
44-
sudo bash -c 'cat > /etc/containers/registries.conf.d/900-microshift-mirror.conf' << EOF
44+
sudo bash -c 'cat > /etc/containers/registries.conf.d/900-microshift-mirror.conf' <<EOF
4545
[[registry]]
4646
prefix = ""
4747
location = "${MIRROR_REGISTRY_URL}"
@@ -63,13 +63,26 @@ EOF
6363
EOF
6464

6565
# Complete the source registry configuration to use sigstore attachments.
66-
# Note that registry.redhat.io.yaml should already be present.
67-
sudo bash -c 'cat > /etc/containers/registries.d/registry.quay.io.yaml' <<EOF
66+
# Note that registry.redhat.io.yaml file already exists, but it is missing the
67+
# sigstore attachment enablement setting.
68+
sudo bash -c 'cat > /etc/containers/registries.d/registry.quay.io.yaml' <<'EOF'
6869
docker:
6970
quay.io:
7071
use-sigstore-attachments: true
7172
EOF
7273

74+
if [ -e /etc/containers/registries.d/registry.redhat.io.yaml ] &&
75+
[ ! -e /etc/containers/registries.d/registry.redhat.io.yaml.orig ]; then
76+
sudo mv /etc/containers/registries.d/registry.redhat.io.yaml /etc/containers/registries.d/registry.redhat.io.yaml.orig
77+
fi
78+
79+
sudo bash -c 'cat > /etc/containers/registries.d/registry.redhat.io.yaml' <<'EOF'
80+
docker:
81+
registry.redhat.io:
82+
use-sigstore-attachments: true
83+
sigstore: https://registry.redhat.io/containers/sigstore
84+
EOF
85+
7386
# Configure the destination local registry to use sigstore attachments.
7487
# Note: The sigstore staging directory is required because not all registries
7588
# support direct copy of signatures. In this case, the signatures are downloaded

test/kickstart-templates/includes/post-containers.cfg

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,6 @@ cat > /etc/containers/policy.json <<'EOF'
8787
}
8888
EOF
8989

90-
# Configure the MicroShift remote registries to use sigstore attachments
91-
# Note that registry.redhat.io.yaml should already be present.
92-
cat > /etc/containers/registries.d/registry.quay.io.yaml <<'EOF'
93-
docker:
94-
quay.io/openshift-release-dev:
95-
use-sigstore-attachments: true
96-
EOF
97-
9890
# Configure the MicroShift local registries to use sigstore attachments
9991
cat > /etc/containers/registries.d/registry.quay.local.yaml <<'EOF'
10092
docker:

0 commit comments

Comments
 (0)