SeaLights .NET Core agent is integrated into the Cloud Foundry .NET core buildpack. So you can use it in your application by performing the following simple steps:
Create SeaLights service configuration
Push an application
Bind an application with the service
Restage an application
Create Service Configuration
To manage application integrations with third-party services Cloud Foundry has the mechanism of the User-Provided Services. So the first step is to create such a service with the configuration.
Here is the command “create-user-provided-service“ that does that:
Code Block |
---|
cf cups sealights -p '{"token":"ey…", "bsId":"as…"}' |
Info |
---|
Note: you have to escape |
...
Code Block |
---|
so that the command will look like this: |
...
|
You will be able to change the parameters later with the command “update-user-provided-service”. See below the complete list of the available parameters.
Push an application
You can push an application as usual with the command “push” just taking into account that to perform the testListener
phase in the CloudFoundry container you have to publish an application unit tests
Code Block |
---|
cf push |
...
Info |
---|
You can use a manifest.yml file to simplify an application deployment |
Bind Application with the service
Now you can bind your published application with the service
Code Block |
---|
cf bind-service [app name] sealights |
Restage Application
In order to To apply changes you have to publish your application again, or just restage it with a command restage
Code Block |
---|
cf restage [app name] |
Sealights user-provided service options
Parameter name | Description |
---|---|
Prameter name | Description |
| By default pointer to the latest released version. Use this parameter if you want to use some specific agent version |
| This URL can be used to replace agent installation package completely with another one. Expect url to tar.gz archive |
| Allow to determine customer lab id - unique ID for a set of test labs in case multiple labs are running simultaneously |
| Default value: |
| Sealights token |
| File that contains Sealights token. Should be deployed together with target application |
| Sealights workflow session |
| File that contains Sealights session id. |
| Default value is ‘dotnet’. Will be used dotnet runtime version that specified in the target application. If an application is published without framework dependencies - will be used an agent’s version - 6.0.3 If target parameter is exist - specified parameter will be used. |
| Default value for If target parameter is exist - specified parameter will be used. |
| Root application folder |
| Path to log folder for Profiler |
| Profiler log level |
| Address of proxy to run connection through |
| The proxy username if needed |
| The proxy password if needed |
| Ignore server certificate error |
|
|
|
|
|
|
| application name - will be displayed in dashboard |
| current branch name |
| current build name |
| filter for the application namespaces. Only specified namespaces will be handled |
| current workspace path |
|
|
| Name of the test stage |
How does it work
Sealights use the AfterCompile
hook in the dotnet-core-buildpack
to install an agent and all required dependencies in the target container. So, once the application is pushed to the cloud foundry service, the following steps occur:
...