From 708c4fdc92a2e9d14de0e8b774895dae3d6aba14 Mon Sep 17 00:00:00 2001 From: j-dunham Date: Tue, 13 Sep 2022 12:05:34 -0400 Subject: [PATCH] Create 4-custom-transformers.md --- circle_ci/4-custom-transformers.md | 52 ++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 circle_ci/4-custom-transformers.md diff --git a/circle_ci/4-custom-transformers.md b/circle_ci/4-custom-transformers.md new file mode 100644 index 0000000..caed142 --- /dev/null +++ b/circle_ci/4-custom-transformers.md @@ -0,0 +1,52 @@ +# Using custom transformers to customize Valet's behavior + +In this lab you will build upon the `dry-run` command to override Valet'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 Actions. + +## Prerequisites + +1. Followed the steps [here](./readme.md#configure-your-codespace) to set up your GitHub Codespaces environment and start you GitLab server. +2. Completed the [configure lab](./1-configure.md#configuring-credentials). +3. Completed the [dry-run lab](./3-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 +# ADD_COMMAND +``` + +The converted workflow that is generated by the above command can be seen below: + +
+ Converted workflow 👇 + +```yaml +# ADD_YAML +``` + +
+ +_Note_: You can refer to the previous [lab](./3-dry-run.md) to learn about the fundamentals of the `dry-run` command. + +## Custom transformers for an unknown step + +ADD_CONTENT_OR_REMOVE + +## Custom transformers for environment variables + +ADD_CONTENT + +That's it! Congratulations, you have overridden Valet's default behavior by customizing the conversion of: + +- UPDATE_LIST_HERE +- Environment variables + +## Next lab + +[Perform a production migration of a CircleCI pipeline](5-migrate.md)