Skip to content

Fix for pipeline updates #230

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
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
18 changes: 8 additions & 10 deletions staging.kernelci.org
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,6 @@ docker_workaround() {
cmd_api_pipeline() {
compose_files="\
-f docker-compose.yaml \
-f docker-compose-kcidb.yaml \
-f docker-compose-lava.yaml \
-f docker-compose-production.yaml \
"
api_services="api db redis"
Expand All @@ -157,16 +155,16 @@ cmd_api_pipeline() {
git fetch origin
git checkout origin/staging.kernelci.org
echo "Pulling pipeline containers"
docker-compose $compose_files pull
docker compose $compose_files pull
set +e
docker-compose $compose_files down --remove-orphans
docker compose $compose_files down --remove-orphans
# verify if it failed due orphaned network bug
if [ $? -ne 0 ]; then
echo "Failed to stop pipeline containers, restarting containerd and docker"
docker_workaround
echo "Attempting to restart pipeline containers again"
set -e
docker-compose $compose_files down --remove-orphans
docker compose $compose_files down --remove-orphans
fi
set -e
cd -
Expand All @@ -177,28 +175,28 @@ cmd_api_pipeline() {
git prune
git fetch origin
git checkout origin/staging.kernelci.org
docker-compose pull $api_services
docker compose pull $api_services
echo "Stopping API containers"
set +e
docker-compose down
docker compose down
# verify if it failed due orphaned network bug
if [ $? -ne 0 ]; then
echo "Failed to stop API containers, restarting containerd and docker"
docker_workaround
echo "Attempting to restart API containers again"
set -e
docker-compose down
docker compose down
fi
set -e
echo "Starting API containers"
docker-compose up -d $api_services
docker compose up -d $api_services
cd -

cd checkout/kernelci-pipeline
#REQUIREMENTS=requirements-dev.txt docker-compose $compose_files build --no-cache
echo "Starting pipeline containers"
SETTINGS=/home/kernelci/config/staging.kernelci.org.secrets.toml \
docker-compose $compose_files up -d
docker compose $compose_files up -d
cd -
}

Expand Down