Skip to content

Commit

Permalink
Users/balaga gayatri/prchecksrepo (#163)
Browse files Browse the repository at this point in the history
* Create intergation-tests.yml

* Create InvokeL2RepoDispatchEvent.sh

* Update intergation-tests.yml

* Update InvokeL2RepoDispatchEvent.sh

* Update intergation-tests.yml

* Delete InvokeL2RepoDispatchEvent.sh

* Delete intergation-tests.yml

* Create webapp_dotnet_windows_code.yml

* Update webapp_dotnet_windows_code.yml

* Update webapp_dotnet_windows_code.yml

* Update webapp_dotnet_windows_code.yml

* Update webapp_dotnet_windows_code.yml

* Create webapp_python_linux_code.yml

* Delete webapp_dotnet_windows_code.yml

* Update webapp_python_linux_code.yml

* Update webapp_python_linux_code.yml

* Update webapp_python_linux_code.yml

* Update webapp_python_linux_code.yml

* Update webapp_python_linux_code.yml

* Update webapp_python_linux_code.yml

* Update webapp_python_linux_code.yml

* Update webapp_python_linux_code.yml

* Update webapp_python_linux_code.yml

* Update and rename webapp_python_linux_code.yml to pr_check_webapp_dotnet_windows.yml

* Update pr_check_webapp_dotnet_windows.yml

* Update pr_check_webapp_dotnet_windows.yml

Added automation test environment

* Update pr_check_webapp_dotnet_windows.yml

* Update pr_check_webapp_dotnet_windows.yml

* Update pr_check_webapp_dotnet_windows.yml

* Update pr_check_webapp_dotnet_windows.yml

* Update pr_check_webapp_dotnet_windows.yml

* Update pr_check_webapp_dotnet_windows.yml

* Create pr_check_windows_container_pubprofile.yml

* Update pr_check_windows_container_pubprofile.yml

* Update pr_check_windows_container_pubprofile.yml

* Update pr_check_windows_container_pubprofile.yml

* Update pr_check_webapp_dotnet_windows.yml

* Update pr_check_windows_container_pubprofile.yml

Co-authored-by: Kanika Pasrija <[email protected]>
  • Loading branch information
BALAGA-GAYATRI and kanika1894 authored Jul 26, 2021
1 parent 45c59f7 commit 5604db5
Show file tree
Hide file tree
Showing 2 changed files with 173 additions and 0 deletions.
83 changes: 83 additions & 0 deletions .github/workflows/pr_check_webapp_dotnet_windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: pr_check_webapp_dotnet_windows

on:
push:
branches:
- master
- releases/*
paths-ignore:
- '**.md'
pull_request_target:
branches:
- master
- 'releases/*'

# CONFIGURATION
# For help, go to https://github.com/Azure/Actions
#
# 1. Set up the following secrets in your repository:
# AZURE_WEBAPP_PUBLISH_PROFILE
#
# 2. Change these variables for your configuration:
env:
AZURE_WEBAPP_NAME: dotnetwebapplima # set this to your application's name
AZURE_WEBAPP_PACKAGE_PATH: '.' # set this to the path to your web app project, defaults to the repository root
NUGET_VERSION: '5.3.1' # set this to the node version to use

jobs:
run-integration-test:
environment: automation test
name: Validate PR
strategy:
matrix:
os: [windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2

- uses: actions/checkout@master
with:
repository: Azure-Samples/dotnet-sample
ref: master
path: 'dotnetsample'

- name: Install Nuget
uses: nuget/setup-nuget@v1
with:
nuget-version: ${{ env.NUGET_VERSION}}
- name: NuGet to restore dependencies as well as project-specific tools that are specified in the project file
run: |
pwd
cd dotnetsample
nuget restore
- name: Add msbuild to PATH
uses: microsoft/[email protected]

- name: Run MSBuild
run: msbuild .\dotnetsample\SampleWebApplication.sln

- uses: actions/checkout@v2
name: Checkout from PR branch
with:
repository: Azure/webapps-deploy
path: 'webapps-deploy'

- name: Installing dependencies and building latest changes
run: |
cd webapps-deploy
npm install
npm run build
- name: Azure authentication
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_WEBAPP_SPN }}

- name: 'Deploy to Azure WebApp'
uses: ./webapps-deploy/
with:
app-name: ${{ env.AZURE_WEBAPP_NAME }} # Replace with your app name
#publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }} # Define secret variable in repository settings as per action documentation
package: 'D:\a\webapps-deploy\webapps-deploy\dotnetsample\SampleWebApplication\'
90 changes: 90 additions & 0 deletions .github/workflows/pr_check_windows_container_pubprofile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: pr_check_windows_container_publishprofile

on:
push:
branches:
- master
- releases/*
paths-ignore:
- '**.md'
pull_request_target:
branches:
- master
- 'releases/*'

env:
AZURE_WEBAPP_NAME: windowscontainerwebapp # set this to your application's name
CONTAINER_REGISTRY: l2testscontainerregistry.azurecr.io # set secret with Container Registry URL, example : xyz.azurecr.io

jobs:
build-and-deploy:
environment: automation test
name: Validate PR
runs-on: windows-latest
steps:
# checkout the repo
- name: 'Checkout Github Action'
uses: actions/checkout@master
with:
repository: GH-ACE/python_container_App
ref: main
path: 'python_container_App'

- name: Azure authentication
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_WEBAPP_SPN }}

- uses: azure/docker-login@v1
with:
login-server: l2testscontainerregistry.azurecr.io
username: ${{ secrets.L2TEST_ACR_USERNAME }}
password: ${{ secrets.L2TEST_ACR_PASSWORD }}

- run: |
pwd
cd python_container_App
docker pull mcr.microsoft.com/azure-app-service/windows/canary:5.0-nanoserver
docker tag mcr.microsoft.com/azure-app-service/windows/canary:5.0-nanoserver ${{ env.CONTAINER_REGISTRY }}/containerwebapp/canaryreplica:latest
docker push ${{ env.CONTAINER_REGISTRY }}/containerwebapp/canaryreplica:latest
- name: Set Web App ACR authentication
uses: Azure/appservice-settings@v1
with:
app-name: ${{ env.AZURE_WEBAPP_NAME }}
app-settings-json: |
[
{
"name": "DOCKER_REGISTRY_SERVER_PASSWORD",
"value": "${{ secrets.L2TEST_ACR_PASSWORD }}",
"slotSetting": false
},
{
"name": "DOCKER_REGISTRY_SERVER_URL",
"value": "https://${{ env.CONTAINER_REGISTRY }}",
"slotSetting": false
},
{
"name": "DOCKER_REGISTRY_SERVER_USERNAME",
"value": "${{ secrets.L2TEST_ACR_USERNAME }}",
"slotSetting": false
}
]
- uses: actions/checkout@v2
name: Checkout from PR branch
with:
repository: Azure/webapps-deploy
path: 'webapps-deploy'

- name: Installing dependencies and building latest changes in action
run: |
cd webapps-deploy
npm install
npm run build
- name: 'Deploy to Azure WebApp'
uses: ./webapps-deploy/
with:
app-name: ${{ env.AZURE_WEBAPP_NAME }} # Replace with your app name
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
images: ${{ env.CONTAINER_REGISTRY }}/containerwebapp/canaryreplica:latest

0 comments on commit 5604db5

Please sign in to comment.