-
Notifications
You must be signed in to change notification settings - Fork 456
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
Check whether or not jenkins folder exists in backport branches #9280
Conversation
echo "Commiting" | ||
git add $BUILDKITE_FOLDER_PATH | ||
if [ -d "${JENKINS_FOLDER_PATH}" ]; then | ||
git add $JENKINS_FOLDER_PATH | ||
fi | ||
git add $PACKAGES_FOLDER_PATH/ | ||
git status | ||
|
||
files_cached_num=$(git diff --name-only --cached | wc -l) | ||
if [ "${files_cached_num}" -gt 0 ]; then | ||
git commit -m "Add $BUILDKITE_FOLDER_PATH and $JENKINS_FOLDER_PATH to backport branch: $BACKPORT_BRANCH_NAME from the $SOURCE_BRANCH branch" | ||
else | ||
echo "Nothing to commit, skip." | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Run these steps also in DRY_RUN=true mode.
if [ "${DRY_RUN}" == "true" ]; then | ||
MSG="[DRY_RUN] ${MSG}." | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add DRY_RUN tag to avoid misunderstandings.
💔 Build Failed
Failed CI StepsHistorycc @mrodm |
🚀 Benchmarks reportTo see the full report comment with |
Quality Gate passedKudos, no new issues were introduced! 0 New issues |
Add safeguards when running backport branches pipeline, to avoid errors if ".ci" (jenkins folder) does not exist or if there are no changes in the stage.
Proposed commit message
Do not run
git add
command if the.ci
folder does not exist (Jenkins folder)