Intent.SoftwareFactory.CLI.Nightly
4.2.999-nightly.2024-06-12-0102
See the version list below for details.
dotnet tool install --global Intent.SoftwareFactory.CLI.Nightly --version 4.2.999-nightly.2024-06-12-0102
dotnet new tool-manifest # if you are setting up this repo dotnet tool install --local Intent.SoftwareFactory.CLI.Nightly --version 4.2.999-nightly.2024-06-12-0102
#tool dotnet:?package=Intent.SoftwareFactory.CLI.Nightly&version=4.2.999-nightly.2024-06-12-0102&prerelease
nuke :add-package Intent.SoftwareFactory.CLI.Nightly --version 4.2.999-nightly.2024-06-12-0102
Software Factory CLI
A CLI (command line interface) version of the Intent Architect Software Factory.
Pre-requisites
Latest Long Term Support (LTS) version of .NET.
Installation
This CLI tool is available as a .NET Tool and can be installed with the following command:
dotnet tool install Intent.SoftwareFactory.CLI --global
[!NOTE] If
dotnet tool install
fails with an error to the effect ofThe required NuGet feed can't be accessed, perhaps because of an Internet connection problem.
and it shows a private NuGet feed URL, you can try add the--ignore-failed-sources
command line option (source).
You should see output to the effect of:
You can invoke the tool using the following command: intent-cli
Tool 'intent.softwarefactory.cli' (version 'x.x.x') was successfully installed.
Usage
intent-cli [command] [options]
Options
Option | Description |
---|---|
--version |
Show version information |
-?, -h, --help |
Show help and usage information |
--error-logging-command <error-logging-command> |
Command to use for logging an error. Some continuous integration environments watch output for "commands" for logging of errors. Will be automatically configured when the process is detected to be running on the following kinds of build servers:<br />- Azure Pipelines<br /><br />See the documentation on Serilog.Expressions ExpressionTemplate for formatting options: https://github.com/serilog/serilog-expressions#formatting-with-expressiontemplate |
--warning-logging-command <warning-logging-command> |
Command to use for logging a warning. Some continuous integration environments watch output for "commands" for logging of errors. Will be automatically configured when the process is detected to be running on the following kinds of build servers:<br />- Azure Pipelines<br /><br />See the documentation on Serilog.Expressions ExpressionTemplate for formatting options: https://github.com/serilog/serilog-expressions#formatting-with-expressiontemplate |
Commands
Command | Description |
---|---|
ensure-no-outstanding-changes <username> <password> <isln-path> |
Runs the Software Factory and if there are any outstanding changes it prints out an error and exits with a non-zero return code. |
ensure-no-outstanding-changes command
Runs the Software Factory and if there are any outstanding changes it prints out an error and exits with a non-zero return code.
ensure-no-outstanding-changes usage
intent-cli ensure-no-outstanding-changes <username> <password> <isln-path> [options]
ensure-no-outstanding-changes arguments
Argument | Description |
---|---|
<username> |
Username for an active Intent Architect account. |
<password> |
Password for the Intent Architect account. |
<isln-path> |
Path to the Intent Architect solution (.isln) file or folder containing a single .isln file. |
ensure-no-outstanding-changes options
Option | Description |
---|---|
--application-id <application-id> |
The Id of the Intent Architect application. If unspecified then all applications found in the .isln will be run. |
--attach-debugger |
The Software Factory will pause at startup giving you chance to attach a .NET debugger. |
-?, -h, --help |
Show help and usage information |
--error-logging-command <error-logging-command> |
Command to use for logging an error. Some continuous integration environments watch output for "commands" for logging of errors. Will be automatically configured when the process is detected to be running on the following kinds of build servers:<br />- Azure Pipelines<br /><br />See the documentation on Serilog.Expressions ExpressionTemplate for formatting options: https://github.com/serilog/serilog-expressions#formatting-with-expressiontemplate |
--warning-logging-command <warning-logging-command> |
Command to use for logging a warning. Some continuous integration environments watch output for "commands" for logging of errors. Will be automatically configured when the process is detected to be running on the following kinds of build servers:<br />- Azure Pipelines<br /><br />See the documentation on Serilog.Expressions ExpressionTemplate for formatting options: https://github.com/serilog/serilog-expressions#formatting-with-expressiontemplate |
Example: Azure Pipelines
[!TIP] Install the
Intent.ContinuousIntegration.AzurePipelines
module into your Intent Architect application to have it automatically generate anazure-pipelines.yml
file for you, refer its readme for more information.
Create a variable group with the Intent Architect account details
Create a variable group with the Intent Architect account details, for example:
Link the variable group to the pipeline you want to use it in
Variable groups are defined globally for an Azure DevOps project, to be able to access a variable group for a particular pipeline, it needs to be linked to it.
Add the variable group and other variables to the pipeline YAML file
To make the variable group available to a stage within your pipeline, it will need to be added to its variables. You may also want to define variables for the other command line arguments and options:
variables:
- group: 'Intent Architect Credentials'
- name: 'intentSolutionPath'
value: 'intent'
Create a step to install the CLI
- task: PowerShell@2
displayName: 'Install Intent Architect Software Factory CLI'
inputs:
targetType: 'inline'
pwsh: true
script: 'dotnet tool install Intent.SoftwareFactory.CLI --global'
Create a step to run the CLI
- task: PowerShell@2
displayName: 'run intent cli'
env:
INTENT_USER: $(intent-architect-user)
INTENT_PASS: $(intent-architect-password)
INTENT_SOLUTION_PATH: $(intentSolutionPath)
inputs:
targetType: 'inline'
pwsh: true
script: |
intent-cli ensure-no-outstanding-changes "$Env:INTENT_USER" "$Env:INTENT_PASS" "$Env:INTENT_SOLUTION_PATH"
A complete YAML file
trigger:
batch: 'true'
branches:
include:
- '*'
pool:
vmImage: 'ubuntu-latest'
variables:
- group: 'Intent Architect Credentials'
- name: 'intentSolutionPath'
value: 'intent'
steps:
- task: PowerShell@2
displayName: 'Install Intent Architect Software Factory CLI'
inputs:
targetType: 'inline'
pwsh: true
script: 'dotnet tool install Intent.SoftwareFactory.CLI --global'
- task: PowerShell@2
displayName: 'run intent cli'
env:
INTENT_USER: $(intent-architect-user)
INTENT_PASS: $(intent-architect-password)
INTENT_SOLUTION_PATH: $(intentSolutionPath)
inputs:
targetType: 'inline'
pwsh: true
script: |
intent-cli ensure-no-outstanding-changes "$Env:INTENT_USER" "$Env:INTENT_PASS" "$Env:INTENT_SOLUTION_PATH"
Run the pipeline
When you run the pipeline, it should now install the CLI and run it.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
This package has no dependencies.