diff --git a/.github/workflows/master_inlineapp.yml b/.github/workflows/master_inlineapp.yml new file mode 100644 index 0000000..3863acf --- /dev/null +++ b/.github/workflows/master_inlineapp.yml @@ -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: . \ No newline at end of file diff --git a/.github/workflows/master_suji123.yml b/.github/workflows/master_suji123.yml new file mode 100644 index 0000000..322aa75 --- /dev/null +++ b/.github/workflows/master_suji123.yml @@ -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: . \ No newline at end of file diff --git a/.github/workflows/master_testapphelloworld.yml b/.github/workflows/master_testapphelloworld.yml new file mode 100644 index 0000000..cd756d1 --- /dev/null +++ b/.github/workflows/master_testapphelloworld.yml @@ -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: . \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..0e6bf97 --- /dev/null +++ b/README.md @@ -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 diff --git a/Startup.cs b/Startup.cs index e1725e1..fd41b58 100644 --- a/Startup.cs +++ b/Startup.cs @@ -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!"); }); } } diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000..6a9684e --- /dev/null +++ b/azure-pipelines.yml @@ -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)' diff --git a/dotnet-core-hello-world.csproj b/dotnet-core-hello-world.csproj index ec593e0..ed2505a 100755 --- a/dotnet-core-hello-world.csproj +++ b/dotnet-core-hello-world.csproj @@ -3,7 +3,7 @@ netcoreapp2.1 portable - dotnet-core-hello-world + dotnet-core-Hello-World Exe dotnet-core-hello-world