Closed peshay closed 6 years ago
I want to configure with environment variables also the ownAddress and ownPort for the Agent. In order to achieve that, I patched the run-agent.sh
--- run-agent.sh 2018-02-02 13:11:49.000000000 +0100 +++ run-agent.sh 2018-02-02 13:10:44.000000000 +0100 @@ -19,6 +19,8 @@ [[ -n "${SERVER_URL}" ]] && opts[${#opts[@]}]='--server-url' && opts[${#opts[@]}]="$SERVER_URL" [[ -n "${AGENT_TOKEN}" ]] && opts[${#opts[@]}]='--auth-token' && opts[${#opts[@]}]="$AGENT_TOKEN" [[ -n "${AGENT_NAME}" ]] && opts[${#opts[@]}]='--name' && opts[${#opts[@]}]="$AGENT_NAME" + [[ -n "${OWN_ADDRESS}" ]] && opts[${#opts[@]}]='--ownAddress' && opts[${#opts[@]}]="$OWN_ADDRESS" + [[ -n "${OWN_PORT}" ]] && opts[${#opts[@]}]='--ownPort' && opts[${#opts[@]}]="$OWN_PORT" if [[ 0 -ne "${#opts[@]}" ]]; then # Using sed to strip double quotes produced by docker-compose for i in $(seq 0 $(expr ${#opts[@]} - 1)); do
Merged https://github.com/JetBrains/teamcity-docker-minimal-agent/pull/20
I want to configure with environment variables also the ownAddress and ownPort for the Agent. In order to achieve that, I patched the run-agent.sh