Skip to content

Commit 235ac8e

Browse files
committed
Don't fail when artifactory encrypt is not set
1 parent 807cfbc commit 235ac8e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Jenkinsfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,11 @@ spec:
210210
set -x
211211
set -e
212212
213+
if [[ -z "$GIT_AUTH_USER" ]] || [[ -z "$GIT_AUTH_PWD" ]]; then
214+
echo "Git credentials not found. Store your git credentials in a secret named 'git-credentials'."
215+
exit 1
216+
fi
217+
213218
git config --local credential.helper "!f() { echo username=\\$GIT_AUTH_USER; echo password=\\$GIT_AUTH_PWD; }; f"
214219
215220
git fetch origin ${BRANCH}
@@ -374,7 +379,7 @@ spec:
374379
375380
if [[ -z "${ARTIFACTORY_ENCRYPT}" ]]; then
376381
echo "Encrption key not available for Jenkins pipeline, please add it to the artifactory-access"
377-
exit 1
382+
exit 0
378383
fi
379384
380385
# Check if a Generic Local Repo has been created and retrieve the URL for it

0 commit comments

Comments
 (0)