Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cirrus: Fix missing htpasswd command in registry image #2427

Merged
merged 1 commit into from
Jun 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
docs/buildah*.1
/bin
/buildah
/imgtype
/build/
Expand Down
5 changes: 3 additions & 2 deletions contrib/cirrus/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ else
then
showrun make install PREFIX=/usr
showrun ./bin/buildah info
else
ln -v ${CROSS_TARGET} bin/buildah
else # some tooling expects the binary to be here
rm -vf buildah # failure ok
ln -sv bin/buildah ./
fi
fi
6 changes: 2 additions & 4 deletions contrib/cirrus/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -316,12 +316,10 @@ execute_local_registry() {
cp $authdirpath/domain.crt $certdirpath/localhost:5000/domain.crt
echo "Creating http credentials file"
podman run --entrypoint htpasswd $REGISTRY_FQIN \
-Bbn testuser testpassword \
> $authdirpath/htpasswd
showrun htpasswd -Bbn testuser testpassword > $authdirpath/htpasswd
echo "Starting up the local 'registry' container"
podman run -d -p 5000:5000 --name registry \
showrun podman run -d -p 5000:5000 --name registry \
-v $authdirpath:$authdirpath:Z \
-e "REGISTRY_AUTH=htpasswd" \
-e "REGISTRY_AUTH_HTPASSWD_REALM=Registry Realm" \
Expand Down
9 changes: 7 additions & 2 deletions contrib/cirrus/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ case "$OS_RELEASE_ID" in
if [[ -z "$CONTAINER" ]]; then
warn "Adding secondary testing partition & growing root filesystem"
bash $SCRIPT_BASE/add_second_partition.sh

warn "TODO: Add (for htpasswd) to VM images (in libpod repo)"
dnf install -y httpd-tools
fi

warn "Hard-coding podman to use crun"
Expand All @@ -35,11 +38,13 @@ case "$OS_RELEASE_ID" in
# Executing tests in a container requires SELinux boolean set on the host
if [[ "$IN_PODMAN" == "true" ]]
then
setsebool -P container_manage_cgroup true
showrun setsebool -P container_manage_cgroup true
fi
;;
ubuntu)
: # no-op
warn "TODO: Add to VM images (in libpod repo)"
$SHORT_APTGET update
$SHORT_APTGET install apache2-utils
;;
*)
bad_os_id_ver
Expand Down