1 Commits

Author SHA1 Message Date
Bree Dodd db1c682a5b Add Bamboo Forecast & Custom Transformers 2023-09-15 16:42:10 -06:00
9 changed files with 809 additions and 7 deletions
+1 -1
View File
@@ -183,4 +183,4 @@ The contents of this file can be useful in answering questions similar to the fo
### Next lab
[Perform a dry run of a individual pipeline](3-dry-run.md)
[Forecast potential build runner usage](3-forecast.md)
+102
View File
@@ -0,0 +1,102 @@
# Forecast potential build runner usage
In this lab you will use the `forecast` command to forecast potential GitHub Actions usage by computing metrics from completed plan runs in Bamboo.
## Prerequisites
1. Followed the steps [here](./readme.md#configure-your-codespace) to set up your GitHub Codespaces environment.
2. Completed the [configure lab](./1-configure.md#configuring-credentials).
## Perform a forecast
Answer the following questions before running the `forecast` command:
1. What workspace do you want to run the forecast for?
- **actions-importer**
2. What is the date you want to start forecasting from?
- **2023-08-01**. By default, the value is set to one week ago, but it's recommended that you choose a start date that provides a representative view of typical usage.
3. Where do you want to store the results?
- **tmp/forecast**
### Steps
1. Navigate to your codespace terminal
2. Run the following command from the root directory:
```bash
gh actions-importer forecast bamboo --start-date 2023-08-01 --output-dir tmp/forecast --source-file-path bamboo/**/source_files/*.json
```
> Note: The `--source-file-path` option is not required and is used throughout this lab to convert files that are stored locally. This can be omitted and GitHub Actions Importer will programmatically fetch historical pipeline runs using the Bamboo REST APIs.
3. The command will list all the files written to disk when the command succeeds.
```console
Logs: 'tmp/forecast/log/valet-20230915-223223.log'
Forecasting 'https://<bamboo-server>.com'
Output file(s):
tmp/forecast/forecast_report.md
```
## Review the forecast report
The forecast report, logs, and completed job data will be located within the `tmp/forecast` folder.
1. Find the `forecast_report.md` file in the file explorer.
2. Right-click the `forecast_report.md` file and select `Open Preview`.
3. This file contains metrics used to forecast potential GitHub Actions usage.
### Total
The "Total" section of the forecast report contains high level statistics related to all the jobs completed after the `--start-date` CLI option:
```md
- Job count: **40**
- Pipeline count: **4**
- Execution time
- Total: **64 minutes**
- Median: **1 minutes**
- P90: **4 minutes**
- Min: **0 minutes**
- Max: **4 minutes**
- Queue time
- Median: **0 minutes**
- P90: **2 minutes**
- Min: **0 minutes**
- Max: **2 minutes**
- Concurrent jobs
- Median: **0**
- P90: **0**
- Min: **0**
- Max: **3**
```
Here are some key terms of items defined in the forecast report:
- The `job count` is the total number of completed jobs.
- The `pipeline count` is the number of unique pipelines used.
- `Execution time` describes the amount of time a runner spent on a job. This metric can be used to help plan for the cost of GitHub-hosted runners.
- This metric is correlated to how much you should expect to spend in GitHub Actions. This will vary depending on the hardware used for these minutes. You can use the [Actions pricing calculator](https://github.com/pricing/calculator) to estimate a dollar amount.
- `Concurrent jobs` metrics describe the amount of jobs running at any given time. This metric can be used to define the number of runners a customer should configure.
Additionally, these metrics are defined by hosted and self-hosted runners.
## Forecasting multiple providers
You can examine the available options for the `forecast` command by running `gh actions-importer forecast --help`. When you do this you will see the `--source-file-path` option:
```console
$ gh actions-importer forecast -h
Options:
--source-file-path <source-file-path> (REQUIRED) The file path(s) to existing jobs data.
-o, --output-dir <output-dir> (REQUIRED) The location for any output files.
--start-date <start-date> The start date of the forecast analysis in YYYY-MM-DD format. [default: 9/12/2022 12:42:39 PM]
--time-slice <time-slice> The time slice in seconds to use for computing concurrency metrics. [default: 60]
--credentials-file <credentials-file> The file containing the credentials to use.
--no-telemetry Boolean value to disallow telemetry.
--no-ssl-verify Disable ssl certificate verification.
--no-http-cache Disable caching of http responses.
-?, -h, --help Show help and usage information
```
You can use the `--source-file-path` CLI option to combine data from multiple reports into a single report. This becomes useful if you use multiple CI/CD providers and want to get a holistic view of the runner usage. This works by using the `.json` files generated by `forecast` commands as space-delimited values for the `--source-file-path` CLI option. Optionally, this value could be a glob pattern to dynamically specify the list of files (e.g. `**/*.json`).
Below is a example command that would generate a report for all files matching `tmp/**/jobs/*.json`:
```bash
gh actions-importer forecast --source-file-path tmp/**/jobs/*.json --output-dir tmp/forecast-combined
```
## Next steps
[Perform a dry-run migration of a Bamboo pipeline](4-dry-run.md)
+1 -1
View File
@@ -54,4 +54,4 @@ The files generated from the `dry-run` command represent the equivalent Actions
## Next lab
[Use the migrate command to open a PR with the supplied workflow.](4-migrate.md)
[Use custom transformers to customize GitHub Actions Importer's behavior](5-custom-transformers.md)
+186
View File
@@ -0,0 +1,186 @@
# Use custom transformers to customize GitHub Actions Importer's behavior
In this lab, you will build upon the `dry-run` command to override GitHub Actions Importer's default behavior and customize the converted workflow using "custom transformers." Custom transformers can be used to:
1. Convert items that are not automatically converted.
2. Convert items that were automatically converted using different actions.
3. Convert environment variable values differently.
4. Convert references to runners to use a different runner name in GitHub Actions.
## Prerequisites
1. Followed the steps [here](./readme.md#configure-your-codespace) to set up your GitHub Codespaces environment.
2. Completed the [configure lab](./1-configure.md#configuring-credentials).
3. Completed the [dry-run lab](./4-dry-run.md).
## Perform a dry run
You will be performing a `dry-run` command to inspect the workflow that is converted by default. Run the following command within the codespace terminal:
```bash
gh actions-importer dry-run bamboo build --output-dir tmp/custom-dry-run --plan-slug DEMO-MAR --source-file-path bamboo/bootstrap/source_files/custom/bamboo.yml
```
The converted workflow generated by the above command can be seen below:
<details>
<summary><em>Converted workflow 👇</em></summary>
```yaml
name: demo/sample_plan
on:
# # The shortest interval you can run scheduled workflows is once every 5 minutes.
# period: '180'
jobs:
Custom-Dry-Run-Build:
runs-on:
- self-hosted
- bamboo-runner
steps:
- uses: actions/checkout@v3.5.0
with:
clean: false
- run: |-
mkdir -p falcon/red
echo wings > falcon/red/wings
sleep 1
echo 'Built it'
# # This item has no matching transformer
# - any-task/plugin-key/com.atlassian.bamboo.plugins.builder.unknowncache:
# any-task:
# plugin-key: com.atlassian.bamboo.plugins.builder.unknowncache
# configuration:
# key: cache_key
# path: falcon/red/wings
- uses: actions/upload-artifact@v3.1.1
with:
name: FOO-BAR_Red rocket built
path: falcon/red/wings
if-no-files-found: error
```
</details>
_Note_: You can refer to the previous [lab](./4-dry-run.md) to learn about the fundamentals of the `dry-run` command.
## Custom transformers for an unknown step
The converted workflow contains a `any-task/plugin-key/com.atlassian.bamboo.plugins.builder.unknowncache` step that was not automatically converted. Let's write a custom transformer to handle this unknown task!
Let's answer the following questions before proceeding to write a custom transformer.
1) What is the "identifier" of the step to customize? This should be the identifier from the comment in the workflow without the version, or in other words the name untransformed step.
- __any-task/plugin-key/com.atlassian.bamboo.plugins.builder.unknown__
2) What is the desired Actions syntax to use instead?
- Upon conducting some research, you've discovered that the [Actions Cache](https://github.com/marketplace/actions/cache) action in the marketplace offer comparable functionality.
```yaml
- uses: actions/cache/save@v3
with:
path: <path>
key: <key>
```
Now you can begin to write the custom transformer. Custom transformers use a DSL built on top of Ruby and should be defined in a file with the `.rb` file extension. You can create this file by running the following command in your codespace terminal:
```bash
touch transformers.rb && code transformers.rb
```
Next, you will define a `transform` method for the `any-task/plugin-key/com.atlassian.bamboo.plugins.builder.unknowncache` identifier by adding the following code to `transformers.rb`:
```ruby
transform "any-task/plugin-key/com.atlassian.bamboo.plugins.builder.unknowncache" do |item|
[
{
"uses" => "azure/cache/save@v3",
"with" => {
"path" => item["configuration"]["path"],
"key" => item["configuration"]["key"]
}
}
]
end
```
This method can use any valid Ruby syntax and should return a `Hash` or `Array` that represents the YAML that should be generated for a given step. GitHub Actions Importer will use this method to convert a step with the provided identifier and will use the `item` parameter for the original values configured in Bamboo. The Bamboo task configuration can be accessed in the `item` parameter via `item["configuration"]["<item_configuration_key>"]`.
```yaml
plugin-key: com.atlassian.bamboo.plugins.builder.unknowncache
configuration:
key: cache_key
path: falcon/red/wings
```
To access the values of the `key` and `path` information in the transformer, we are using `item["configuration"]["key"]` and `item["configuration"]["path"]`.
Now you can perform another `dry-run` command and use the `--custom-transformers` CLI option to provide this custom transformer. Run the following command within your codespace terminal:
```bash
gh actions-importer dry-run bamboo build --output-dir tmp/custom-dry-run --plan-slug DEMO-MAR --source-file-path bamboo/bootstrap/source_files/custom/bamboo.yml --custom-transformers transformers.rb
```
The converted workflow that is generated by the above command will now use the custom logic for the `unknowncache` step.
## Custom transformers for runners
Next, we will use a custom transformers to dictate which runners the converted workflows should use. To do this, answer the following questions:
1. What is the label of the runner in Bamboo to change?
- __bamboo-runner__
2. What is the label of the runner in GitHub Actions to use instead?
- __some-other-runner__
With these questions answered, you can add the following code to the `transformers.rb` file:
```ruby
runner "bamboo-runner", "some-other-runner"
```
In this example, the first parameter to the `runner` method is the runner label in Bitbucket and the second is the new runner label to use in GitHub Actions.
Now you can perform another `dry-run` command with the `--custom-transformers` CLI option. When you open the converted workflow the `runs-on` statement will use the customized runner label:
```bash
gh actions-importer dry-run bamboo build --output-dir tmp/custom-dry-run --plan-slug DEMO-MAR --source-file-path bamboo/bootstrap/source_files/custom/bamboo.yml --custom-transformers transformers.rb
```
> Note: we are using a different pipeline than before that defines a `runs-on` tag with the target label.
```diff
runs-on:
- - bamboo-runner
+ - some-other-runner
```
At this point the file contents of `transformers.rb` should match this:
<details>
<summary><em>Custom transformers 👇</em></summary>
```ruby
runner "bamboo-runner", "some-other-runner"
transform "any-task/plugin-key/com.atlassian.bamboo.plugins.builder.unknowncache" do |item|
[
{
"uses" => "azure/cache/save@v3",
"with" => {
"path" => item["configuration"]["path"],
"key" => item["configuration"]["key"]
}
}
]
end
```
</details>
That's it. Congratulations, you have overridden GitHub Actions Importer's default behavior by customizing the conversion of:
- Unknown steps
- Runners
## Next lab
[Perform a production migration of a Bamboo pipeline](6-migrate.md)
@@ -0,0 +1,442 @@
[
{
"id": 11043093,
"build_number": 11043093,
"result": "Successful",
"queue_time": "2023-09-15T00:00:00+00:00",
"start_time": "2023-09-15T00:00:00+00:00",
"finish_time": "2023-09-15T00:02:00+00:00",
"definition_id": "FORT-BUIL",
"runner_name": "",
"runner_group": ""
},
{
"id": 11043078,
"build_number": 11043078,
"result": "Successful",
"queue_time": "2023-09-14T00:00:00+00:00",
"start_time": "2023-09-14T00:00:15+00:00",
"finish_time": "2023-09-14T00:02:15+00:00",
"definition_id": "FORT-BUIL",
"runner_name": "",
"runner_group": ""
},
{
"id": 11043067,
"build_number": 11043067,
"result": "Successful",
"queue_time": "2023-09-13T00:00:00+00:00",
"start_time": "2023-09-13T00:00:00+00:00",
"finish_time": "2023-09-13T00:02:00+00:00",
"definition_id": "FORT-BUIL",
"runner_name": "",
"runner_group": ""
},
{
"id": 11043053,
"build_number": 11043053,
"result": "Successful",
"queue_time": "2023-09-12T00:00:00+00:00",
"start_time": "2023-09-12T00:00:15+00:00",
"finish_time": "2023-09-12T00:02:15+00:00",
"definition_id": "FORT-BUIL",
"runner_name": "",
"runner_group": ""
},
{
"id": 11043037,
"build_number": 11043037,
"result": "Successful",
"queue_time": "2023-09-11T00:00:00+00:00",
"start_time": "2023-09-11T00:00:00+00:00",
"finish_time": "2023-09-11T00:02:00+00:00",
"definition_id": "FORT-BUIL",
"runner_name": "",
"runner_group": ""
},
{
"id": 11043026,
"build_number": 11043026,
"result": "Successful",
"queue_time": "2023-09-10T00:00:00+00:00",
"start_time": "2023-09-10T00:00:00+00:00",
"finish_time": "2023-09-10T00:02:00+00:00",
"definition_id": "FORT-BUIL",
"runner_name": "",
"runner_group": ""
},
{
"id": 11043011,
"build_number": 11043011,
"result": "Successful",
"queue_time": "2023-09-09T00:00:00+00:00",
"start_time": "2023-09-09T00:00:00+00:00",
"finish_time": "2023-09-09T00:02:00+00:00",
"definition_id": "FORT-BUIL",
"runner_name": "",
"runner_group": ""
},
{
"id": 11042998,
"build_number": 11042998,
"result": "Successful",
"queue_time": "2023-09-08T00:00:00+00:00",
"start_time": "2023-09-08T00:00:15+00:00",
"finish_time": "2023-09-08T00:02:15+00:00",
"definition_id": "FORT-BUIL",
"runner_name": "",
"runner_group": ""
},
{
"id": 11043102,
"build_number": 11043102,
"result": "Successful",
"queue_time": "2023-09-15T01:00:00+00:00",
"start_time": "2023-09-15T01:00:00+00:00",
"finish_time": "2023-09-15T01:03:20+00:00",
"definition_id": "FORT-RS",
"runner_name": "",
"runner_group": ""
},
{
"id": 11043087,
"build_number": 11043087,
"result": "Successful",
"queue_time": "2023-09-14T01:00:00+00:00",
"start_time": "2023-09-14T01:00:00+00:00",
"finish_time": "2023-09-14T01:03:20+00:00",
"definition_id": "FORT-RS",
"runner_name": "",
"runner_group": ""
},
{
"id": 11043074,
"build_number": 11043074,
"result": "Successful",
"queue_time": "2023-09-13T01:00:00+00:00",
"start_time": "2023-09-13T01:00:00+00:00",
"finish_time": "2023-09-13T01:03:20+00:00",
"definition_id": "FORT-RS",
"runner_name": "",
"runner_group": ""
},
{
"id": 11043061,
"build_number": 11043061,
"result": "Successful",
"queue_time": "2023-09-12T01:00:00+00:00",
"start_time": "2023-09-12T01:00:00+00:00",
"finish_time": "2023-09-12T01:03:20+00:00",
"definition_id": "FORT-RS",
"runner_name": "",
"runner_group": ""
},
{
"id": 11043046,
"build_number": 11043046,
"result": "Successful",
"queue_time": "2023-09-11T01:00:00+00:00",
"start_time": "2023-09-11T01:00:00+00:00",
"finish_time": "2023-09-11T01:03:20+00:00",
"definition_id": "FORT-RS",
"runner_name": "",
"runner_group": ""
},
{
"id": 11043033,
"build_number": 11043033,
"result": "Successful",
"queue_time": "2023-09-10T01:00:00+00:00",
"start_time": "2023-09-10T01:00:00+00:00",
"finish_time": "2023-09-10T01:03:20+00:00",
"definition_id": "FORT-RS",
"runner_name": "",
"runner_group": ""
},
{
"id": 11043020,
"build_number": 11043020,
"result": "Successful",
"queue_time": "2023-09-09T01:00:00+00:00",
"start_time": "2023-09-09T01:00:00+00:00",
"finish_time": "2023-09-09T01:03:20+00:00",
"definition_id": "FORT-RS",
"runner_name": "",
"runner_group": ""
},
{
"id": 11043007,
"build_number": 11043007,
"result": "Successful",
"queue_time": "2023-09-08T01:00:00+00:00",
"start_time": "2023-09-08T01:00:00+00:00",
"finish_time": "2023-09-08T01:03:20+00:00",
"definition_id": "FORT-RS",
"runner_name": "",
"runner_group": ""
},
{
"id": 11043095,
"build_number": 11043095,
"result": "Successful",
"queue_time": "2023-09-15T00:00:00+00:00",
"start_time": "2023-09-15T00:02:00+00:00",
"finish_time": "2023-09-15T00:02:00+00:00",
"definition_id": "PAN-CON",
"runner_name": "",
"runner_group": ""
},
{
"id": 11043080,
"build_number": 11043080,
"result": "Successful",
"queue_time": "2023-09-14T00:00:00+00:00",
"start_time": "2023-09-14T00:02:15+00:00",
"finish_time": "2023-09-14T00:02:15+00:00",
"definition_id": "PAN-CON",
"runner_name": "",
"runner_group": ""
},
{
"id": 11043065,
"build_number": 11043065,
"result": "Successful",
"queue_time": "2023-09-13T00:00:00+00:00",
"start_time": "2023-09-13T00:02:15+00:00",
"finish_time": "2023-09-13T00:02:15+00:00",
"definition_id": "PAN-CON",
"runner_name": "",
"runner_group": ""
},
{
"id": 11043052,
"build_number": 11043052,
"result": "Successful",
"queue_time": "2023-09-12T00:00:00+00:00",
"start_time": "2023-09-12T00:00:00+00:00",
"finish_time": "2023-09-12T00:00:00+00:00",
"definition_id": "PAN-CON",
"runner_name": "",
"runner_group": ""
},
{
"id": 11043044,
"build_number": 11043044,
"result": "Successful",
"queue_time": "2023-09-11T00:00:00+00:00",
"start_time": "2023-09-11T00:02:00+00:00",
"finish_time": "2023-09-11T00:02:00+00:00",
"definition_id": "PAN-CON",
"runner_name": "",
"runner_group": ""
},
{
"id": 11043024,
"build_number": 11043024,
"result": "Successful",
"queue_time": "2023-09-10T00:00:00+00:00",
"start_time": "2023-09-10T00:02:15+00:00",
"finish_time": "2023-09-10T00:02:15+00:00",
"definition_id": "PAN-CON",
"runner_name": "",
"runner_group": ""
},
{
"id": 11043013,
"build_number": 11043013,
"result": "Successful",
"queue_time": "2023-09-09T00:00:00+00:00",
"start_time": "2023-09-09T00:02:15+00:00",
"finish_time": "2023-09-09T00:02:15+00:00",
"definition_id": "PAN-CON",
"runner_name": "",
"runner_group": ""
},
{
"id": 11043000,
"build_number": 11043000,
"result": "Successful",
"queue_time": "2023-09-08T00:00:00+00:00",
"start_time": "2023-09-08T00:02:15+00:00",
"finish_time": "2023-09-08T00:02:15+00:00",
"definition_id": "PAN-CON",
"runner_name": "",
"runner_group": ""
},
{
"id": 11043104,
"build_number": 11043104,
"result": "Successful",
"queue_time": "2023-09-15T21:54:00+00:00",
"start_time": "2023-09-15T21:54:00+00:00",
"finish_time": "2023-09-15T21:54:15+00:00",
"definition_id": "PAN-DAIL",
"runner_name": "",
"runner_group": ""
},
{
"id": 11043097,
"build_number": 11043097,
"result": "Successful",
"queue_time": "2023-09-15T00:00:00+00:00",
"start_time": "2023-09-15T00:02:00+00:00",
"finish_time": "2023-09-15T00:02:15+00:00",
"definition_id": "PAN-DAIL",
"runner_name": "",
"runner_group": ""
},
{
"id": 11043091,
"build_number": 11043091,
"result": "Successful",
"queue_time": "2023-09-14T21:54:00+00:00",
"start_time": "2023-09-14T21:54:00+00:00",
"finish_time": "2023-09-14T21:54:15+00:00",
"definition_id": "PAN-DAIL",
"runner_name": "",
"runner_group": ""
},
{
"id": 11043082,
"build_number": 11043082,
"result": "Successful",
"queue_time": "2023-09-14T00:00:00+00:00",
"start_time": "2023-09-14T00:00:00+00:00",
"finish_time": "2023-09-14T00:00:15+00:00",
"definition_id": "PAN-DAIL",
"runner_name": "",
"runner_group": ""
},
{
"id": 11043076,
"build_number": 11043076,
"result": "Successful",
"queue_time": "2023-09-13T21:54:00+00:00",
"start_time": "2023-09-13T21:54:00+00:00",
"finish_time": "2023-09-13T21:54:15+00:00",
"definition_id": "PAN-DAIL",
"runner_name": "",
"runner_group": ""
},
{
"id": 11043069,
"build_number": 11043069,
"result": "Successful",
"queue_time": "2023-09-13T00:00:00+00:00",
"start_time": "2023-09-13T00:02:00+00:00",
"finish_time": "2023-09-13T00:02:15+00:00",
"definition_id": "PAN-DAIL",
"runner_name": "",
"runner_group": ""
},
{
"id": 11043063,
"build_number": 11043063,
"result": "Successful",
"queue_time": "2023-09-12T21:54:00+00:00",
"start_time": "2023-09-12T21:54:00+00:00",
"finish_time": "2023-09-12T21:54:15+00:00",
"definition_id": "PAN-DAIL",
"runner_name": "",
"runner_group": ""
},
{
"id": 11043056,
"build_number": 11043056,
"result": "Successful",
"queue_time": "2023-09-12T00:00:00+00:00",
"start_time": "2023-09-12T00:00:00+00:00",
"finish_time": "2023-09-12T00:00:15+00:00",
"definition_id": "PAN-DAIL",
"runner_name": "",
"runner_group": ""
},
{
"id": 11043050,
"build_number": 11043050,
"result": "Successful",
"queue_time": "2023-09-11T21:54:00+00:00",
"start_time": "2023-09-11T21:54:00+00:00",
"finish_time": "2023-09-11T21:54:15+00:00",
"definition_id": "PAN-DAIL",
"runner_name": "",
"runner_group": ""
},
{
"id": 11043042,
"build_number": 11043042,
"result": "Successful",
"queue_time": "2023-09-11T00:00:00+00:00",
"start_time": "2023-09-11T00:02:00+00:00",
"finish_time": "2023-09-11T00:02:15+00:00",
"definition_id": "PAN-DAIL",
"runner_name": "",
"runner_group": ""
},
{
"id": 11043035,
"build_number": 11043035,
"result": "Successful",
"queue_time": "2023-09-10T21:54:00+00:00",
"start_time": "2023-09-10T21:54:00+00:00",
"finish_time": "2023-09-10T21:54:15+00:00",
"definition_id": "PAN-DAIL",
"runner_name": "",
"runner_group": ""
},
{
"id": 11043028,
"build_number": 11043028,
"result": "Successful",
"queue_time": "2023-09-10T00:00:00+00:00",
"start_time": "2023-09-10T00:02:00+00:00",
"finish_time": "2023-09-10T00:02:15+00:00",
"definition_id": "PAN-DAIL",
"runner_name": "",
"runner_group": ""
},
{
"id": 11043022,
"build_number": 11043022,
"result": "Successful",
"queue_time": "2023-09-09T21:54:00+00:00",
"start_time": "2023-09-09T21:54:00+00:00",
"finish_time": "2023-09-09T21:54:15+00:00",
"definition_id": "PAN-DAIL",
"runner_name": "",
"runner_group": ""
},
{
"id": 11043015,
"build_number": 11043015,
"result": "Successful",
"queue_time": "2023-09-09T00:00:00+00:00",
"start_time": "2023-09-09T00:02:00+00:00",
"finish_time": "2023-09-09T00:02:15+00:00",
"definition_id": "PAN-DAIL",
"runner_name": "",
"runner_group": ""
},
{
"id": 11043009,
"build_number": 11043009,
"result": "Successful",
"queue_time": "2023-09-08T21:54:00+00:00",
"start_time": "2023-09-08T21:54:00+00:00",
"finish_time": "2023-09-08T21:54:15+00:00",
"definition_id": "PAN-DAIL",
"runner_name": "",
"runner_group": ""
},
{
"id": 11043002,
"build_number": 11043002,
"result": "Successful",
"queue_time": "2023-09-08T00:00:00+00:00",
"start_time": "2023-09-08T00:00:00+00:00",
"finish_time": "2023-09-08T00:00:15+00:00",
"definition_id": "PAN-DAIL",
"runner_name": "",
"runner_group": ""
}
]
@@ -0,0 +1,68 @@
---
version: 2
plan:
project-key: FOO
key: BAR
name: Sample Plan
stages:
- Custom Dry Run:
manual: false
final: false
jobs:
- Build
Build:
key: JOB1
requirements:
- bamboo-runner
tasks:
- checkout:
force-clean-build: false
- script:
interpreter: SHELL
scripts:
- |-
mkdir -p falcon/red
echo wings > falcon/red/wings
sleep 1
echo 'Built it'
- any-task:
plugin-key: com.atlassian.bamboo.plugins.builder.unknowncache
configuration:
key: cache_key
path: falcon/red/wings
artifacts:
- name: Red rocket built
pattern: falcon/red/wings
shared: true
required: true
artifact-subscriptions: []
variables:
global_variable: global_variable_value
plan_variable_override: plan_variable_override
repositories:
- yaml-test-repo:
scope: global
triggers:
- polling:
period: '180'
branches:
create: for-new-branch
delete:
after-deleted-days: 1
after-inactive-days: 30
link-to-jira: true
notifications:
- events:
- plan-failed
recipients:
- responsible
- watchers
labels: []
dependencies:
require-all-stages-passing: false
enabled-for-branches: true
block-strategy: none
plans: []
other:
concurrent-build-plugin: system-default
+7 -3
View File
@@ -40,9 +40,13 @@ These steps **must** be completed prior to starting other labs.
Perform the following labs to learn more about Actions migrations with GitHub Actions Importer:
1. [Configure credentials for GitHub Actions Importer](1-configure.md)
2. [Perform an audit of a Bamboo server](2-audit.md)
3. [Perform a dry-run migration of a Bamboo pipeline](3-dry-run.md)
4. [Perform a production migration of a Bamboo pipeline](4-migrate.md)
2. [Perform an audit on Bamboo](2-audit.md)
3. [Forecast potential build runner usage](3-forecast.md)
4. [Perform a dry-run migration of a Bamboo pipeline](4-dry-run.md)
5. [Use custom transformers to customize GitHub Actions Importer's behavior](5-custom-transformers.md)
6. [Perform a production migration of a Bamboo pipeline](6-migrate.md)
## Troubleshoot the GitHub Actions Importer CLI
+2 -2
View File
@@ -32,7 +32,7 @@ Answer the following questions before running the `forecast` command:
```console
[2023-09-07 18:26:22] Logs: 'tmp/audit/log/valet-20230907-182622.log'
[2023-09-07 18:26:22] Forecasting 'https://bitbucket.org/actions-importer'
[2023-09-07 18:26:22] Output file(s):
[2023-09-07 18:26:22] Output file(s):
[2023-09-07 18:26:22] tmp/forecast/forecast_report.md
```
## Review the forecast report
@@ -75,7 +75,7 @@ Here are some key terms of items defined in the forecast report:
- This metric is correlated to how much you should expect to spend in GitHub Actions. This will vary depending on the hardware used for these minutes. You can use the [Actions pricing calculator](https://github.com/pricing/calculator) to estimate a dollar amount.
- `Concurrent jobs` metrics describe the amount of jobs running at any given time. This metric can be used to define the number of runners a customer should configure.
Additionally, these metrics are defined by hosted and self-hosted runners.
Additionally, these metrics are defined by hosted and self-hosted runners.
## Forecasting multiple providers