Update valet-forecast-lab.md
This commit is contained in:
@@ -15,17 +15,22 @@ TBD
|
||||
Before we can run the forecast we need to answer a few questions so we can construct the correct command.
|
||||
1) What is the date we want to start forecasting from? __2022-03-02. This should be a date that will give enough data to get a good understanding of the typical usage.__
|
||||
2) Where do we want to store the results? __./tmp/forecast_reports. This can be any valid path on the system, but for simplicity it is recommend to use a directory in the root of the codespace workspace.__
|
||||
3) What project do we want to run the forecast for? __ValetBootStrap. This is the default project name for the labs, if you choose a different name then use that instead.__
|
||||
|
||||
Using these answers our command becomes:
|
||||
```
|
||||
gh valet forecast azure-devops --output-dir ./tmp/forecast_reports --start-date "2022-03-02"
|
||||
gh valet forecast azure-devops --output-dir ./tmp/forecast_reports --azure-devops-project YOUR_PROJECT_NAME_HERE --start-date "2022-03-02"
|
||||
```
|
||||
|
||||
## Perform a forecast
|
||||
Instead of using the command generated in the previous step. We will instead use a different one that will `forecast` using data previously generated.
|
||||
|
||||
The reason for this is that it is very likely that the ADO project generated for the Valet labs does not have any pipelines that have ran and probably no runners available. So rather than setting up runners and triggering pipelines we will instead use the `--source-file` option of the `forecast` command. If you would like you can try the command above, it will likely return "no jobs"
|
||||
|
||||
- Run the command generated in the previous step in the terminal.
|
||||
- It will likely return "No Jobs" because we have no pipelines that ran during the timeframe we picked. Actually our demo project has never had any pipelines run so any date we pick will return no jobs.
|
||||

|
||||
- lets use the `--source-file` option of the forecast command to generate a report that we can review. This option is normally used to create reports using data from multiple CI/CD providers, but in this case we can use it to create a report from sample Azure DevOps data. We can view the `forecast` command options by using the help flag `gh valet forecast --help`
|
||||

|
||||
- Run `gh valet forecast azure-devops -o ./tmp/sample_report --source-file-path azure_devops/jobs_data.json`
|
||||
- A report should be generated from the sample data!
|
||||

|
||||
|
||||
## Review forecast report
|
||||
|
||||
|
||||
Reference in New Issue
Block a user