Skip to content

Commit f3a43ca

Browse files
committed
USERNAME/PASSWORD env vars can be set now for createJenkinsJobForIssue.sh
1 parent 36e86f6 commit f3a43ca

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,12 @@ OS_FOR_GSED="darwin"
2121
echo "Trying to obtain bug summary/title from Github..."
2222
BUG_SUMMARY="$( curl -s -H 'Accept: application/vnd.github+json' https://api.github.com/repos/eclipse-sailing-analytics/sailing-analytics/issues/${BUG_ID} | jq -r '.title' )"
2323
echo "Found: ${BUG_SUMMARY}"
24-
read -p "Jenkins Username: " USERNAME
25-
read -s -p "Jenkins Password: " PASSWORD
24+
if [ -z "${USERNAME}" ]; then
25+
read -p "Jenkins Username (e-mail): " USERNAME
26+
fi
27+
if [ -z "${PASSWORD}" ]; then
28+
read -s -p "Jenkins Password (API Token): " PASSWORD
29+
fi
2630
echo
2731
COPY_TEMPLATE_CONFIG_URL="$JENKINS_BASE_URL/job/$COPY_TEMPLATE_JOB/config.xml"
2832
curl -s -X GET $COPY_TEMPLATE_CONFIG_URL -u "$USERNAME:$PASSWORD" -o "$CONFIGFILE"

0 commit comments

Comments
 (0)