File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
function-maven-plugin/src/main/java/com/google/cloud/functions/plugin Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -212,7 +212,12 @@ public class DeployFunction extends CloudSdkMojo {
212212 */
213213 @ Parameter (alias = "deploy.buildenvvarsfile" , property = "function.deploy.buildenvvarsfile" )
214214 String buildEnvVarsFile ;
215-
215+ /**
216+ * If true, deploys the function in the 2nd Generation Environment.
217+ */
218+ @ Parameter (alias = "deploy.gen2" , property = "function.deploy.gen2" , defaultValue = "false" )
219+ boolean gen2 ;
220+
216221 boolean hasEnvVariables () {
217222 return (this .environmentVariables != null && !this .environmentVariables .isEmpty ());
218223 }
@@ -287,6 +292,9 @@ public List<String> getCommands() {
287292 commands .add ("functions" );
288293 commands .add ("deploy" );
289294 commands .add (name );
295+ if (gen2 ) {
296+ commands .add ("--gen2" );
297+ }
290298 if (region != null ) {
291299 commands .add ("--region=" + region );
292300 }
You can’t perform that action at this time.
0 commit comments