updated teamcity.sh

pull/16/head
Hari Sekhon 7 months ago
parent 34a53caed3
commit 31446f4f5f

@ -33,11 +33,11 @@ Boots TeamCity CI cluster with server and agent(s) in Docker, and builds the cur
- authorizes the agent(s) to begin building - authorizes the agent(s) to begin building
- waits for you to accept the EULA - waits for you to accept the EULA
- prints the TeamCity URL - prints the TeamCity URL
- opens the TeamCity web UI (on Mac only) - opens the TeamCity web UI
- creates an administator-level user (\$TEAMCITY_USER, / \$TEAMCITY_PASSWORD - defaults to admin / admin) - creates an administator-level user (\$TEAMCITY_USER, / \$TEAMCITY_PASSWORD - defaults to admin / admin)
- sets the full name, email, and VCS commit username to Git's user.name and user.email if configured for TeamCity to Git VCS tracking integration - sets the full name, email, and VCS commit username to Git's user.name and user.email if configured for TeamCity to Git VCS tracking integration
- opens the TeamCity web UI login page in browser (on Mac only) - opens the TeamCity web UI login page in browser
- creates a GitHub OAuth connection if credentials are available (\$TEAMCITY_GITHUB_CLIENT_ID and \$TEAMCITY_GITHUB_CLIENT_SECRET) - creates a GitHub OAuth connection if credentials are available (\$TEAMCITY_GITHUB_CLIENT_ID and \$TEAMCITY_GITHUB_CLIENT_SECRET)
- this saves you having to use your own username and password for the GitHub VCS such as the config repo - just click the GitHub icon next to the VCS url to auto-authenticate - this saves you having to use your own username and password for the GitHub VCS such as the config repo - just click the GitHub icon next to the VCS url to auto-authenticate
@ -55,7 +55,7 @@ Usage:
${0##*/} down ${0##*/} down
${0##*/} ui - prints the TeamCity Server URL and on Mac automatically opens in browser ${0##*/} ui - prints the TeamCity Server URL and automatically opens in browser
Idempotent, you can re-run this and continue from any stage Idempotent, you can re-run this and continue from any stage
@ -133,9 +133,7 @@ elif [ "$action" = restart ]; then
exec "${BASH_SOURCE[0]}" up exec "${BASH_SOURCE[0]}" up
elif [ "$action" = ui ]; then elif [ "$action" = ui ]; then
echo "TeamCity Server URL: $TEAMCITY_URL" echo "TeamCity Server URL: $TEAMCITY_URL"
if is_mac; then open "$TEAMCITY_URL"
open "$TEAMCITY_URL"
fi
exit 0 exit 0
else else
docker-compose "$action" "$@" docker-compose "$action" "$@"
@ -163,13 +161,9 @@ is_setup_in_progress(){
timestamp "TeamCity Server URL: $TEAMCITY_URL" timestamp "TeamCity Server URL: $TEAMCITY_URL"
echo echo
if is_setup_in_progress; then if is_setup_in_progress; then
timestamp "Open TeamCity Server URL in web browser to continue, click proceed, accept EULA etc.." timestamp "Opening TeamCity Server URL in web browser to continue, click proceed, accept EULA etc.."
echo echo
if is_mac; then open "$TEAMCITY_URL"
timestamp "detected running on Mac, opening TeamCity Server URL for you automatically"
echo
open "$TEAMCITY_URL"
fi
fi fi
# too late, agent won't arrive in the unauthorized list in time to be found and authorized before this script exits, agents must boot in parallel with server not later # too late, agent won't arrive in the unauthorized list in time to be found and authorized before this script exits, agents must boot in parallel with server not later
@ -316,11 +310,9 @@ if [ "$user_already_exists" = 0 ]; then
login_url="$TEAMCITY_URL/login.html" login_url="$TEAMCITY_URL/login.html"
echo "$login_url" echo "$login_url"
echo echo
if is_mac; then timestamp "Ppening TeamCity Server URL"
timestamp "detected running on Mac, opening TeamCity Server URL for you automatically" open "$login_url"
open "$login_url" echo
echo
fi
echo echo
fi fi

Loading…
Cancel
Save