in function-maven-plugin/src/main/java/com/google/cloud/functions/plugin/DeployFunction.java [293:375]
public List<String> getCommands() {
List<String> commands = new ArrayList<>();
commands.add("functions");
commands.add("deploy");
commands.add(name);
if (gen2) {
commands.add("--gen2");
}
if (region != null) {
commands.add("--region=" + region);
}
if (triggerResource == null && triggerTopic == null && triggerEvent == null) {
commands.add("--trigger-http");
}
if (triggerResource != null) {
commands.add("--trigger-resource=" + triggerResource);
}
if (triggerTopic != null) {
commands.add("--trigger-topic=" + triggerTopic);
}
if (triggerEvent != null) {
commands.add("--trigger-event=" + triggerEvent);
}
if (allowUnauthenticated) {
commands.add("--allow-unauthenticated");
}
if (functionTarget != null) {
commands.add("--entry-point=" + functionTarget);
}
if (ignoreFile != null) {
commands.add("--ignore-file=" + ignoreFile);
}
if (memory != null) {
commands.add("--memory=" + memory);
}
if (retry != null) {
commands.add("--retry=" + retry);
}
if (serviceAccount != null) {
commands.add("--service-account=" + serviceAccount);
}
if (source != null) {
commands.add("--source=" + source);
}
if (stageBucket != null) {
commands.add("--stage-bucket=" + stageBucket);
}
if (timeout != null) {
commands.add("--timeout=" + timeout);
}
if (updateLabels != null && !updateLabels.isEmpty()) {
commands.add("--update-labels=" + String.join(",", updateLabels));
}
if (vpcConnector != null) {
commands.add("--vpc-connector=" + vpcConnector);
}
if (maxInstances != null) {
commands.add("--max-instances=" + maxInstances);
}
if (hasEnvVariables()) {
Joiner.MapJoiner mapJoiner = Joiner.on(",").withKeyValueSeparator("=");
commands.add("--set-env-vars=" + mapJoiner.join(environmentVariables));
}
if (envVarsFile != null) {
commands.add("--env-vars-file=" + envVarsFile);
}
if (hasBuildEnvVariables()) {
Joiner.MapJoiner mapJoiner = Joiner.on(",").withKeyValueSeparator("=");
commands.add("--set-build-env-vars=" + mapJoiner.join(buildEnvironmentVariables));
}
if (buildEnvVarsFile != null) {
commands.add("--build-env-vars-file=" + buildEnvVarsFile);
}
commands.add("--runtime=" + runtime);
if (projectId != null) {
commands.add("--project=" + projectId);
}
return Collections.unmodifiableList(commands);
}