Skip to content

Commit 6a3c95c

Browse files
committed
new branch and saved files
1 parent 79ad5f4 commit 6a3c95c

File tree

3 files changed

+137
-2
lines changed

3 files changed

+137
-2
lines changed

.github/workflows/first-workflow.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
2+
#name: First Workflow
3+
4+
#on:
5+
# workflow_dispatch:
6+
7+
#jobs:
8+
# job1:
9+
# runs-on: ubuntu-latest
10+
# steps:
11+
# - name: Echo Job 1
12+
# run: echo "This is Job 1"
13+
14+
# job2:
15+
# runs-on: ubuntu-latest
16+
# steps:
17+
# - name: Echo Job 2
18+
# run: echo "This is Job 2"
19+
20+
name: First Workflow
21+
22+
on:
23+
workflow_dispatch:
24+
issues:
25+
types: [opened]
26+
27+
jobs:
28+
job1:
29+
runs-on: ubuntu-latest
30+
31+
steps:
32+
- name: Step one
33+
run: echo "Log from step one"
34+
- name: Step two
35+
run: echo "Log from step two"
36+
37+
job2:
38+
needs: job1
39+
runs-on: ubuntu-latest
40+
41+
steps:
42+
- name: Cowsays
43+
uses: mscoutermarsh/cowsays-action@master
44+
with:
45+
text: 'Ready for prod--ship it!'
46+
color: 'magenta'

src/Application/src/RazorPagesTestSample/Data/Message.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ public class Message
99

1010
[Required]
1111
[DataType(DataType.Text)]
12+
// /doc
1213
[StringLength(200, ErrorMessage = "There's a 200 character limit on messages. Please shorten your message.")]
1314
public string Text { get; set; }
1415
}

src/InfrastructureAsCode/main.bicep

Lines changed: 90 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,98 @@ var webAppName = '${uniqueString(resourceGroup().id)}-${environment}'
88
var appServicePlanName = '${uniqueString(resourceGroup().id)}-mpnp-asp'
99
var logAnalyticsName = '${uniqueString(resourceGroup().id)}-mpnp-la'
1010
var appInsightsName = '${uniqueString(resourceGroup().id)}-mpnp-ai'
11-
var sku = 'S1'
11+
var sku = 'P0V3'
1212
var registryName = '${uniqueString(resourceGroup().id)}mpnpreg'
1313
var registrySku = 'Standard'
1414
var imageName = 'techexcel/dotnetcoreapp'
1515
var startupCommand = ''
1616

17-
// TODO: complete this script
17+
18+
resource logAnalyticsWorkspace 'Microsoft.OperationalInsights/workspaces@2021-12-01-preview' = {
19+
name: logAnalyticsName
20+
location: location
21+
properties: {
22+
sku: {
23+
name: 'PerGB2018'
24+
}
25+
retentionInDays: 90
26+
workspaceCapping: {
27+
dailyQuotaGb: 1
28+
}
29+
}
30+
}
31+
32+
resource appInsights 'Microsoft.Insights/components@2020-02-02-preview' = {
33+
name: appInsightsName
34+
location: location
35+
kind: 'web'
36+
properties: {
37+
Application_Type: 'web'
38+
WorkspaceResourceId: logAnalyticsWorkspace.id
39+
}
40+
}
41+
42+
resource containerRegistry 'Microsoft.ContainerRegistry/registries@2020-11-01-preview' = {
43+
name: registryName
44+
location: location
45+
sku: {
46+
name: registrySku
47+
}
48+
properties: {
49+
adminUserEnabled: true
50+
}
51+
}
52+
53+
resource appServicePlan 'Microsoft.Web/serverFarms@2022-09-01' = {
54+
name: appServicePlanName
55+
location: location
56+
kind: 'linux'
57+
properties: {
58+
reserved: true
59+
}
60+
sku: {
61+
name: sku
62+
}
63+
}
64+
65+
resource appServiceApp 'Microsoft.Web/sites@2020-12-01' = {
66+
name: webAppName
67+
location: location
68+
properties: {
69+
serverFarmId: appServicePlan.id
70+
httpsOnly: true
71+
clientAffinityEnabled: false
72+
siteConfig: {
73+
linuxFxVersion: 'DOCKER|${containerRegistry.name}.azurecr.io/${uniqueString(resourceGroup().id)}/${imageName}'
74+
http20Enabled: true
75+
minTlsVersion: '1.2'
76+
appCommandLine: startupCommand
77+
appSettings: [
78+
{
79+
name: 'WEBSITES_ENABLE_APP_SERVICE_STORAGE'
80+
value: 'false'
81+
}
82+
{
83+
name: 'DOCKER_REGISTRY_SERVER_URL'
84+
value: 'https://${containerRegistry.name}.azurecr.io'
85+
}
86+
{
87+
name: 'DOCKER_REGISTRY_SERVER_USERNAME'
88+
value: containerRegistry.name
89+
}
90+
{
91+
name: 'DOCKER_REGISTRY_SERVER_PASSWORD'
92+
value: containerRegistry.listCredentials().passwords[0].value
93+
}
94+
{
95+
name: 'APPINSIGHTS_INSTRUMENTATIONKEY'
96+
value: appInsights.properties.InstrumentationKey
97+
}
98+
]
99+
}
100+
}
101+
}
102+
103+
output application_name string = appServiceApp.name
104+
output application_url string = appServiceApp.properties.hostNames[0]
105+
output container_registry_name string = containerRegistry.name

0 commit comments

Comments
 (0)