From 422b4550e89a63830cee61d87e8f0f71db308cc6 Mon Sep 17 00:00:00 2001 From: j-dunham Date: Thu, 11 Aug 2022 15:30:06 -0400 Subject: [PATCH] Update valet-dry-run-lab.md --- gitlab/valet-dry-run-lab.md | 50 +++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/gitlab/valet-dry-run-lab.md b/gitlab/valet-dry-run-lab.md index ae9670b..cc9e99a 100644 --- a/gitlab/valet-dry-run-lab.md +++ b/gitlab/valet-dry-run-lab.md @@ -36,9 +36,9 @@ We will be performing a dry-run against a preconfigured project in the GitLab in ## Review dry-run output The dry-run output will show you the GitHub Actions yaml that would be migrated to GitHub with the `migrate` command. We will now take a quick look at what was generated. -In the GitLab pipeline we had 3 stages and 6 jobs that run on a alpine image +__Click to Expand__
- Click to expand GitLab Pipeline + GitLab Pipeline ```yaml stages: @@ -91,29 +91,8 @@ deploy_b:
-In the resulting yaml we have the same jobs (`build_a`, `build_b`, `test_a`, `test_b`, `deploy_a`, `deploy_b`) and the stages are now being enforced using Actions's keyword `needs`. We can see this if we examine the `needs` for test_a and test_b, which make the test jobs depend on the build jobs. -```diff -- stages: test -+ needs: -+ - build_a -+ - build_b -``` - -The `image` in the GitLab pipeline has be transformed to `container` on each of the jobs. -```diff -- image: alpine -+ container: -+ image: alpine -``` -And `script` has been transformed to `run` -```diff -- script: -- - echo "This job builds something." -+ run: echo "This job builds something." -``` -
- Click to expand Actions Workflow + Actions Workflow ```yaml name: valet/basic-pipeline-example @@ -214,6 +193,29 @@ jobs: ```
+In the GitLab pipeline we had 3 stages and 6 jobs that run on a alpine image + +In the Actions workflow we have the same jobs (`build_a`, `build_b`, `test_a`, `test_b`, `deploy_a`, `deploy_b`) and the stages are now being enforced using the `needs` keyword. We can see this if we examine the `needs` for `test_a` and `test_b`, which make the test jobs depend on the build jobs. +```diff +- stages: test ++ needs: ++ - build_a ++ - build_b +``` + +The `image` in the GitLab pipeline has be transformed to `container` on each of the jobs. +```diff +- image: alpine ++ container: ++ image: alpine +``` +And `script` has been transformed to `run` +```diff +- script: +- - echo "This job builds something." ++ run: echo "This job builds something." +``` + ## Includes Dry-Run In the previous dry-run we migrated a basic pipeline that map very nicely to concepts in GitHub Actions. In this section we will dry-run a pipeline that does not map directly to Actions. The `include-file-example` pipeline