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

#149 fix: various issues with image build and test #150

Merged
merged 8 commits into from
Oct 4, 2024
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
6 changes: 6 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ jobs:
matrix: ${{ fromJSON(needs.matrix.outputs.matrix) }}
fail-fast: false
steps:
# v1.3.1
- uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be
# Some of our services need a lot of free disk. We run this action to
# free up some disk space, however it is slow, so we conditionally do
# this only on those services that need it.
if: matrix.service == 'opensearch' || matrix.service == 'dynamodb'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great 👏

- uses: actions/checkout@v3
- name: Install dependencies
run: sudo apt-get update
Expand Down
2 changes: 1 addition & 1 deletion Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ tasks:
- buildkitd.toml
status:
# Exits zero (up to date) if there is already a builder.
- docker buildx ls | grep -q '^{{.BUILDX_BUILDER}}\s'
- docker buildx ls | grep -q '^{{.BUILDX_BUILDER}}'
cmds:
- docker buildx create
--name "{{.BUILDX_BUILDER}}"
Expand Down
2 changes: 1 addition & 1 deletion scripts/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function getTags() {
perl -pe 's/;SharedTags:/,/g;' -e 's/;/\n/g' |
sort |
sed 's/^.*Tags: //g' |
grep -v -e alpine -e slim -e onbuild -e windows -e wheezy -e nanoserver -e alpha -e beta |
grep -v -e alpine -e slim -e onbuild -e windows -e wheezy -e nanoserver -e alpha -e beta -e 'ubi[0-9]' |
${filter} |
sed 's/, /,/g'
done
Expand Down
18 changes: 12 additions & 6 deletions scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,23 @@ healthcheck() {
}

for x in "$servicedir"/*/NAME; do
tag=$(basename "$(dirname "$x")")
dirname=$(dirname "$x")
tag=$(basename "$dirname")
image=$NAMESPACE/$NAME:$tag
container=$(docker create "$image")
trap - EXIT
trap 'docker rm -f "$container" >/dev/null' EXIT
docker start "$container" >/dev/null
if [[ $(docker inspect "$image" --format '{{.Config.Healthcheck}}') = "<nil>" ]]; then
echo "$image SKIPPED"
continue
fi
platform=$(cat "$dirname/PLATFORM")
container=$(docker run --rm --detach --platform "$platform" "$image")
if ! healthcheck "$container"; then
echo
docker logs --follow -n 5 "$container" &
docker stop "$container" >/dev/null
echo "$image FAILED"
exit 1
else
docker stop "$container" >/dev/null
echo "$image PASSED"
fi
docker rm -f "$container" >/dev/null
done
4 changes: 3 additions & 1 deletion services/couchdb/Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
HEALTHCHECK CMD /bin/nc -z 127.0.0.1 5984
ENV COUCHDB_USER=tugboat \
COUCHDB_PASSWORD=tugboat
HEALTHCHECK CMD /bin/nc -z 127.0.0.1 5984
2 changes: 2 additions & 0 deletions services/percona/manifest
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
NAME=percona
FROM=percona
TEMPLATE=yum
# Filter out centos 5.6 and percona with mongodb.
FILTER="grep -v -e 5.6-centos -e psmdb"
2 changes: 1 addition & 1 deletion services/varnish/Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
HEALTHCHECK CMD /usr/bin/varnishadm status
HEALTHCHECK CMD /usr/bin/varnishadm status || /usr/local/bin/varnishadm status
Loading