Skip to content

Commit 8d0c333

Browse files
committed
Enable public Quay repository creation on push
1 parent 092b975 commit 8d0c333

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

test/bin/mirror_registry.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,10 @@ FEATURE_USER_INITIALIZE: true
197197
SUPER_USERS:
198198
- microshift
199199
EOF
200+
# Enable public repository creation on push
201+
# See https://docs.redhat.com/en/documentation/red_hat_quay/3/html-single/configure_red_hat_quay/index#config-fields-misc
202+
echo "CREATE_PRIVATE_REPO_ON_PUSH: false" >> "${QUAY_CONFIG_DIR}/config.yaml"
203+
200204
# Enable Quay dual-stack server support if the local host supports IPv6
201205
local podman_network=""
202206
if ping -6 -c 1 ::1 &>/dev/null ; then
@@ -221,7 +225,7 @@ EOF
221225
# See https://docs.projectquay.io/deploy_quay.html#deploy-quay-registry
222226
echo "Running Quay container"
223227
sudo podman run -d --name=microshift-quay \
224-
"${podman_network}" \
228+
${podman_network} \
225229
-p "${MIRROR_REGISTRY_PORT}:8080" \
226230
-p "[::]:${MIRROR_REGISTRY_PORT}:8080" \
227231
-v "${QUAY_CONFIG_DIR}:/conf/stack:Z" \
@@ -253,9 +257,6 @@ EOF
253257
}
254258

255259
finalize_registry() {
256-
# Ensure that all the created repositories are public
257-
sudo podman exec -it microshift-postgres \
258-
psql -d quay -U quayuser -c 'UPDATE public.repository SET visibility_id = 1' >/dev/null
259260
# Ensure that permissions are open for the current user on the mirror registry
260261
# directories and files. This is necessary to avoid 'find' command errors.
261262
sudo chgrp -R "$(id -gn)" "${MIRROR_REGISTRY_DIR}"

0 commit comments

Comments
 (0)