mockbuild: don't build repository when it already exists
This avoids doing unnecessary work and speeds up restarting tests.
This commit is contained in:
parent
2ac9a5b73c
commit
acfc50788a
1 changed files with 6 additions and 0 deletions
|
|
@ -57,6 +57,12 @@ REPO_DIR=repo/${REPO_PATH}
|
|||
# Full URL to the RPM repository after they are uploaded.
|
||||
REPO_URL=${MOCK_REPO_BASE_URL}/${REPO_PATH}
|
||||
|
||||
# Don't rerun the build if it already exists
|
||||
if curl --silent --fail --head --output /dev/null "${REPO_URL}/repodata/repomd.xml"; then
|
||||
greenprint "🎁 Repository already exists. Exiting."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Print some data.
|
||||
greenprint "🧬 Using mock config: ${MOCK_CONFIG}"
|
||||
greenprint "📦 Git SHA: ${GIT_SHA}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue