updated teamcity.sh
31446f4f
Hari Sekhon
committed
1 changed file
teamcity.sh
/teamcity/teamcity.sh-13+5
/teamcity/teamcity.sh
Add comment 33 - authorizes the agent(s) to begin building
Add comment 34 - waits for you to accept the EULA
Add comment 35 - prints the TeamCity URL
Add comment 36 Minus   - opens the TeamCity web UI (on Mac only)
Add comment 36 Plus   - opens the TeamCity web UI
Add comment 37
Add comment 38 - creates an administator-level user (\$TEAMCITY_USER, / \$TEAMCITY_PASSWORD - defaults to admin / admin)
Add comment 39 - 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
Add comment 40 Minus   - opens the TeamCity web UI login page in browser (on Mac only)
Add comment 40 Plus   - opens the TeamCity web UI login page in browser
Add comment 41
Add comment 42 - creates a GitHub OAuth connection if credentials are available (\$TEAMCITY_GITHUB_CLIENT_ID and \$TEAMCITY_GITHUB_CLIENT_SECRET)
Add comment 43 - 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
Add comment 55
Add comment 56 ${0##*/} down
Add comment 57
Add comment 58 Minus   ${0##*/} ui - prints the TeamCity Server URL and on Mac automatically opens in browser
Add comment 58 Plus   ${0##*/} ui - prints the TeamCity Server URL and automatically opens in browser
Add comment 59
Add comment 60
Add comment 61 Idempotent, you can re-run this and continue from any stage
Add comment 133 exec "${BASH_SOURCE[0]}" up
Add comment 134 elif [ "$action" = ui ]; then
Add comment 135 echo "TeamCity Server URL: $TEAMCITY_URL"
Add comment 136 Minus   if is_mac; then
Add comment 137 136 open "$TEAMCITY_URL"
Add comment 138 Minus   fi
Add comment 139 137 exit 0
Add comment 140 138 else
Add comment 141 139 docker-compose "$action" "$@"
Add comment 163 161 timestamp "TeamCity Server URL: $TEAMCITY_URL"
Add comment 164 162 echo
Add comment 165 163 if is_setup_in_progress; then
Add comment 166 Minus   timestamp "Open TeamCity Server URL in web browser to continue, click proceed, accept EULA etc.."
Add comment 167 Minus   echo
Add comment 168 Minus   if is_mac; then
Add comment 169 Minus   timestamp "detected running on Mac, opening TeamCity Server URL for you automatically"
Add comment 164 Plus   timestamp "Opening TeamCity Server URL in web browser to continue, click proceed, accept EULA etc.."
Add comment 170 165 echo
Add comment 171 166 open "$TEAMCITY_URL"
Add comment 172 167 fi
Add comment 173 Minus  fi
Add comment 174 168
Add comment 175 169 # 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
Add comment 176 170 # now download and start the agent(s) while the server is booting
Add comment 316 310 login_url="$TEAMCITY_URL/login.html"
Add comment 317 311 echo "$login_url"
Add comment 318 312 echo
Add comment 319 Minus   if is_mac; then
Add comment 320 Minus   timestamp "detected running on Mac, opening TeamCity Server URL for you automatically"
Add comment 313 Plus   timestamp "Ppening TeamCity Server URL"
Add comment 321 314 open "$login_url"
Add comment 322 315 echo
Add comment 323 Minus   fi
Add comment 324 316 echo
Add comment 325 317 fi
Add comment 326 318