-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'next' into removeeclipse
- Loading branch information
Showing
18 changed files
with
246 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
src/markdown-pages/docs/cli-command-reference/runs-reset-cancel.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
--- | ||
path: "/docs/cli-command-reference/runs-reset-cancel" | ||
title: "Retrying and cancelling tests" | ||
--- | ||
|
||
|
||
Sometimes tests can become stuck in a loop and fail to finish running, for example, due to a lack of available resources, an environmental problem, or a timeout. You can retry a test to run again by using the `runs reset` command. If the test continues to fail to finish running, you can use the `runs cancel` command to cancel the test. | ||
|
||
Retrying a test sets the status of the test run in the DSS to `queued` status. Cancelling a test removes all entries in the DSS for that test run. For this reason it is preferable to retry a test rather than cancel a test. All information that is stored in the RAS about the test is kept and is not removed when either the `runs reset` or `runs cancel` command is run. | ||
|
||
|
||
You can view the full list of options that are available with the `runs reset` and `runs cancel` commands in the | ||
<a href="https://github.com/galasa-dev/cli/blob/main/docs/generated/galasactl_runs.md" target="_blank">Galasa cli repository</a>. | ||
|
||
## Working with the `runs reset` command | ||
|
||
The following example retrys a test run called _C1234_ by using the following command: | ||
|
||
``` | ||
galasactl runs reset --name C1234 | ||
``` | ||
|
||
### Output for test retries | ||
|
||
When using the [galasactl runs download](ecosystem-cli-runs-download) command to view test results, if a test has run more than once, a number is added to the folder name to indicate the number of the retry, as shown in the following example: | ||
|
||
``` | ||
C1234-1-2023-05-25_18:30:26 | ||
C1234-2-2023-05-25_18:30:26 | ||
C1234-3 | ||
``` | ||
|
||
In this example, the test _C1234_ tried to run twice unsuccessfully and completed on the third try. The numbers _1_ and _2_ in the folder names of the first two test run attempts indicate the retry order. The inclusion of the timestamp in folder name of the first two tries indicates that the test did not finish running. The third time the test finished running, so no timestamp is included as part of the name of the folder. | ||
|
||
## Working with the `runs cancel` command | ||
|
||
The following example cancels a test run called _C1234_ by using the following command: | ||
|
||
``` | ||
galasactl runs cancel --name C1234 | ||
``` | ||
|
||
All information that is held in the DSS about the test run is removed. A message is returned in the log to say that the test run was lost and results are returned on the terminal in the following example format: | ||
|
||
``` | ||
2024/02/07 13:34:28 Run C1234 was lost - inttests/dev.galasa.inttests/dev.galasa.inttests.core.local.CoreLocalJava11Ubuntu | ||
submitted-time(UTC) name requestor status result test-name | ||
Total:1 Lost:1 | ||
2024/02/07 13:34:28 GAL1017E: Not all runs passed. 1 failed. | ||
GAL1017E: Not all runs passed. 1 failed. | ||
2024/02/07 13:34:28 Exit code is 2 | ||
``` | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
src/markdown-pages/docs/ecosystem/ecosystem-authentication.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
path: "/docs/ecosystem/ecosystem-authentication" | ||
title: "Configuring authentication" | ||
--- | ||
|
||
Before interacting with a Galasa Ecosystem using the Galasa command line tool (galasactl), you must be authenticated with it. Galasa uses personal access tokens to authenticate users who want to interact with a Galasa Ecosystem provided by the `GALASA_BOOTSTRAP` environment variable or through the `--bootstrap` flag. | ||
|
||
|
||
Personal access tokens are stored in the `GALASA_TOKEN` property in the `galasactl.properties` file in your Galasa home folder. The `galasactl.properties` file is created when you run the `galasa local init` command. Setting the `GALASA_TOKEN` property in this file with a valid token value allows the galasactl tool to access and communicate with an Ecosystem on behalf of the user. | ||
|
||
|
||
If you have [installed your Galasa Ecosystem](../ecosystem/ecosystem-installing-k8s) by using the Galasa Ecosystem Helm chart that is provided with Galasa, you will have access to the Galasa Web UI. To get a value for the `GALASA_TOKEN` property, log into the Galasa Web UI and request a personal access token which can be copied into the `GALASA_TOKEN` property. The instructions on how to do this are displayed in a dialog box in the Galasa Web UI. You can choose to set the token as an environmental variable but the value would not persist across terminals, so is only valid for that session. | ||
|
||
## Authentication architecture | ||
|
||
The following diagram shows the architecture for the authentication process: | ||
|
||
![Galasa ecosystem architecture:](ecosystem-cluster-auth.svg) | ||
|
||
|
||
When a user logs into the Galasa Web UI via their browser, the Web UI contacts the Galasa API server which in turn talks to a Dex server, providing it with the user ID. The Dex server talks to an identity provider, for example GitHub or LDAP, to authenticate that user. If the user is successfully authenticated, the provider returns an access token to the Dex server which sends that token to Galasa API server. The token is then sent to the Galasa Web UI where it is visible to the user. The user can then configure that token into the galasactl command line tool by updating the `GALASA_TOKEN` property in the `galasactl.properties` file. The user can then be authenticated each time the galasactl tool is used to log into a Galasa Ecosystem. | ||
|
||
On a successful login, a `bearer-token.json` file is created in the Galasa home directory. This file contains a bearer token that galasactl uses to authenticate requests when communicating with a Galasa Ecosystem. If the bearer token expires, galasactl automatically attempts to re-authenticate with the Galasa Ecosystem using the properties in the `galasactl.properties` file within the Galasa home directory. | ||
|
||
### Logging in to a Galasa Ecosystem using the auth login command | ||
|
||
You can log in to a Galasa Ecosystem explicitly by using the `galasactl auth login` command. You might want to do an explicit log in if you are running galasactl as part of a build pipeline, or if you just want to make sure you can log in. | ||
|
||
|
||
### Logging out of a Galasa Ecosystem using the auth logout command | ||
|
||
To log out of a Galasa Ecosystem using galasactl, you can use the `galasactl auth logout` command. If you run a galasactl command that interacts with an Ecosystem while logged out, galasactl will attempt to automatically log in using the properties in your `galasactl.properties` file within your Galasa home directory. | ||
|
Oops, something went wrong.