-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path06 - CICD.ps1
31 lines (19 loc) · 863 Bytes
/
06 - CICD.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# CDK Intro
# Cloning a new Repo
git clone https://git-codecommit.us-west-2.amazonaws.com/v1/repos/PowerShell-Repository
# Generating the lambda package
Set-Location -Path C:\github\PowerShell-Repository
New-AWSPowerShellLambda -Template basic -Verbose
Copy-Item -Path C:\github\PowerShellAndAws\LambdaTemplateExample\buildspec.yaml -Destination . -Verbose
Code C:\github\PowerShell-Repository
# Check In Our Code, Review the pipeline
# Invoke Our Function
Invoke-LMFunction -FunctionName 'PowerShellCICD-Sample' -LogType Tail
Get-CWLLastLogEvent -LogGroupNamePrefix '/aws/lambda/PowerShellCICD-Sample'
## Make a change and watch the build
While($true)
{
Start-Sleep -Seconds 5
Invoke-LMFunction -FunctionName 'PowerShellCICD-Sample' -LogType Tail -Verbose
Get-CWLLastLogEvent -LogGroupNamePrefix '/aws/lambda/PowerShellCICD-Sample'
}