-
Notifications
You must be signed in to change notification settings - Fork 0
v0.4.0 Lab 4 First pipeline run
In this lab you will explore how a module runs through the first two pipeline stages, the local validation, as well as validation through Azure.
- Step 1 - Test the module using the pipeline
- Step 2 - Check up on the deployment
- Step 3 - Verify the workflow ran correctly
After this preparation phase, we're sure you would like to see some Action(s)!
-
Click on
Actions
-
Look for the
Network: RouteTables
workflow -
Select the
Run workflow
button. Make sure the selected branch is the one you created in Lab 2 and click onRun workflow
on the bottom.
-
Once the pipeline is triggered you will notice that the
Pester tests
job starts executing. -
If you click on the
Pester tests
job, GitHub opens the log of the selected job and you can see the tests that it is running -
Once the
Pester tests
job concluded successfully, theDeployment tests
job will start and test the parameter file referenced by the pipeline job (parameters.json
). In sequence, the job executes 3 fundamental tasks
-
Run a static Test-Az*Deployment using both the module's
deploy.json
and the aforementioned parameter file -
Run an actually deployment against the Azure environment specified through the credentials set up in Lab 2
-
Remove set resources once the deployment concluded
-
If you click on the
Deployment tests
job, GitHub opens the log of the selected job and you can see the deployment that it is running -
While the deployment is running, you can take a look at the Azure portal. You will notice that a resource group named
validation-rg
has been created, and also, that a route table was created inside it.Note: The pipeline operates fairly quickly, so it can happen that the route table was already removed by the time you open the resource group
Let's now see what happened.
-
First of all, if you click on the run, you should see jobs have run successfully.
You will also notice the
Publish module
step has been skipped. This is because the workflows will only execute this job if run from themain
branch, so that you do your test before the publishing happens. -
You can also examine the deployment in the Azure portal by navigating to the resource group
validation-rg
, selectDeployments
in its blade and check the list of deployments opening to the right. If you select any one of them you can see the used inputs, template & outputs - and even drill down into nested deployments.You will notice the resource group has no resources now. By default, the last step of the deployment will also remove what has been deployed, to keep the testing sandbox subscription cost as low as possible.
You can modify this behaviour by unflagging
Remove deployed module
flag when running a workflow
If ready, proceed to the next lab: Lab 5 - Extend test coverage
This wiki is being actively developed