diff --git a/schutzbot/Jenkinsfile b/schutzbot/Jenkinsfile index 78a7cbda4..b893dcf35 100644 --- a/schutzbot/Jenkinsfile +++ b/schutzbot/Jenkinsfile @@ -84,6 +84,7 @@ pipeline { AWS_CREDS = credentials('aws-credentials-osbuildci') } steps { + sh "schutzbot/ci_details.sh" sh "schutzbot/mockbuild.sh" stash ( includes: 'osbuild-mock.repo', diff --git a/schutzbot/ci_details.sh b/schutzbot/ci_details.sh index b8d10f188..28879ef86 100755 --- a/schutzbot/ci_details.sh +++ b/schutzbot/ci_details.sh @@ -30,3 +30,13 @@ echo -e "\033[0m" echo "List of installed packages:" rpm -qa | sort echo "------------------------------------------------------------------------------" + +# Ensure cloud-init has completely finished on the instance. This ensures that +# the instance is fully ready to go. +while true; do + if [[ -f /var/lib/cloud/instance/boot-finished ]]; then + break + fi + echo -e "\n🤔 Waiting for cloud-init to finish running..." + sleep 5 +done