Deploy with attribute
See original GitHub issueTo deploy with pure command line argument is not convenient. I think we should have ability to just specified attribute to function we want to deployed and deploy command would just use reflection to specified other arguments
Instead of
gcloud functions deploy configuration-example \
--runtime dotnet3 \
--trigger-http \
--allow-unauthenticated \
--entry-point Google.Cloud.Functions.Examples.Configuration.Function
I wish we could just
namespace Google.Cloud.Functions.Examples.Configuration
{
public class Function : IHttpFunction
{
private readonly DatabaseService _database;
public Function(DatabaseService database) =>
_database = database;
[HttpTrigger("configuration-example",null,null)] // member and role as last two argument, be null for --allow-unauthenticated
public async Task HandleAsync(HttpContext context)
{
await context.Response.WriteAsync($"Retrieving data from instance '{_database.Instance}', database '{_database.Database}'");
}
}
}
then
gcloud functions deploy --runtime dotnet3 \
--entry-point Google.Cloud.Functions.Examples.Configuration.Function
And we could just drop entry point to deploy the whole file with every function specified in that file
gcloud functions deploy --runtime dotnet3
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Deployment attribute groups and situations
You can use these attribute groups to create situations that notify you in the event of a failure or exceptional circumstance related to...
Read more >Stack Configuration and Deployment Attributes
The stack configuration and deployment attributes are installed on every instance and can be accessed by recipes.
Read more >Force attribute to deploy
The attribute to be forced in the deployment. Both parameters must be typed within double quotation marks. DO NOT use variables as parameters....
Read more >How to Use the autoDeploy Attribute in Apache Tomcat ...
How to Use the autoDeploy Attribute in Apache Tomcat (Windows) · Open a text editor session on CATALINA_BASE/conf/server.xml ,e.g., c:/Tomcat8/conf/server.xml .
Read more >App manifest attribute reference
This topic describes manifest formatting and provides a list of attributes available for app manifests. You can use it with Deploying with app ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I think it would be clearer to rewrite it in a non-dotnet-specific way to start with. Bear in mind that many of the readers of issues in that repo won’t have any .NET experience, so may not understand the example… whereas if you write it up in a technology-neutral way, I think it will be a far better feature request.
(Sorry, the reopening was inadvertent - I still believe that raising an issue in https://github.com/GoogleCloudPlatform/functions-framework is a better approach.)