Skip to content

Commit 4e81b0c

Browse files
committed
added imecos environment
1 parent 84ecac6 commit 4e81b0c

File tree

4 files changed

+463
-2
lines changed

4 files changed

+463
-2
lines changed
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
name: .NET BOT D1 BUILD ECHO
2+
3+
on:
4+
push:
5+
branches:
6+
- 'master'
7+
paths:
8+
- './Samples/PublicSamples/EchoBot/src/**'
9+
- .github/workflows/echobot-build-ECHO.yml
10+
11+
pull_request:
12+
branches:
13+
- 'master'
14+
paths:
15+
- './Samples/PublicSamples/EchoBot/src/**'
16+
- .github/workflows/echobot-build-ECHO.yml
17+
18+
workflow_dispatch:
19+
20+
env:
21+
# /home/runner/work/publish
22+
Base: publish
23+
Component: EchoBot
24+
BuildName: 0.1.${{ github.run_number }}
25+
Environment: D1
26+
OrgName: ECHO
27+
Location: centralus
28+
29+
jobs:
30+
build:
31+
32+
runs-on: windows-latest
33+
34+
steps:
35+
- uses: actions/checkout@v2
36+
37+
- name: Setup MSBuild
38+
uses: microsoft/setup-msbuild@v1
39+
40+
- name: Navigate to Workspace
41+
run: cd $GITHUB_WORKSPACE
42+
43+
- name: Run pwsh
44+
shell: pwsh
45+
run: |
46+
echo "${{ env.Base }}/${{ env.Component }}/${{ env.BuildName }}/"
47+
- uses: nuget/setup-nuget@v1
48+
- run: nuget restore Samples\PublicSamples\EchoBot\src\EchoBot.sln
49+
50+
- name: Create Build Directory
51+
run: mkdir ${{ env.Base }}/${{ env.Component }}/${{ env.BuildName }}/
52+
53+
- name: Build Solution
54+
run: |
55+
msbuild.exe Samples\PublicSamples\EchoBot\src\EchoBot.sln /nologo /p:platform="x64" /p:OutDir=${{ github.workspace }}/${{ env.Base }}/${{ env.Component }}/${{ env.BuildName }}/
56+
57+
- name: Run pwsh
58+
shell: pwsh
59+
run: |
60+
Get-ChildItem -Path ${{ github.workspace }}\${{ env.Base }}\${{ env.Component }}\${{ env.BuildName }}\
61+
echo ${{ github.workspace }}
62+
63+
- name: Login via Az module
64+
uses: azure/login@v2
65+
with:
66+
creds: ${{ secrets.AZURE_CREDENTIALS_ECHO_BOT }}
67+
enable-AzPSSession: true
68+
69+
- name: G1_RG_UploadArtifacts_to_Blob
70+
uses: Azure/powershell@v2
71+
with:
72+
inlineScript: |
73+
Get-ChildItem -Path ./${{ env.Base }}/${{ env.Component }}/${{ env.BuildName }}/ # -Recurse
74+
75+
$Params = @{
76+
App = 'BOT'
77+
BuildName = $env:BuildName
78+
ComponentName = $env:Component
79+
BasePath = $env:Base
80+
OrgName = $env:OrgName
81+
Location = $env:location
82+
}
83+
& ./Samples/PublicSamples/EchoBot/ADF/release-az/Sync-AzBuildComponent.ps1 @Params
84+
azPSVersion: latest
85+
86+
- name: G1_RG_UpdateBuildMeta_to_Blob
87+
uses: Azure/powershell@v2
88+
with:
89+
inlineScript: |
90+
echo $home
91+
ls $home
92+
93+
$Params = @{
94+
App = 'BOT'
95+
BuildName = $env:BuildName
96+
ComponentName = $env:Component
97+
BasePath = $env:Base
98+
OrgName = $env:OrgName
99+
Location = $env:location
100+
Environment = $env:Environment
101+
}
102+
& ./Samples/PublicSamples/EchoBot/ADF/release-az/Update-AzBuildMetaData.ps1 @Params
103+
azPSVersion: latest
104+
105+
106+
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: .NET BOT D1 INFRA ECHO
2+
3+
# Controls when the action will run.
4+
on:
5+
# Triggers the workflow on push or pull request events but only for the main branch
6+
# https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows
7+
push:
8+
branches:
9+
- 'master'
10+
paths:
11+
- './Samples/PublicSamples/EchoBot/ADF/**'
12+
- .github/workflows/echobot-infra-ECHO.yml
13+
14+
pull_request:
15+
branches:
16+
- 'master'
17+
paths:
18+
- './Samples/PublicSamples/EchoBot/ADF/**'
19+
- .github/workflows/echobot-infra-ECHO.yml
20+
21+
# Allows you to run this workflow manually from the Actions tab
22+
workflow_dispatch:
23+
24+
env:
25+
OrgName: ECHO
26+
Location: centralus
27+
28+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
29+
jobs:
30+
EnvironmentDeploy:
31+
runs-on: windows-latest
32+
33+
steps:
34+
- name: Checkout
35+
uses: actions/checkout@v2
36+
37+
- name: Login via Az module
38+
uses: azure/login@v2
39+
with:
40+
creds: ${{secrets.AZURE_CREDENTIALS_ECHO_BOT}}
41+
enable-AzPSSession: true
42+
43+
- name: Deploy_All_Subscription
44+
uses: Azure/powershell@v2
45+
with:
46+
azPSVersion: latest
47+
inlineScript: |
48+
$Params = @{
49+
OrgName = $env:OrgName
50+
Location = $env:location
51+
FullUpload = $true
52+
}
53+
./Samples/PublicSamples/EchoBot/ADF/main.ps1 @Params
54+
if ($e){throw $e}
55+
56+
57+

0 commit comments

Comments
 (0)