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

handle docker-compose v2, free up more space #3809

Merged
merged 22 commits into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from 18 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
2 changes: 2 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ jobs:
# Related to https://github.com/sigstore/cosign/issues/3149
- name: free up disk space
run: |
rm -rf /opt/hostedtoolcache/CodeQL
rm -rf /usr/share/dotnet/
rm -rf "$AGENT_TOOLSDIRECTORY"
rm -rf "/usr/local/share/boost"
Expand Down Expand Up @@ -135,6 +136,7 @@ jobs:
php-igbinary php-memcache php-memcached php-mongodb php-redis php-xdebug \
php-zmq snmp pollinate libpq-dev postgresql-client powershell ruby-full \
sphinxsearch subversion mongodb-org -yq >/dev/null 2>&1 || true
apt-get remove -y '^llvm.*' || true
apt-get remove -y 'php.*' || true
apt-get autoremove -y >/dev/null 2>&1 || true
apt-get autoclean -y >/dev/null 2>&1 || true
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/validate-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ jobs:
# Related to https://github.com/sigstore/cosign/issues/3149
- name: free up disk space for the release
run: |
rm -rf /usr/lib/google-cloud-sdk
rm -rf /opt/hostedtoolcache/CodeQL
rm -rf /usr/share/dotnet/
rm -rf "$AGENT_TOOLSDIRECTORY"
rm -rf "/usr/local/share/boost"
Expand Down Expand Up @@ -108,6 +110,8 @@ jobs:
php-zmq snmp pollinate libpq-dev postgresql-client powershell ruby-full \
sphinxsearch subversion mongodb-org -yq >/dev/null 2>&1 || true
apt-get remove -y 'php.*' || true
cd /usr/lib && du -sch * .[!.]* | sort -rh
cd /usr/lib/local && du -sch * .[!.]* | sort -rh
apt-get autoremove -y >/dev/null 2>&1 || true
apt-get autoclean -y >/dev/null 2>&1 || true
- name: check disk space
Expand Down
16 changes: 13 additions & 3 deletions test/e2e_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@

set -ex

docker_compose="docker compose"
if ! ${docker_compose} version >/dev/null 2>&1; then
docker_compose="docker-compose"
fi

echo "setting up OIDC provider"
pushd ./test/fakeoidc
oidcimg=$(ko build main.go --local)
Expand Down Expand Up @@ -59,10 +64,15 @@ export FULCIO_METRICS_PORT=2113
export FULCIO_CONFIG=/tmp/fulcio-config.json
for repo in rekor fulcio; do
pushd $repo
docker-compose up -d
if [ "$repo" == "fulcio" ]; then
yq -i e '.networks={"fulcio_default":{ "name":"fulcio_default","external":true }}' docker-compose.yml
yq -i e '.services.fulcio-server.networks=["fulcio_default"]' docker-compose.yml
tail docker-compose.yml
fi
${docker_compose} up -d
echo -n "waiting up to 60 sec for system to start"
count=0
until [ $(docker-compose ps | grep -c "(healthy)") == 3 ];
until [ $(${docker_compose} ps | grep -c "(healthy)") == 3 ];
do
if [ $count -eq 6 ]; then
echo "! timeout reached"
Expand All @@ -80,7 +90,7 @@ cleanup_services() {
cleanup_oidc
for repo in rekor fulcio; do
pushd $HOME/$repo
docker-compose down
${docker_compose} down
popd
done
}
Expand Down
Loading