Description
Is your feature request related to a problem? Please describe.
My application projects have a "Publish Profile" generated by Visual Studio 2019. These files can be used with the dotnet publish
command to deploy production-ready executables to the configured target (local folder, IIS, Azure, etc.). I would like to execute this command through Nx to enable a CI/CD workflow that includes nx affected --target=deploy
.
Describe the solution you'd like
A new executor that simply wraps the dotnet publish
command will be sufficient for the desired workflow. It should be very similar to the existing build
executor. It should also be able to pull configuration from the environment, such as deployment credentials.
Describe alternatives you've considered
The Nx run-commands
executor allows for the basic construction of the dotnet publish
command, but the variability of the arguments was too much to encode into the workspace.json
file.
Additional context
I have previously worked on a similar feature for my workspace's private use. Deployment secrets were handled by allowing shell syntax in the executor's configuration, and then using environment variables as the properties' values. For example,
"options": {
"PublishProfile": "MyPublishProfile",
"UserName": "%MY_USR%",
"Password": "%MY_PSW%"
}
In general, there may be more than one Publish Profile, and deployment credentials may be needed to connect to a remote machine.