@VisibleForTesting
  String makeUserAgent() {
    if (!JibSystemProperties.isUserAgentEnabled()) {
      return "";
    }

    StringBuilder userAgentBuilder = new StringBuilder("jib");
    userAgentBuilder.append(" ").append(toolVersion);
    userAgentBuilder.append(" ").append(toolName);
    if (!Strings.isNullOrEmpty(System.getProperty(JibSystemProperties.UPSTREAM_CLIENT))) {
      userAgentBuilder.append(" ").append(System.getProperty(JibSystemProperties.UPSTREAM_CLIENT));
    }
    return userAgentBuilder.toString();
  }
The {@code User-Agent} is in the form of {@code jib <toolVersion> <toolName>}. For example:
{@code jib 0.9.0 jib-maven-plugin}.

@return the {@code User-Agent} header to send. The {@code User-Agent} can be disabled by
    setting the system property variable {@code _JIB_DISABLE_USER_AGENT} to any non-empty
    string.
jib-core/src/main/java/com/google/cloud/tools/jib/configuration/BuildContext.java