@@ -37,33 +37,30 @@ References:
3737
3838## 3.2 Create new environments, variables, and secrets - advanced pipeline
3939
40- 1 . Open the workflow file [ environments-secrets.yml] ( /.github/workflows/environments-secrets.yml )
41- 2 . Edit the file and copy the following YAML content between the test and prod jobs (before the ` use-environment-prod: ` line):
42- ``` YAML
43-
44- use-environment-uat :
45- name : Use UAT environment
46- runs-on : ubuntu-latest
47- if : ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
48- needs : use-environment-test
49-
50- environment :
51- name : UAT
52- url : ' https://uat.github.com'
53-
54- steps :
55- - name : Step that uses the UAT environment
56- run : echo "Deployment to UAT..."
57- env :
58- env_secret : ${{ secrets.MY_ENV_SECRET }}
59-
60- ```
61- 7 . Inside the ` use-environment-prod ` job, replace ` needs: use-environment-test ` with:
62- ``` YAML
63- needs : use-environment-uat
40+ 1 . Try running the advanced pipeline and you will quickly see it fail
41+ ![ image] ( https://github.com/devopsshield/devsecops-workshop/assets/112144174/f415605a-e5b8-44bd-800b-abca9a0eb68a )
42+ 3 . You can immediately remedy this by running
43+ ``` POWERSHELL
44+ .\Create-GitHubEnvironments.ps1 -ghOwner emmanuel-knafo `
45+ -ghRepo devsecops-workshop `
46+ -dockerName crs001fwmpo7kn3hnty `
47+ -dockerPassword "Dgv*************************************************" `
48+ -defectDojoProductId 6 `
49+ -defectDojoToken "607*************************************" `
50+ -githubReadOnlyPersonalAccessTokenClassic "ghp_pPK*********************************" `
51+ -kubeConfigFileName "C:\Users\emmanuel.DEVOPSABCS\Downloads\wrkshp-001-student-001-config-aks-wrkshp-001-s-001"
6452```
65- 8. Commit the changes into the ` main` branch
66- 9. Go to `Actions` and see the details of your running workflow
67- 10. Review your deployment and approve the pending UAT job
68- - [Reviewing deployments](https://docs.github.com/en/actions/managing-workflow-runs/reviewing-deployments)
69- 11. Go to `Settings` > `Environments` and update the `PROD` environment created to protect it with approvals (same as UAT)
53+ 3 . You can grab all the parameter values from the OneDrive file you received:
54+ ![ image] ( https://github.com/devopsshield/devsecops-workshop/assets/112144174/e8e19ef5-f2c0-475c-8980-c80c56bbf176 )
55+ 4 . Or you can enter each environment secret and variable manually till you get something like:
56+ ![ image] ( https://github.com/devopsshield/devsecops-workshop/assets/112144174/064215a3-a8d8-4650-950e-d2c1cd93032e )
57+ ![ image] ( https://github.com/devopsshield/devsecops-workshop/assets/112144174/b8a1ecdc-f215-4d12-bc25-500113c05f87 )
58+ ![ image] ( https://github.com/devopsshield/devsecops-workshop/assets/112144174/e866fe16-7770-4f57-9942-c500121ceb10 )
59+ 6 . Then run the advanced pipeline again
60+ ![ image] ( https://github.com/devopsshield/devsecops-workshop/assets/112144174/87935f10-003c-4a46-a76c-3973b17e35fa )
61+ 7 . It should end like this:
62+ ![ image] ( https://github.com/devopsshield/devsecops-workshop/assets/112144174/50900633-57f7-43c5-ae5c-7b20fa5a4ae0 )
63+ 9 . You can view the deployed app here: http://gh-pygoat.cad4devops.com or find the ip in the deployment such as http://20.175.206.146 :
64+ ![ image] ( https://github.com/devopsshield/devsecops-workshop/assets/112144174/ba4b6912-f616-4da9-b2ff-2eb1ab118afa )
65+ 10 . Pygoat App is a great way to learn more about DevSecOps
66+ ![ image] ( https://github.com/devopsshield/devsecops-workshop/assets/112144174/aea2bf6e-538e-465e-821b-6518b047ce92 )
0 commit comments