From e76f8e399994cfb0b8b412664e87ee120267ed02 Mon Sep 17 00:00:00 2001 From: Balaga Gayatri Date: Thu, 20 May 2021 15:34:03 +0530 Subject: [PATCH 01/38] Create intergation-tests.yml --- .github/workflows/intergation-tests.yml | 33 +++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/intergation-tests.yml diff --git a/.github/workflows/intergation-tests.yml b/.github/workflows/intergation-tests.yml new file mode 100644 index 000000000..88ba62d93 --- /dev/null +++ b/.github/workflows/intergation-tests.yml @@ -0,0 +1,33 @@ +name: "Trigger Integration tests" +on: + push: + branches: + - master + - 'releases/*' + pull_request: + branches: + - master + - 'releases/*' +jobs: + trigger-integration-tests: + name: Trigger Integration tests + runs-on: ubuntu-latest + steps: + - name: Check out repository + uses: actions/checkout@v2 + with: + path: IntegrationTests + + - name: Extract branch name + id: extract_branch + run: | + echo "##[set-output name=branchname;]$(echo ${GITHUB_REF##*/})" + + - name: Trigger Test run + if: | + github.event.pull_request.base.ref == 'releases/v0' || steps.extract_branch.outputs.branchname == 'releases/v0' || + github.event.pull_request.base.ref == 'releases/v1' || steps.extract_branch.outputs.branchname == 'releases/v1' || + github.event.pull_request.base.ref == 'releases/v2' || steps.extract_branch.outputs.branchname == 'releases/v2' || + github.event.pull_request.base.ref == 'main' || steps.extract_branch.outputs.branchname == 'main' + run: | + bash ./IntegrationTests/.github/workflows/InvokeL2RepoDispatchEvent.sh ${{ secrets.L2_REPO_TOKEN }} ${{ github.event.pull_request.head.sha }} ${{ github.repository }} ${{ github.event.pull_request.number }} ${{ github.event.pull_request.head.ref }} ${{ github.event.pull_request.base.ref }} ${{ secrets.L2_REPO_USER }} From 272d46af8a435cb64aeec5e427aa4d0a278cb195 Mon Sep 17 00:00:00 2001 From: Balaga Gayatri Date: Thu, 20 May 2021 15:37:06 +0530 Subject: [PATCH 02/38] Create InvokeL2RepoDispatchEvent.sh --- .../workflows/InvokeL2RepoDispatchEvent.sh | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/InvokeL2RepoDispatchEvent.sh diff --git a/.github/workflows/InvokeL2RepoDispatchEvent.sh b/.github/workflows/InvokeL2RepoDispatchEvent.sh new file mode 100644 index 000000000..ee579f761 --- /dev/null +++ b/.github/workflows/InvokeL2RepoDispatchEvent.sh @@ -0,0 +1,32 @@ +token=$1 +commit=$2 +repository=$3 +prNumber=$4 +frombranch=$5 +tobranch=$6 +patUser=$7 +getPayLoad() { + cat < Date: Thu, 20 May 2021 15:37:56 +0530 Subject: [PATCH 03/38] Update intergation-tests.yml --- .github/workflows/intergation-tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/intergation-tests.yml b/.github/workflows/intergation-tests.yml index 88ba62d93..88bd37399 100644 --- a/.github/workflows/intergation-tests.yml +++ b/.github/workflows/intergation-tests.yml @@ -8,6 +8,7 @@ on: branches: - master - 'releases/*' + - 'users/balaga-gayatri/prchecks' jobs: trigger-integration-tests: name: Trigger Integration tests From 16aec8152887bf6ad8e1299e7a4d64e9b7e95f04 Mon Sep 17 00:00:00 2001 From: Balaga Gayatri Date: Thu, 20 May 2021 15:57:04 +0530 Subject: [PATCH 04/38] Update InvokeL2RepoDispatchEvent.sh --- .github/workflows/InvokeL2RepoDispatchEvent.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/InvokeL2RepoDispatchEvent.sh b/.github/workflows/InvokeL2RepoDispatchEvent.sh index ee579f761..4f3454573 100644 --- a/.github/workflows/InvokeL2RepoDispatchEvent.sh +++ b/.github/workflows/InvokeL2RepoDispatchEvent.sh @@ -8,7 +8,7 @@ patUser=$7 getPayLoad() { cat < Date: Fri, 21 May 2021 10:23:17 +0530 Subject: [PATCH 05/38] Update intergation-tests.yml --- .github/workflows/intergation-tests.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/intergation-tests.yml b/.github/workflows/intergation-tests.yml index 88bd37399..0508040b5 100644 --- a/.github/workflows/intergation-tests.yml +++ b/.github/workflows/intergation-tests.yml @@ -29,6 +29,7 @@ jobs: github.event.pull_request.base.ref == 'releases/v0' || steps.extract_branch.outputs.branchname == 'releases/v0' || github.event.pull_request.base.ref == 'releases/v1' || steps.extract_branch.outputs.branchname == 'releases/v1' || github.event.pull_request.base.ref == 'releases/v2' || steps.extract_branch.outputs.branchname == 'releases/v2' || - github.event.pull_request.base.ref == 'main' || steps.extract_branch.outputs.branchname == 'main' + github.event.pull_request.base.ref == 'users/balaga-gayatri/prchecks' || steps.extract_branch.outputs.branchname == 'users/balaga-gayatri/prchecks' || + github.event.pull_request.base.ref == 'master' || steps.extract_branch.outputs.branchname == 'master' run: | bash ./IntegrationTests/.github/workflows/InvokeL2RepoDispatchEvent.sh ${{ secrets.L2_REPO_TOKEN }} ${{ github.event.pull_request.head.sha }} ${{ github.repository }} ${{ github.event.pull_request.number }} ${{ github.event.pull_request.head.ref }} ${{ github.event.pull_request.base.ref }} ${{ secrets.L2_REPO_USER }} From 541c0ddd266c7e541ab6021539ab0d4101a726a0 Mon Sep 17 00:00:00 2001 From: Balaga Gayatri Date: Sun, 23 May 2021 21:02:19 +0530 Subject: [PATCH 06/38] Delete InvokeL2RepoDispatchEvent.sh --- .../workflows/InvokeL2RepoDispatchEvent.sh | 32 ------------------- 1 file changed, 32 deletions(-) delete mode 100644 .github/workflows/InvokeL2RepoDispatchEvent.sh diff --git a/.github/workflows/InvokeL2RepoDispatchEvent.sh b/.github/workflows/InvokeL2RepoDispatchEvent.sh deleted file mode 100644 index 4f3454573..000000000 --- a/.github/workflows/InvokeL2RepoDispatchEvent.sh +++ /dev/null @@ -1,32 +0,0 @@ -token=$1 -commit=$2 -repository=$3 -prNumber=$4 -frombranch=$5 -tobranch=$6 -patUser=$7 -getPayLoad() { - cat < Date: Sun, 23 May 2021 21:03:00 +0530 Subject: [PATCH 07/38] Delete intergation-tests.yml --- .github/workflows/intergation-tests.yml | 35 ------------------------- 1 file changed, 35 deletions(-) delete mode 100644 .github/workflows/intergation-tests.yml diff --git a/.github/workflows/intergation-tests.yml b/.github/workflows/intergation-tests.yml deleted file mode 100644 index 0508040b5..000000000 --- a/.github/workflows/intergation-tests.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: "Trigger Integration tests" -on: - push: - branches: - - master - - 'releases/*' - pull_request: - branches: - - master - - 'releases/*' - - 'users/balaga-gayatri/prchecks' -jobs: - trigger-integration-tests: - name: Trigger Integration tests - runs-on: ubuntu-latest - steps: - - name: Check out repository - uses: actions/checkout@v2 - with: - path: IntegrationTests - - - name: Extract branch name - id: extract_branch - run: | - echo "##[set-output name=branchname;]$(echo ${GITHUB_REF##*/})" - - - name: Trigger Test run - if: | - github.event.pull_request.base.ref == 'releases/v0' || steps.extract_branch.outputs.branchname == 'releases/v0' || - github.event.pull_request.base.ref == 'releases/v1' || steps.extract_branch.outputs.branchname == 'releases/v1' || - github.event.pull_request.base.ref == 'releases/v2' || steps.extract_branch.outputs.branchname == 'releases/v2' || - github.event.pull_request.base.ref == 'users/balaga-gayatri/prchecks' || steps.extract_branch.outputs.branchname == 'users/balaga-gayatri/prchecks' || - github.event.pull_request.base.ref == 'master' || steps.extract_branch.outputs.branchname == 'master' - run: | - bash ./IntegrationTests/.github/workflows/InvokeL2RepoDispatchEvent.sh ${{ secrets.L2_REPO_TOKEN }} ${{ github.event.pull_request.head.sha }} ${{ github.repository }} ${{ github.event.pull_request.number }} ${{ github.event.pull_request.head.ref }} ${{ github.event.pull_request.base.ref }} ${{ secrets.L2_REPO_USER }} From d318db9ac262729ab02da209d0ecd54a19014f3b Mon Sep 17 00:00:00 2001 From: Balaga Gayatri Date: Mon, 24 May 2021 13:29:04 +0530 Subject: [PATCH 08/38] Create webapp_dotnet_windows_code.yml --- .../workflows/webapp_dotnet_windows_code.yml | 96 +++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 .github/workflows/webapp_dotnet_windows_code.yml diff --git a/.github/workflows/webapp_dotnet_windows_code.yml b/.github/workflows/webapp_dotnet_windows_code.yml new file mode 100644 index 000000000..db937c840 --- /dev/null +++ b/.github/workflows/webapp_dotnet_windows_code.yml @@ -0,0 +1,96 @@ +name: check_Webapp_Dotnet_Windows + +on: + push: + branches: + - master + - dev + - releases/* + paths-ignore: + - '**.md' + pull_request: + braches: + - users/balaga-gayatri/commit-message-fix + paths-ignore: + - '**.md' + +# 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: + build-and-deploy: + name: Build and Deploy + runs-on: windows-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Set Node.js 12.x for GitHub Action + uses: actions/setup-node@v1 + with: + node-version: 12.x + + - name: Run Npm Install for GitHub Action + run: npm install + + - name: Build GitHub Action + run: npm run build + + - uses: actions/checkout@master + with: + repository: Azure-Samples/dotnet-sample +# token: ${{ secrets.GITSSHKEY }} + ref: master + + - 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: nuget restore + + - name: Add msbuild to PATH + uses: microsoft/setup-msbuild@v1.0.2 + + - name: Run MSBuild + run: msbuild .\SampleWebApplication.sln + + - name: Azure authentication + uses: azure/login@v1 + with: + creds: ${{ secrets.AZURE_WEBAPP_SPN }} + + - name: 'Deploy to Azure WebApp' + uses: ./ + id: webapps + 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: '${{ env.AZURE_WEBAPP_PACKAGE_PATH }}/SampleWebApplication/' + + - name: E2E Check HttpTrigger Result + shell: pwsh + run: | + $i = 0 + while ($i -lt 10) { + sleep 10 + $RESPONSE = $(curl "${{ steps.webapps.outputs.app-url }}/api/HttpTrigger") + $RESULT = ($RESPONSE -eq "$env:GITHUB_SHA") + if ($RESULT) { + exit 0 + } + $i = $i + 1 + } + exit 1 + + # For more information on GitHub Actions for Azure, refer to https://github.com/Azure/Actions + # For more samples to get started with GitHub Action workflows to deploy to Azure, refer to https://github.com/Azure/actions-workflow-samples From ec1adfd5507cadf898211c60fda08fe0b8255e2d Mon Sep 17 00:00:00 2001 From: Balaga Gayatri Date: Mon, 24 May 2021 13:29:55 +0530 Subject: [PATCH 09/38] Update webapp_dotnet_windows_code.yml --- .github/workflows/webapp_dotnet_windows_code.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/webapp_dotnet_windows_code.yml b/.github/workflows/webapp_dotnet_windows_code.yml index db937c840..ec4d28c55 100644 --- a/.github/workflows/webapp_dotnet_windows_code.yml +++ b/.github/workflows/webapp_dotnet_windows_code.yml @@ -90,7 +90,7 @@ jobs: } $i = $i + 1 } - exit 1 + exit 1 # For more information on GitHub Actions for Azure, refer to https://github.com/Azure/Actions # For more samples to get started with GitHub Action workflows to deploy to Azure, refer to https://github.com/Azure/actions-workflow-samples From 1ef02a8234b1c32df906733350fcaab8aaeaa43b Mon Sep 17 00:00:00 2001 From: Balaga Gayatri Date: Mon, 24 May 2021 14:34:17 +0530 Subject: [PATCH 10/38] Update webapp_dotnet_windows_code.yml --- .github/workflows/webapp_dotnet_windows_code.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/webapp_dotnet_windows_code.yml b/.github/workflows/webapp_dotnet_windows_code.yml index ec4d28c55..9af6717a9 100644 --- a/.github/workflows/webapp_dotnet_windows_code.yml +++ b/.github/workflows/webapp_dotnet_windows_code.yml @@ -33,6 +33,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + with: + ref: users/balaga-gayatri/prchecksrepo - name: Set Node.js 12.x for GitHub Action uses: actions/setup-node@v1 From 4eef53e38dd41781bcc525030144e91f87092f7e Mon Sep 17 00:00:00 2001 From: Balaga Gayatri Date: Mon, 24 May 2021 14:41:38 +0530 Subject: [PATCH 11/38] Update webapp_dotnet_windows_code.yml --- .github/workflows/webapp_dotnet_windows_code.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/webapp_dotnet_windows_code.yml b/.github/workflows/webapp_dotnet_windows_code.yml index 9af6717a9..240363a64 100644 --- a/.github/workflows/webapp_dotnet_windows_code.yml +++ b/.github/workflows/webapp_dotnet_windows_code.yml @@ -34,7 +34,7 @@ jobs: - name: Checkout uses: actions/checkout@v2 with: - ref: users/balaga-gayatri/prchecksrepo + ref: users/balaga-gayatri/commit-message-fix - name: Set Node.js 12.x for GitHub Action uses: actions/setup-node@v1 From efd96dd12ffb0c8de25cf794325ad370616d6dca Mon Sep 17 00:00:00 2001 From: Balaga Gayatri Date: Mon, 24 May 2021 14:59:38 +0530 Subject: [PATCH 12/38] Update webapp_dotnet_windows_code.yml --- .github/workflows/webapp_dotnet_windows_code.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/webapp_dotnet_windows_code.yml b/.github/workflows/webapp_dotnet_windows_code.yml index 240363a64..e35c1931d 100644 --- a/.github/workflows/webapp_dotnet_windows_code.yml +++ b/.github/workflows/webapp_dotnet_windows_code.yml @@ -33,8 +33,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - with: - ref: users/balaga-gayatri/commit-message-fix +# with: +# ref: users/balaga-gayatri/commit-message-fix - name: Set Node.js 12.x for GitHub Action uses: actions/setup-node@v1 @@ -47,11 +47,11 @@ jobs: - name: Build GitHub Action run: npm run build - - uses: actions/checkout@master - with: - repository: Azure-Samples/dotnet-sample -# token: ${{ secrets.GITSSHKEY }} - ref: master +# - uses: actions/checkout@master +# with: +# repository: Azure-Samples/dotnet-sample +# # token: ${{ secrets.GITSSHKEY }} +# ref: master - name: Install Nuget uses: nuget/setup-nuget@v1 @@ -77,7 +77,7 @@ jobs: 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: '${{ env.AZURE_WEBAPP_PACKAGE_PATH }}/SampleWebApplication/' + package: 'Azure-Samples/dotnet-sample/SampleWebApplication/' #'${{ env.AZURE_WEBAPP_PACKAGE_PATH }}/SampleWebApplication/' - name: E2E Check HttpTrigger Result shell: pwsh From 9bc574b910200fcf396dec621fb6dfbbbaf8aa23 Mon Sep 17 00:00:00 2001 From: Balaga Gayatri Date: Tue, 1 Jun 2021 14:45:48 +0530 Subject: [PATCH 13/38] Create webapp_python_linux_code.yml --- .../workflows/webapp_python_linux_code.yml | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .github/workflows/webapp_python_linux_code.yml diff --git a/.github/workflows/webapp_python_linux_code.yml b/.github/workflows/webapp_python_linux_code.yml new file mode 100644 index 000000000..4729466f1 --- /dev/null +++ b/.github/workflows/webapp_python_linux_code.yml @@ -0,0 +1,57 @@ +name: check_Webapp_python_linux + +on: + push: + branches: + - master + - dev + - releases/* + paths-ignore: + - '**.md' + pull_request: + braches: + - users/balaga-gayatri/commit-message-fix + paths-ignore: + - '**.md' + +# 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: pyhonwebapplima # 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 + PYTHON_VERSION: '3.7' # set this to the python version to use + +jobs: + build: + name: Build and Deploy + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + with: + repository: Azure-Samples/pythonSample_thecatsaidno +# token: ${{ secrets.GITSSHKEY }} + ref: master + - name: Set up Python ${{ env.PYTHON_VERSION }} + uses: actions/setup-python@v1 + with: + python-version: ${{ env.PYTHON_VERSION }} + - name: Install dependencies + run: | + pwd + python -m pip install --upgrade pip + pip install -r /home/runner/work/azure-actions-integration-tests/pythonSample_thecatsaidno/requirements.txt + - name: Azure authentication + uses: azure/login@v1 + with: + creds: ${{ secrets.AZURE_WEBAPP_SPN }} + - name: Deploy Web App using GH Action azure/webapps-deploy + uses: azure/webapps-deploy@${GITHUB_REF##*/} + with: + app-name: ${{ env.AZURE_WEBAPP_NAME }} + #publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }} + package: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }} From 5b8e30b8957e6e830f123ec1a6f361a513ffc93b Mon Sep 17 00:00:00 2001 From: Balaga Gayatri Date: Tue, 1 Jun 2021 14:49:03 +0530 Subject: [PATCH 14/38] Delete webapp_dotnet_windows_code.yml --- .../workflows/webapp_dotnet_windows_code.yml | 98 ------------------- 1 file changed, 98 deletions(-) delete mode 100644 .github/workflows/webapp_dotnet_windows_code.yml diff --git a/.github/workflows/webapp_dotnet_windows_code.yml b/.github/workflows/webapp_dotnet_windows_code.yml deleted file mode 100644 index e35c1931d..000000000 --- a/.github/workflows/webapp_dotnet_windows_code.yml +++ /dev/null @@ -1,98 +0,0 @@ -name: check_Webapp_Dotnet_Windows - -on: - push: - branches: - - master - - dev - - releases/* - paths-ignore: - - '**.md' - pull_request: - braches: - - users/balaga-gayatri/commit-message-fix - paths-ignore: - - '**.md' - -# 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: - build-and-deploy: - name: Build and Deploy - runs-on: windows-latest - steps: - - name: Checkout - uses: actions/checkout@v2 -# with: -# ref: users/balaga-gayatri/commit-message-fix - - - name: Set Node.js 12.x for GitHub Action - uses: actions/setup-node@v1 - with: - node-version: 12.x - - - name: Run Npm Install for GitHub Action - run: npm install - - - name: Build GitHub Action - run: npm run build - -# - uses: actions/checkout@master -# with: -# repository: Azure-Samples/dotnet-sample -# # token: ${{ secrets.GITSSHKEY }} -# ref: master - - - 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: nuget restore - - - name: Add msbuild to PATH - uses: microsoft/setup-msbuild@v1.0.2 - - - name: Run MSBuild - run: msbuild .\SampleWebApplication.sln - - - name: Azure authentication - uses: azure/login@v1 - with: - creds: ${{ secrets.AZURE_WEBAPP_SPN }} - - - name: 'Deploy to Azure WebApp' - uses: ./ - id: webapps - 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: 'Azure-Samples/dotnet-sample/SampleWebApplication/' #'${{ env.AZURE_WEBAPP_PACKAGE_PATH }}/SampleWebApplication/' - - - name: E2E Check HttpTrigger Result - shell: pwsh - run: | - $i = 0 - while ($i -lt 10) { - sleep 10 - $RESPONSE = $(curl "${{ steps.webapps.outputs.app-url }}/api/HttpTrigger") - $RESULT = ($RESPONSE -eq "$env:GITHUB_SHA") - if ($RESULT) { - exit 0 - } - $i = $i + 1 - } - exit 1 - - # For more information on GitHub Actions for Azure, refer to https://github.com/Azure/Actions - # For more samples to get started with GitHub Action workflows to deploy to Azure, refer to https://github.com/Azure/actions-workflow-samples From 4f7580378a3b6ad8cbbec533a73f6d1315ac38ac Mon Sep 17 00:00:00 2001 From: Balaga Gayatri Date: Tue, 1 Jun 2021 14:59:39 +0530 Subject: [PATCH 15/38] Update webapp_python_linux_code.yml --- .github/workflows/webapp_python_linux_code.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/webapp_python_linux_code.yml b/.github/workflows/webapp_python_linux_code.yml index 4729466f1..4aa898848 100644 --- a/.github/workflows/webapp_python_linux_code.yml +++ b/.github/workflows/webapp_python_linux_code.yml @@ -25,6 +25,7 @@ env: AZURE_WEBAPP_NAME: pyhonwebapplima # 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 PYTHON_VERSION: '3.7' # set this to the python version to use + CURRENT_BRANCH: ${GITHUB_REF##*/} jobs: build: @@ -50,7 +51,7 @@ jobs: with: creds: ${{ secrets.AZURE_WEBAPP_SPN }} - name: Deploy Web App using GH Action azure/webapps-deploy - uses: azure/webapps-deploy@${GITHUB_REF##*/} + uses: azure/webapps-deploy@ ${{ env.CURRENT_BRANCH }} with: app-name: ${{ env.AZURE_WEBAPP_NAME }} #publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }} From 64494096a421d66e0b452528610d9b7bde3852e9 Mon Sep 17 00:00:00 2001 From: Balaga Gayatri Date: Tue, 1 Jun 2021 15:20:05 +0530 Subject: [PATCH 16/38] Update webapp_python_linux_code.yml --- .github/workflows/webapp_python_linux_code.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/webapp_python_linux_code.yml b/.github/workflows/webapp_python_linux_code.yml index 4aa898848..07a4d4d7e 100644 --- a/.github/workflows/webapp_python_linux_code.yml +++ b/.github/workflows/webapp_python_linux_code.yml @@ -25,7 +25,7 @@ env: AZURE_WEBAPP_NAME: pyhonwebapplima # 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 PYTHON_VERSION: '3.7' # set this to the python version to use - CURRENT_BRANCH: ${GITHUB_REF##*/} + CURRENT_BRANCH: azure/webapps-deploy@"${GITHUB_REF##*/}" jobs: build: @@ -44,6 +44,7 @@ jobs: - name: Install dependencies run: | pwd + echo "${{ env.CURRENT_BRANCH }}" python -m pip install --upgrade pip pip install -r /home/runner/work/azure-actions-integration-tests/pythonSample_thecatsaidno/requirements.txt - name: Azure authentication @@ -51,7 +52,7 @@ jobs: with: creds: ${{ secrets.AZURE_WEBAPP_SPN }} - name: Deploy Web App using GH Action azure/webapps-deploy - uses: azure/webapps-deploy@ ${{ env.CURRENT_BRANCH }} + uses: ${{ env.CURRENT_BRANCH }} with: app-name: ${{ env.AZURE_WEBAPP_NAME }} #publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }} From 0d119c40c055edce77c463a76ff2c9491fe94c41 Mon Sep 17 00:00:00 2001 From: Balaga Gayatri Date: Tue, 1 Jun 2021 15:21:38 +0530 Subject: [PATCH 17/38] Update webapp_python_linux_code.yml --- .github/workflows/webapp_python_linux_code.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/webapp_python_linux_code.yml b/.github/workflows/webapp_python_linux_code.yml index 07a4d4d7e..19ea856dd 100644 --- a/.github/workflows/webapp_python_linux_code.yml +++ b/.github/workflows/webapp_python_linux_code.yml @@ -52,7 +52,7 @@ jobs: with: creds: ${{ secrets.AZURE_WEBAPP_SPN }} - name: Deploy Web App using GH Action azure/webapps-deploy - uses: ${{ env.CURRENT_BRANCH }} + uses: azure/webapps-deploy@"${GITHUB_REF##*/}" with: app-name: ${{ env.AZURE_WEBAPP_NAME }} #publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }} From 4bfb8e6466eabced7d9d76d9e832962677911e44 Mon Sep 17 00:00:00 2001 From: Balaga Gayatri Date: Tue, 1 Jun 2021 15:24:02 +0530 Subject: [PATCH 18/38] Update webapp_python_linux_code.yml --- .github/workflows/webapp_python_linux_code.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/webapp_python_linux_code.yml b/.github/workflows/webapp_python_linux_code.yml index 19ea856dd..3196c42dd 100644 --- a/.github/workflows/webapp_python_linux_code.yml +++ b/.github/workflows/webapp_python_linux_code.yml @@ -52,7 +52,7 @@ jobs: with: creds: ${{ secrets.AZURE_WEBAPP_SPN }} - name: Deploy Web App using GH Action azure/webapps-deploy - uses: azure/webapps-deploy@"${GITHUB_REF##*/}" + uses: azure/webapps-deploy@v2 with: app-name: ${{ env.AZURE_WEBAPP_NAME }} #publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }} From 4ca3c578948d02e3a88d404369b2f3e0d1e93156 Mon Sep 17 00:00:00 2001 From: Balaga Gayatri Date: Tue, 1 Jun 2021 15:28:45 +0530 Subject: [PATCH 19/38] Update webapp_python_linux_code.yml --- .github/workflows/webapp_python_linux_code.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/webapp_python_linux_code.yml b/.github/workflows/webapp_python_linux_code.yml index 3196c42dd..bcdc77c4d 100644 --- a/.github/workflows/webapp_python_linux_code.yml +++ b/.github/workflows/webapp_python_linux_code.yml @@ -46,13 +46,13 @@ jobs: pwd echo "${{ env.CURRENT_BRANCH }}" python -m pip install --upgrade pip - pip install -r /home/runner/work/azure-actions-integration-tests/pythonSample_thecatsaidno/requirements.txt + pip install -r requirements.txt - name: Azure authentication uses: azure/login@v1 with: creds: ${{ secrets.AZURE_WEBAPP_SPN }} - name: Deploy Web App using GH Action azure/webapps-deploy - uses: azure/webapps-deploy@v2 + uses: azure/webapps-deploy@users/balaga-gayatri/prchecksrepo with: app-name: ${{ env.AZURE_WEBAPP_NAME }} #publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }} From ce727cccd69cba608b9088810a31d79da764556b Mon Sep 17 00:00:00 2001 From: Balaga Gayatri Date: Tue, 1 Jun 2021 15:35:49 +0530 Subject: [PATCH 20/38] Update webapp_python_linux_code.yml --- .github/workflows/webapp_python_linux_code.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/webapp_python_linux_code.yml b/.github/workflows/webapp_python_linux_code.yml index bcdc77c4d..c947e0d9e 100644 --- a/.github/workflows/webapp_python_linux_code.yml +++ b/.github/workflows/webapp_python_linux_code.yml @@ -46,7 +46,7 @@ jobs: pwd echo "${{ env.CURRENT_BRANCH }}" python -m pip install --upgrade pip - pip install -r requirements.txt + pip install -r /home/runner/work/webapps-deploy/Azure-Samples/pythonSample_thecatsaidno/requirements.txt - name: Azure authentication uses: azure/login@v1 with: From c198d7adeac8ae6b23b3f5d67277fccd3f491e6b Mon Sep 17 00:00:00 2001 From: Balaga Gayatri Date: Tue, 1 Jun 2021 15:39:21 +0530 Subject: [PATCH 21/38] Update webapp_python_linux_code.yml --- .github/workflows/webapp_python_linux_code.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/webapp_python_linux_code.yml b/.github/workflows/webapp_python_linux_code.yml index c947e0d9e..36a0e924f 100644 --- a/.github/workflows/webapp_python_linux_code.yml +++ b/.github/workflows/webapp_python_linux_code.yml @@ -44,9 +44,9 @@ jobs: - name: Install dependencies run: | pwd - echo "${{ env.CURRENT_BRANCH }}" + ls python -m pip install --upgrade pip - pip install -r /home/runner/work/webapps-deploy/Azure-Samples/pythonSample_thecatsaidno/requirements.txt + pip install -r /home/runner/work/webapps-deploy/webapps-deploy/pythonSample_thecatsaidno/requirements.txt - name: Azure authentication uses: azure/login@v1 with: From 45c713adca4a7c7e2363a5788e77e5bf6a1de98a Mon Sep 17 00:00:00 2001 From: Balaga Gayatri Date: Tue, 1 Jun 2021 15:52:08 +0530 Subject: [PATCH 22/38] Update webapp_python_linux_code.yml --- .github/workflows/webapp_python_linux_code.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/webapp_python_linux_code.yml b/.github/workflows/webapp_python_linux_code.yml index 36a0e924f..4a29ea7f1 100644 --- a/.github/workflows/webapp_python_linux_code.yml +++ b/.github/workflows/webapp_python_linux_code.yml @@ -46,7 +46,7 @@ jobs: pwd ls python -m pip install --upgrade pip - pip install -r /home/runner/work/webapps-deploy/webapps-deploy/pythonSample_thecatsaidno/requirements.txt + pip install -r /home/runner/work/webapps-deploy/webapps-deploy/requirements.txt - name: Azure authentication uses: azure/login@v1 with: From bf22143279992af0d5192ce75e73b707d7419098 Mon Sep 17 00:00:00 2001 From: Balaga Gayatri Date: Tue, 1 Jun 2021 16:09:38 +0530 Subject: [PATCH 23/38] Update webapp_python_linux_code.yml --- .github/workflows/webapp_python_linux_code.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/webapp_python_linux_code.yml b/.github/workflows/webapp_python_linux_code.yml index 4a29ea7f1..6623a565c 100644 --- a/.github/workflows/webapp_python_linux_code.yml +++ b/.github/workflows/webapp_python_linux_code.yml @@ -46,7 +46,7 @@ jobs: pwd ls python -m pip install --upgrade pip - pip install -r /home/runner/work/webapps-deploy/webapps-deploy/requirements.txt + # pip install -r /home/runner/work/webapps-deploy/webapps-deploy/requirements.txt - name: Azure authentication uses: azure/login@v1 with: From df9f684d254071400042c8e63151060aac3deae7 Mon Sep 17 00:00:00 2001 From: Balaga Gayatri Date: Tue, 8 Jun 2021 16:48:59 +0530 Subject: [PATCH 24/38] Update and rename webapp_python_linux_code.yml to pr_check_webapp_dotnet_windows.yml --- .../pr_check_webapp_dotnet_windows.yml | 92 +++++++++++++++++++ .../workflows/webapp_python_linux_code.yml | 59 ------------ 2 files changed, 92 insertions(+), 59 deletions(-) create mode 100644 .github/workflows/pr_check_webapp_dotnet_windows.yml delete mode 100644 .github/workflows/webapp_python_linux_code.yml diff --git a/.github/workflows/pr_check_webapp_dotnet_windows.yml b/.github/workflows/pr_check_webapp_dotnet_windows.yml new file mode 100644 index 000000000..60bdf90c7 --- /dev/null +++ b/.github/workflows/pr_check_webapp_dotnet_windows.yml @@ -0,0 +1,92 @@ +name: check_Webapp_python_linux + +on: + push: + branches: + - master + - dev + - releases/* + paths-ignore: + - '**.md' + pull_request: + paths-ignore: + - '**.md' + +# 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: + 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 + # token: ${{ secrets.GITSSHKEY }} + 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/setup-msbuild@v1.0.2 + + - name: Run MSBuild + run: msbuild .\dotnetsample\SampleWebApplication.sln + +# - uses: actions/checkout@v2 +# if: steps.job-type.outputs.type == 'pr' +# name: Checkout from PR branch +# with: +# repository: Azure/webapps-deploy +# ref: ${{ github.event.client_payload.frombranch }} +# path: 'webapps-deploy' + + - uses: actions/checkout@v2 +# if: steps.job-type.outputs.type == 'cron' + name: Checkout from PR branch + with: + repository: Azure/webapps-deploy + path: 'webapps-deploy' + + - name: Building latest changes + run: | + cd webapps-deploy + npm install --prod + + - 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\azure-actions-integration-tests\azure-actions-integration-tests\dotnetsample\SampleWebApplication\' diff --git a/.github/workflows/webapp_python_linux_code.yml b/.github/workflows/webapp_python_linux_code.yml deleted file mode 100644 index 6623a565c..000000000 --- a/.github/workflows/webapp_python_linux_code.yml +++ /dev/null @@ -1,59 +0,0 @@ -name: check_Webapp_python_linux - -on: - push: - branches: - - master - - dev - - releases/* - paths-ignore: - - '**.md' - pull_request: - braches: - - users/balaga-gayatri/commit-message-fix - paths-ignore: - - '**.md' - -# 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: pyhonwebapplima # 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 - PYTHON_VERSION: '3.7' # set this to the python version to use - CURRENT_BRANCH: azure/webapps-deploy@"${GITHUB_REF##*/}" - -jobs: - build: - name: Build and Deploy - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - with: - repository: Azure-Samples/pythonSample_thecatsaidno -# token: ${{ secrets.GITSSHKEY }} - ref: master - - name: Set up Python ${{ env.PYTHON_VERSION }} - uses: actions/setup-python@v1 - with: - python-version: ${{ env.PYTHON_VERSION }} - - name: Install dependencies - run: | - pwd - ls - python -m pip install --upgrade pip - # pip install -r /home/runner/work/webapps-deploy/webapps-deploy/requirements.txt - - name: Azure authentication - uses: azure/login@v1 - with: - creds: ${{ secrets.AZURE_WEBAPP_SPN }} - - name: Deploy Web App using GH Action azure/webapps-deploy - uses: azure/webapps-deploy@users/balaga-gayatri/prchecksrepo - with: - app-name: ${{ env.AZURE_WEBAPP_NAME }} - #publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }} - package: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }} From 9d15054834f53c2b48bf5c64cd4e00f164a090c8 Mon Sep 17 00:00:00 2001 From: Balaga Gayatri Date: Tue, 8 Jun 2021 17:01:37 +0530 Subject: [PATCH 25/38] Update pr_check_webapp_dotnet_windows.yml --- .github/workflows/pr_check_webapp_dotnet_windows.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr_check_webapp_dotnet_windows.yml b/.github/workflows/pr_check_webapp_dotnet_windows.yml index 60bdf90c7..122444bb3 100644 --- a/.github/workflows/pr_check_webapp_dotnet_windows.yml +++ b/.github/workflows/pr_check_webapp_dotnet_windows.yml @@ -1,4 +1,4 @@ -name: check_Webapp_python_linux +name: pr_check_webapp_dotnet_windows on: push: @@ -89,4 +89,4 @@ jobs: 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\azure-actions-integration-tests\azure-actions-integration-tests\dotnetsample\SampleWebApplication\' + package: 'D:\a\webapps-deploy\webapps-deploy\dotnetsample\SampleWebApplication\' From 748ff6be5316d59390138478ff8e7fb0401564c1 Mon Sep 17 00:00:00 2001 From: Balaga Gayatri Date: Thu, 24 Jun 2021 11:25:25 +0530 Subject: [PATCH 26/38] Update pr_check_webapp_dotnet_windows.yml Added automation test environment --- .github/workflows/pr_check_webapp_dotnet_windows.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr_check_webapp_dotnet_windows.yml b/.github/workflows/pr_check_webapp_dotnet_windows.yml index 122444bb3..6149e9ee7 100644 --- a/.github/workflows/pr_check_webapp_dotnet_windows.yml +++ b/.github/workflows/pr_check_webapp_dotnet_windows.yml @@ -8,9 +8,11 @@ on: - releases/* paths-ignore: - '**.md' - pull_request: - paths-ignore: - - '**.md' + pull_request_target: + types: [labeled, opened] + branches: + - master + - 'releases/*' # CONFIGURATION # For help, go to https://github.com/Azure/Actions @@ -26,6 +28,8 @@ env: jobs: run-integration-test: + if: contains(github.event.pull_request.labels.*.name, 'safe to run test') + environment: automation test name: Validate PR strategy: matrix: From 50e3ec3c10db8f9083042ce67a4dd5e1a5163430 Mon Sep 17 00:00:00 2001 From: Balaga Gayatri Date: Thu, 24 Jun 2021 13:20:21 +0530 Subject: [PATCH 27/38] Update pr_check_webapp_dotnet_windows.yml --- .github/workflows/pr_check_webapp_dotnet_windows.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pr_check_webapp_dotnet_windows.yml b/.github/workflows/pr_check_webapp_dotnet_windows.yml index 6149e9ee7..2a168e8cb 100644 --- a/.github/workflows/pr_check_webapp_dotnet_windows.yml +++ b/.github/workflows/pr_check_webapp_dotnet_windows.yml @@ -13,6 +13,7 @@ on: branches: - master - 'releases/*' + - users/balaga-gayatri/prchecksrepo # CONFIGURATION # For help, go to https://github.com/Azure/Actions From 56b6d7647122018ca924a0c86051cc393a6c2f5a Mon Sep 17 00:00:00 2001 From: Balaga Gayatri Date: Fri, 25 Jun 2021 18:18:41 +0530 Subject: [PATCH 28/38] Update pr_check_webapp_dotnet_windows.yml --- .github/workflows/pr_check_webapp_dotnet_windows.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr_check_webapp_dotnet_windows.yml b/.github/workflows/pr_check_webapp_dotnet_windows.yml index 2a168e8cb..709d80b64 100644 --- a/.github/workflows/pr_check_webapp_dotnet_windows.yml +++ b/.github/workflows/pr_check_webapp_dotnet_windows.yml @@ -8,8 +8,8 @@ on: - releases/* paths-ignore: - '**.md' - pull_request_target: - types: [labeled, opened] + pull_request: + # types: [labeled, opened] branches: - master - 'releases/*' From e2139c407a2f9fe3c53debb3cfc14fa1d0659145 Mon Sep 17 00:00:00 2001 From: Balaga Gayatri Date: Fri, 25 Jun 2021 18:23:13 +0530 Subject: [PATCH 29/38] Update pr_check_webapp_dotnet_windows.yml --- .github/workflows/pr_check_webapp_dotnet_windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_check_webapp_dotnet_windows.yml b/.github/workflows/pr_check_webapp_dotnet_windows.yml index 709d80b64..3e342ebae 100644 --- a/.github/workflows/pr_check_webapp_dotnet_windows.yml +++ b/.github/workflows/pr_check_webapp_dotnet_windows.yml @@ -29,7 +29,7 @@ env: jobs: run-integration-test: - if: contains(github.event.pull_request.labels.*.name, 'safe to run test') + #if: contains(github.event.pull_request.labels.*.name, 'safe to run test') environment: automation test name: Validate PR strategy: From 50de10d2052c184dbfe5643182f71b7df56a3649 Mon Sep 17 00:00:00 2001 From: Balaga Gayatri Date: Thu, 1 Jul 2021 12:22:27 +0530 Subject: [PATCH 30/38] Update pr_check_webapp_dotnet_windows.yml --- .github/workflows/pr_check_webapp_dotnet_windows.yml | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/.github/workflows/pr_check_webapp_dotnet_windows.yml b/.github/workflows/pr_check_webapp_dotnet_windows.yml index 3e342ebae..eef64ed82 100644 --- a/.github/workflows/pr_check_webapp_dotnet_windows.yml +++ b/.github/workflows/pr_check_webapp_dotnet_windows.yml @@ -29,7 +29,6 @@ env: jobs: run-integration-test: - #if: contains(github.event.pull_request.labels.*.name, 'safe to run test') environment: automation test name: Validate PR strategy: @@ -43,7 +42,6 @@ jobs: - uses: actions/checkout@master with: repository: Azure-Samples/dotnet-sample - # token: ${{ secrets.GITSSHKEY }} ref: master path: 'dotnetsample' @@ -63,14 +61,6 @@ jobs: - name: Run MSBuild run: msbuild .\dotnetsample\SampleWebApplication.sln - -# - uses: actions/checkout@v2 -# if: steps.job-type.outputs.type == 'pr' -# name: Checkout from PR branch -# with: -# repository: Azure/webapps-deploy -# ref: ${{ github.event.client_payload.frombranch }} -# path: 'webapps-deploy' - uses: actions/checkout@v2 # if: steps.job-type.outputs.type == 'cron' @@ -83,6 +73,7 @@ jobs: run: | cd webapps-deploy npm install --prod + npm run build - name: Azure authentication uses: azure/login@v1 From 323b3f197e10b5518c2f344f0ef856319e22629b Mon Sep 17 00:00:00 2001 From: Balaga Gayatri Date: Thu, 1 Jul 2021 12:35:26 +0530 Subject: [PATCH 31/38] Update pr_check_webapp_dotnet_windows.yml --- .github/workflows/pr_check_webapp_dotnet_windows.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr_check_webapp_dotnet_windows.yml b/.github/workflows/pr_check_webapp_dotnet_windows.yml index eef64ed82..42b896176 100644 --- a/.github/workflows/pr_check_webapp_dotnet_windows.yml +++ b/.github/workflows/pr_check_webapp_dotnet_windows.yml @@ -63,16 +63,15 @@ jobs: run: msbuild .\dotnetsample\SampleWebApplication.sln - uses: actions/checkout@v2 -# if: steps.job-type.outputs.type == 'cron' name: Checkout from PR branch with: repository: Azure/webapps-deploy path: 'webapps-deploy' - - name: Building latest changes + - name: Installing dependencies and building latest changes run: | cd webapps-deploy - npm install --prod + npm install npm run build - name: Azure authentication From 287ebf97fc69568a77a42f5b46ae7ed719edfcfc Mon Sep 17 00:00:00 2001 From: Balaga Gayatri Date: Thu, 1 Jul 2021 12:52:37 +0530 Subject: [PATCH 32/38] Update pr_check_webapp_dotnet_windows.yml --- .github/workflows/pr_check_webapp_dotnet_windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_check_webapp_dotnet_windows.yml b/.github/workflows/pr_check_webapp_dotnet_windows.yml index 42b896176..636b79315 100644 --- a/.github/workflows/pr_check_webapp_dotnet_windows.yml +++ b/.github/workflows/pr_check_webapp_dotnet_windows.yml @@ -8,7 +8,7 @@ on: - releases/* paths-ignore: - '**.md' - pull_request: + pull_request_target: # types: [labeled, opened] branches: - master From bdd44b96fac248797f338b94d587642cb29d4427 Mon Sep 17 00:00:00 2001 From: Balaga Gayatri Date: Thu, 1 Jul 2021 13:09:16 +0530 Subject: [PATCH 33/38] Create pr_check_windows_container_pubprofile.yml --- .../pr_check_windows_container_pubprofile.yml | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 .github/workflows/pr_check_windows_container_pubprofile.yml diff --git a/.github/workflows/pr_check_windows_container_pubprofile.yml b/.github/workflows/pr_check_windows_container_pubprofile.yml new file mode 100644 index 000000000..13d35944f --- /dev/null +++ b/.github/workflows/pr_check_windows_container_pubprofile.yml @@ -0,0 +1,95 @@ +name: pr_check_webapp_dotnet_windows + +on: + push: + branches: + - master + - dev + - releases/* + paths-ignore: + - '**.md' + pull_request_target: + branches: + - master + - 'releases/*' + - users/balaga-gayatri/prchecksrepo + + +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 + + From d7c8f34597eb67947331bac88e7a807aae9191ae Mon Sep 17 00:00:00 2001 From: Balaga Gayatri Date: Thu, 1 Jul 2021 13:12:16 +0530 Subject: [PATCH 34/38] Update pr_check_windows_container_pubprofile.yml --- .github/workflows/pr_check_windows_container_pubprofile.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_check_windows_container_pubprofile.yml b/.github/workflows/pr_check_windows_container_pubprofile.yml index 13d35944f..07f1102b1 100644 --- a/.github/workflows/pr_check_windows_container_pubprofile.yml +++ b/.github/workflows/pr_check_windows_container_pubprofile.yml @@ -1,4 +1,4 @@ -name: pr_check_webapp_dotnet_windows +name: pr_check_windows_container_publishprofile on: push: From 361e1616d34097b63297aa153f6d197b93bb9b94 Mon Sep 17 00:00:00 2001 From: Balaga Gayatri Date: Thu, 1 Jul 2021 14:17:25 +0530 Subject: [PATCH 35/38] Update pr_check_windows_container_pubprofile.yml --- .../workflows/pr_check_windows_container_pubprofile.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pr_check_windows_container_pubprofile.yml b/.github/workflows/pr_check_windows_container_pubprofile.yml index 07f1102b1..f54e27faa 100644 --- a/.github/workflows/pr_check_windows_container_pubprofile.yml +++ b/.github/workflows/pr_check_windows_container_pubprofile.yml @@ -33,10 +33,10 @@ jobs: ref: main path: 'python_container_App' - - name: Azure authentication - uses: azure/login@v1 - with: - creds: ${{ secrets.AZURE_WEBAPP_SPN }} +# - name: Azure authentication +# uses: azure/login@v1 +# with: +# creds: ${{ secrets.AZURE_WEBAPP_SPN }} - uses: azure/docker-login@v1 with: From 947c34023d73e68446e4b238ae3ab0540df20dc8 Mon Sep 17 00:00:00 2001 From: Balaga Gayatri Date: Thu, 1 Jul 2021 14:27:07 +0530 Subject: [PATCH 36/38] Update pr_check_windows_container_pubprofile.yml --- .../workflows/pr_check_windows_container_pubprofile.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pr_check_windows_container_pubprofile.yml b/.github/workflows/pr_check_windows_container_pubprofile.yml index f54e27faa..07f1102b1 100644 --- a/.github/workflows/pr_check_windows_container_pubprofile.yml +++ b/.github/workflows/pr_check_windows_container_pubprofile.yml @@ -33,10 +33,10 @@ jobs: ref: main path: 'python_container_App' -# - name: Azure authentication -# uses: azure/login@v1 -# with: -# creds: ${{ secrets.AZURE_WEBAPP_SPN }} + - name: Azure authentication + uses: azure/login@v1 + with: + creds: ${{ secrets.AZURE_WEBAPP_SPN }} - uses: azure/docker-login@v1 with: From 3711ad0e30dad7c655743b9e8c6a4e39c8892b76 Mon Sep 17 00:00:00 2001 From: Kanika Pasrija <58769601+kanika1894@users.noreply.github.com> Date: Thu, 1 Jul 2021 17:12:51 +0530 Subject: [PATCH 37/38] Update pr_check_webapp_dotnet_windows.yml --- .github/workflows/pr_check_webapp_dotnet_windows.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/pr_check_webapp_dotnet_windows.yml b/.github/workflows/pr_check_webapp_dotnet_windows.yml index 636b79315..cc6d26e84 100644 --- a/.github/workflows/pr_check_webapp_dotnet_windows.yml +++ b/.github/workflows/pr_check_webapp_dotnet_windows.yml @@ -4,16 +4,13 @@ on: push: branches: - master - - dev - releases/* paths-ignore: - '**.md' pull_request_target: - # types: [labeled, opened] branches: - master - 'releases/*' - - users/balaga-gayatri/prchecksrepo # CONFIGURATION # For help, go to https://github.com/Azure/Actions @@ -55,7 +52,6 @@ jobs: cd dotnetsample nuget restore - - name: Add msbuild to PATH uses: microsoft/setup-msbuild@v1.0.2 From fbc0006b6ba8a2feaff913e5aefb87fbcfd4e68f Mon Sep 17 00:00:00 2001 From: Kanika Pasrija <58769601+kanika1894@users.noreply.github.com> Date: Thu, 1 Jul 2021 17:13:34 +0530 Subject: [PATCH 38/38] Update pr_check_windows_container_pubprofile.yml --- .github/workflows/pr_check_windows_container_pubprofile.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/pr_check_windows_container_pubprofile.yml b/.github/workflows/pr_check_windows_container_pubprofile.yml index 07f1102b1..fc9aeb17f 100644 --- a/.github/workflows/pr_check_windows_container_pubprofile.yml +++ b/.github/workflows/pr_check_windows_container_pubprofile.yml @@ -4,7 +4,6 @@ on: push: branches: - master - - dev - releases/* paths-ignore: - '**.md' @@ -12,8 +11,6 @@ on: branches: - master - 'releases/*' - - users/balaga-gayatri/prchecksrepo - env: AZURE_WEBAPP_NAME: windowscontainerwebapp # set this to your application's name @@ -91,5 +88,3 @@ jobs: 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 - -