Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added readme file #8

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open
56 changes: 56 additions & 0 deletions .github/workflows/master_inlineapp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
# More GitHub Actions for Azure: https://github.com/Azure/actions

name: Build and deploy ASP.Net Core app to Azure Web App - inlineapp

on:
push:
branches:
- master
workflow_dispatch:

jobs:
build:
runs-on: windows-latest

steps:
- uses: actions/checkout@v2

- name: Set up .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.301'

- name: Build with dotnet
run: dotnet build --configuration Release

- name: dotnet publish
run: dotnet publish -c Release -o ${{env.DOTNET_ROOT}}/myapp

- name: Upload artifact for deployment job
uses: actions/upload-artifact@v2
with:
name: .net-app
path: ${{env.DOTNET_ROOT}}/myapp

deploy:
runs-on: windows-latest
needs: build
environment:
name: 'production'
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}

steps:
- name: Download artifact from build job
uses: actions/download-artifact@v2
with:
name: .net-app

- name: Deploy to Azure Web App
id: deploy-to-webapp
uses: azure/webapps-deploy@v2
with:
app-name: 'inlineapp'
slot-name: 'production'
publish-profile: ${{ secrets.AzureAppService_PublishProfile_c38e2d3576f04e198b2bcb71ce5907ed }}
package: .
56 changes: 56 additions & 0 deletions .github/workflows/master_suji123.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
# More GitHub Actions for Azure: https://github.com/Azure/actions

name: Build and deploy ASP.Net Core app to Azure Web App - suji123

on:
push:
branches:
- master
workflow_dispatch:

jobs:
build:
runs-on: windows-latest

steps:
- uses: actions/checkout@v2

- name: Set up .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.301'

- name: Build with dotnet
run: dotnet build --configuration Release

- name: dotnet publish
run: dotnet publish -c Release -o ${{env.DOTNET_ROOT}}/myapp

- name: Upload artifact for deployment job
uses: actions/upload-artifact@v2
with:
name: .net-app
path: ${{env.DOTNET_ROOT}}/myapp

deploy:
runs-on: windows-latest
needs: build
environment:
name: 'production'
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}

steps:
- name: Download artifact from build job
uses: actions/download-artifact@v2
with:
name: .net-app

- name: Deploy to Azure Web App
id: deploy-to-webapp
uses: azure/webapps-deploy@v2
with:
app-name: 'suji123'
slot-name: 'production'
publish-profile: ${{ secrets.AzureAppService_PublishProfile_a0931e60f2614faaa4cc3621d1d6643d }}
package: .
56 changes: 56 additions & 0 deletions .github/workflows/master_testapphelloworld.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
# More GitHub Actions for Azure: https://github.com/Azure/actions

name: Build and deploy ASP.Net Core app to Azure Web App - testapphelloworld

on:
push:
branches:
- master
workflow_dispatch:

jobs:
build:
runs-on: windows-latest

steps:
- uses: actions/checkout@v2

- name: Set up .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.301'

- name: Build with dotnet
run: dotnet build --configuration Release

- name: dotnet publish
run: dotnet publish -c Release -o ${{env.DOTNET_ROOT}}/myapp

- name: Upload artifact for deployment job
uses: actions/upload-artifact@v2
with:
name: .net-app
path: ${{env.DOTNET_ROOT}}/myapp

deploy:
runs-on: windows-latest
needs: build
environment:
name: 'production'
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}

steps:
- name: Download artifact from build job
uses: actions/download-artifact@v2
with:
name: .net-app

- name: Deploy to Azure Web App
id: deploy-to-webapp
uses: azure/webapps-deploy@v2
with:
app-name: 'testapphelloworld'
slot-name: 'production'
publish-profile: ${{ secrets.AzureAppService_PublishProfile_2a243567dc414dba9ac9c1aaaa01b44a }}
package: .
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[![Build Status](https://dev.azure.com/mgovardhankumar/testpipeline/_apis/build/status/SujithaGM.dotnet-core-hello-world?branchName=master)](https://dev.azure.com/mgovardhankumar/testpipeline/_build/latest?definitionId=3&branchName=master)
#dotnet-core-hello-world
2 changes: 1 addition & 1 deletion Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public void Configure(IApplicationBuilder app)
{
app.Run(context =>
{
return context.Response.WriteAsync("Hello World!");
return context.Response.WriteAsync("Hello Worlds, happy Thursday!");
});
}
}
Expand Down
33 changes: 33 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# .NET Desktop
# Build and run tests for .NET Desktop or Windows classic desktop solutions.
# Add steps that publish symbols, save build artifacts, and more:
# https://docs.microsoft.com/azure/devops/pipelines/apps/windows/dot-net

trigger:
- master

pool:
vmImage: 'windows-latest'

variables:
solution: '**/*.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'

steps:
- task: NuGetToolInstaller@1

- task: NuGetCommand@2
inputs:
restoreSolution: '$(solution)'

- task: VSBuild@1
inputs:
solution: '$(solution)'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'

- task: VSTest@2
inputs:
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
2 changes: 1 addition & 1 deletion dotnet-core-hello-world.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<DebugType>portable</DebugType>
<AssemblyName>dotnet-core-hello-world</AssemblyName>
<AssemblyName>dotnet-core-Hello-World</AssemblyName>
<OutputType>Exe</OutputType>
<PackageId>dotnet-core-hello-world</PackageId>
</PropertyGroup>
Expand Down