.NET and .NET Core
Prerequisites
Eligible images
|
Build, run tests, and publish in a .NET Core desktop project
Currently, Space Automation does not provide any special API for working with .NET projects. This means, that you should run .NET Core builds by using the dotnet
driver directly inside shell scripts.
The content of .space.kts
might look like follows:
In more details:
env["FEED_URL"]
: specifies a NuGet feed for publishing.dotnet build
anddotnet test
: runs build and tests correspondingly../publish.sh
: runs the publishing script. See details below.
The publish.sh
script authenticates Automation in the NuGet feed and publishes the NuGet package:
In more details:
$FEED_URL
: specifies feed URL using the environment variable set in .space.kts.$JB_SPACE_CLIENT_ID
and$JB_SPACE_CLIENT_SECRET
: environment variables that authenticate the Automation service in Space Packages.VERSION="1.0.$JB_SPACE_EXECUTION_NUMBER"
: uses the$JB_SPACE_EXECUTION_NUMBER
to specify the package version based on the script run number.