Skip to content

Commit 3c40e14

Browse files
author
AWS Scripting Guy
committed
adding new resources to support Azure DevOps CI
1 parent 8c1e04a commit 3c40e14

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

azure-pipelines.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,9 @@ steps:
6565
displayName: 'package into .vsix'
6666

6767
- powershell: |
68-
git status
69-
git show
70-
git log --oneline
71-
git push
68+
.\scripts\git-package.ps1
69+
env:
70+
BUILD_REASON: $(Build.Reason)
7271
displayName: "push updated package.json to remote git"
7372

7473
- task: CopyFiles@2
@@ -77,7 +76,9 @@ steps:
7776
Contents: |
7877
**\*.vsix
7978
**\package.json
79+
**\images\ManagementTools_CloudFormation.png
8080
TargetFolder: '$(Build.ArtifactStagingDirectory)'
81+
flattenFolders: false
8182

8283
- task: PublishBuildArtifacts@1
8384
displayName: 'Publish Artifact'

scripts/git-package.ps1

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Write package.json back to github only for release builds
2+
3+
write-host "[info] Build reason is: $env:BUILD_REASON "
4+
5+
if ($env:BUILD_REASON -eq "Schedule") {
6+
# write package.json back to repo
7+
git show
8+
git log --oneline
9+
git push
10+
}
11+
else {
12+
# do nothing
13+
write-host "[info] this is not a scheduled build. Build reason is $env:BUILD_REASON "
14+
}

0 commit comments

Comments
 (0)