-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
buildspec_pwsh_windows.yml
61 lines (58 loc) · 4.18 KB
/
buildspec_pwsh_windows.yml
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# This is a simple CodeBuild build file for PowerShell.
# - pre_build step will ensure the Module Name / Version has not previously been built for production (plans to add this at a later time)
# - build step will perform Clean, ValidateRequirements, Analyze, Test, CreateHelp, Build, Archive
# https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html
# https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html#runtime-versions-buildspec-file
# https://docs.aws.amazon.com/codebuild/latest/userguide/test-reporting.html
version: 0.2
phases:
install:
runtime-versions:
dotnet: 6.0
commands:
- pwsh -command '.\configure_aws_credential.ps1'
- '& "C:\Program Files\PowerShell\7\pwsh.exe" -command ''.\install_modules.ps1'''
pre_build:
commands:
- pwsh -command '$PSVersionTable'
# uncomment the line below to explore what modules/variables/env variables are available in the build image
# - pwsh -command 'Get-Module -ListAvailable; (Get-Variable).GetEnumerator() | Sort-Object Name | Out-String; (Get-ChildItem env:*).GetEnumerator() | Sort-Object Name | Out-String'
- pwsh -command 'New-Item -Path C:\Test -ItemType Directory | Out-Null'
- pwsh -command 'New-Item -Path C:\Test\Animation -ItemType Directory | Out-Null'
- pwsh -command 'New-Item -Path C:\Test\Audio -ItemType Directory | Out-Null'
- pwsh -command 'New-Item -Path C:\Test\Documents -ItemType Directory | Out-Null'
- pwsh -command 'New-Item -Path C:\Test\PhotoGroup -ItemType Directory | Out-Null'
- pwsh -command 'New-Item -Path C:\Test\Photos -ItemType Directory | Out-Null'
- pwsh -command 'New-Item -Path C:\Test\VideoGroup -ItemType Directory | Out-Null'
- pwsh -command 'New-Item -Path C:\Test\Videos -ItemType Directory | Out-Null'
- pwsh -command 'New-Item -Path C:\Test\Stickers -ItemType Directory | Out-Null'
- aws s3 cp s3://$TESTFILES_S3_BUCKET/jean.gif C:\Test\Animation\jean.gif --quiet
- aws s3 cp s3://$TESTFILES_S3_BUCKET/Tobu-_-Syndec-Dusk-_NCS-Release_-YouTube.mp3 C:\Test\Audio\Tobu-_-Syndec-Dusk-_NCS-Release_-YouTube.mp3 --quiet
- aws s3 cp s3://$TESTFILES_S3_BUCKET/TestAudio.mp3 C:\Test\Audio\TestAudio.mp3 --quiet
- aws s3 cp s3://$TESTFILES_S3_BUCKET/customlog.txt C:\Test\Documents\customlog.txt --quiet
- aws s3 cp s3://$TESTFILES_S3_BUCKET/customlog2.txt C:\Test\Documents\customlog2.txt --quiet
- aws s3 cp s3://$TESTFILES_S3_BUCKET/beverly.jpg C:\Test\PhotoGroup\beverly.jpg --quiet
- aws s3 cp s3://$TESTFILES_S3_BUCKET/data.jpg C:\Test\PhotoGroup\data.jpg --quiet
- aws s3 cp s3://$TESTFILES_S3_BUCKET/geordi.jpg C:\Test\PhotoGroup\geordi.jpg --quiet
- aws s3 cp s3://$TESTFILES_S3_BUCKET/picard.jpg C:\Test\PhotoGroup\picard.jpg --quiet
- aws s3 cp s3://$TESTFILES_S3_BUCKET/riker.PNG C:\Test\PhotoGroup\riker.PNG --quiet
- aws s3 cp s3://$TESTFILES_S3_BUCKET/troi.jpg C:\Test\PhotoGroup\troi.jpg --quiet
- aws s3 cp s3://$TESTFILES_S3_BUCKET/worf.jpg C:\Test\PhotoGroup\worf.jpg --quiet
- aws s3 cp s3://$TESTFILES_S3_BUCKET/Photo.jpg C:\Test\Photos\Photo.jpg --quiet
- aws s3 cp s3://$TESTFILES_S3_BUCKET/first_contact.mp4 C:\Test\VideoGroup\first_contact.mp4 --quiet
- aws s3 cp s3://$TESTFILES_S3_BUCKET/root_beer.mp4 C:\Test\VideoGroup\root_beer.mp4 --quiet
- aws s3 cp s3://$TESTFILES_S3_BUCKET/Intro.mp4 C:\Test\Videos\Intro.mp4 --quiet
- aws s3 cp s3://$TESTFILES_S3_BUCKET/picard.webp C:\Test\Stickers\picard.webp --quiet
- aws s3 cp s3://$TESTFILES_S3_BUCKET/picard.webp C:\Test\Stickers\videosticker.webm --quiet
- aws s3 cp s3://$TESTFILES_S3_BUCKET/picard.webp C:\Test\Stickers\videosticker2.webm --quiet
- aws s3 cp s3://$TESTFILES_S3_BUCKET/picard.webp C:\Test\Stickers\animatedsticker.tgs --quiet
#- '& "C:\Program Files\PowerShell\6\pwsh.exe" -command ''Invoke-Build -File .\src\PoshGram.build.Settings.ps1 -Task ValidateUniqueModuleVersion'''
- pwsh -command '$PSVersionTable'
build:
commands:
- pwsh -command 'Start-Sleep -Seconds 630'
- pwsh -command 'Invoke-Build -File .\src\PoshGram.build.ps1'
artifacts:
files:
- '**/*'
base-directory: 'src\Archive'