From c207625cede8576b39bc5c7054abb0f2dca6747e Mon Sep 17 00:00:00 2001 From: taminta <50441508+taminta@users.noreply.github.com> Date: Fri, 30 Apr 2021 15:57:46 +0900 Subject: [PATCH 01/11] =?UTF-8?q?Azure=20portal=20=E3=81=8B=E3=82=89=20App?= =?UTF-8?q?=20Service=20=E3=83=87=E3=83=97=E3=83=AD=E3=82=A4=E3=81=AE?= =?UTF-8?q?=E3=83=AF=E3=83=BC=E3=82=AF=E3=83=95=E3=83=AD=E3=83=BC=E6=A7=8B?= =?UTF-8?q?=E6=88=90=E3=82=92=E8=BF=BD=E5=8A=A0=E3=81=BE=E3=81=9F=E3=81=AF?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E3=81=97=E3=81=BE=E3=81=99=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../workflows/master_test-webapp-appgwv2.yml | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 .github/workflows/master_test-webapp-appgwv2.yml diff --git a/.github/workflows/master_test-webapp-appgwv2.yml b/.github/workflows/master_test-webapp-appgwv2.yml new file mode 100644 index 000000000..b72ab8135 --- /dev/null +++ b/.github/workflows/master_test-webapp-appgwv2.yml @@ -0,0 +1,62 @@ +# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy +# More GitHub Actions for Azure: https://github.com/Azure/actions +# More info on Python, GitHub Actions, and Azure App Service: https://aka.ms/python-webapps-actions + +name: Build and deploy Python app to Azure Web App - test-webapp-appgwv2 + +on: + push: + branches: + - master + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Set up Python version + uses: actions/setup-python@v1 + with: + python-version: '3.8' + + - name: Create and start virtual environment + run: | + python -m venv venv + source venv/bin/activate + + - name: Install dependencies + run: pip install -r requirements.txt + + # Optional: Add step to run tests here (PyTest, Django test suites, etc.) + + - name: Upload artifact for deployment jobs + uses: actions/upload-artifact@v2 + with: + name: python-app + path: | + . + !venv/ + + deploy: + runs-on: ubuntu-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: python-app + path: . + + - name: 'Deploy to Azure Web App' + uses: azure/webapps-deploy@v2 + with: + app-name: 'test-webapp-appgwv2' + slot-name: 'production' + publish-profile: ${{ secrets.AzureAppService_PublishProfile_5198a2cba45f496992fd480e9b2487f9 }} \ No newline at end of file From f696e974be4efd7840d72f3e22acf77d1c740407 Mon Sep 17 00:00:00 2001 From: taminta <50441508+taminta@users.noreply.github.com> Date: Mon, 14 Jun 2021 15:21:02 +0900 Subject: [PATCH 02/11] =?UTF-8?q?Azure=20portal=20=E3=81=8B=E3=82=89=20App?= =?UTF-8?q?=20Service=20=E3=83=87=E3=83=97=E3=83=AD=E3=82=A4=E3=81=AE?= =?UTF-8?q?=E3=83=AF=E3=83=BC=E3=82=AF=E3=83=95=E3=83=AD=E3=83=BC=E6=A7=8B?= =?UTF-8?q?=E6=88=90=E3=82=92=E8=BF=BD=E5=8A=A0=E3=81=BE=E3=81=9F=E3=81=AF?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E3=81=97=E3=81=BE=E3=81=99=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/master_peapps.yml | 62 +++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 .github/workflows/master_peapps.yml diff --git a/.github/workflows/master_peapps.yml b/.github/workflows/master_peapps.yml new file mode 100644 index 000000000..f21c4e296 --- /dev/null +++ b/.github/workflows/master_peapps.yml @@ -0,0 +1,62 @@ +# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy +# More GitHub Actions for Azure: https://github.com/Azure/actions +# More info on Python, GitHub Actions, and Azure App Service: https://aka.ms/python-webapps-actions + +name: Build and deploy Python app to Azure Web App - peapps + +on: + push: + branches: + - master + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Set up Python version + uses: actions/setup-python@v1 + with: + python-version: '3.8' + + - name: Create and start virtual environment + run: | + python -m venv venv + source venv/bin/activate + + - name: Install dependencies + run: pip install -r requirements.txt + + # Optional: Add step to run tests here (PyTest, Django test suites, etc.) + + - name: Upload artifact for deployment jobs + uses: actions/upload-artifact@v2 + with: + name: python-app + path: | + . + !venv/ + + deploy: + runs-on: ubuntu-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: python-app + path: . + + - name: 'Deploy to Azure Web App' + uses: azure/webapps-deploy@v2 + with: + app-name: 'peapps' + slot-name: 'production' + publish-profile: ${{ secrets.AzureAppService_PublishProfile_5eb5cdb9183e4cb28a53bd2a11defb6b }} \ No newline at end of file From 5e0b91b0578c47481f9d0bd535f83d8be5a0cb7c Mon Sep 17 00:00:00 2001 From: taminta <50441508+taminta@users.noreply.github.com> Date: Wed, 23 Jun 2021 22:08:24 +0900 Subject: [PATCH 03/11] Add or update the Azure App Service build and deployment workflow config --- .../master_webapps-privatedns-jpeast.yml | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/master_webapps-privatedns-jpeast.yml diff --git a/.github/workflows/master_webapps-privatedns-jpeast.yml b/.github/workflows/master_webapps-privatedns-jpeast.yml new file mode 100644 index 000000000..d6be4a0f0 --- /dev/null +++ b/.github/workflows/master_webapps-privatedns-jpeast.yml @@ -0,0 +1,38 @@ +# Docs for the Azure Web Apps Deploy action: https://go.microsoft.com/fwlink/?linkid=2134798 +# More GitHub Actions for Azure: https://go.microsoft.com/fwlink/?linkid=2135048 + +name: Azure App Service - webapps-privateDns-jpeast(Production), Build and deploy Python app + +on: + push: + branches: + - master + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + + steps: + # checkout the repo + - name: 'Checkout Github Action' + uses: actions/checkout@master + + + - name: Set up Python version + uses: actions/setup-python@v1 + with: + python-version: '3.8' + + - name: Build using AppService-Build + uses: azure/appservice-build@v2 + with: + platform: python + platform-version: '3.8' + + - name: Run Azure webapp deploy action using publish profile credentials + uses: azure/webapps-deploy@v2 + with: + app-name: webapps-privateDns-jpeast + slot-name: Production + publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_FA322E18A5254B14B2C0E554D36BFE60 }} + From 50f5b36d9fec2f2ee00d03df1d6307022380ca11 Mon Sep 17 00:00:00 2001 From: taminta <50441508+taminta@users.noreply.github.com> Date: Wed, 23 Jun 2021 22:20:04 +0900 Subject: [PATCH 04/11] Add or update the Azure App Service build and deployment workflow config --- .github/workflows/master_webapps-privatedns-jpeast.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/master_webapps-privatedns-jpeast.yml b/.github/workflows/master_webapps-privatedns-jpeast.yml index d6be4a0f0..1fd5c91f5 100644 --- a/.github/workflows/master_webapps-privatedns-jpeast.yml +++ b/.github/workflows/master_webapps-privatedns-jpeast.yml @@ -34,5 +34,5 @@ jobs: with: app-name: webapps-privateDns-jpeast slot-name: Production - publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_FA322E18A5254B14B2C0E554D36BFE60 }} + publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_7143D6D6035F4DE0B8510297153BB820 }} From e9b4db68fcd071182def71d21977689751fd6bbe Mon Sep 17 00:00:00 2001 From: taminta <50441508+taminta@users.noreply.github.com> Date: Thu, 9 Dec 2021 09:52:35 +0900 Subject: [PATCH 05/11] Add or update the Azure App Service build and deployment workflow config --- .github/workflows/master_webapp-200kip.yml | 63 ++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 .github/workflows/master_webapp-200kip.yml diff --git a/.github/workflows/master_webapp-200kip.yml b/.github/workflows/master_webapp-200kip.yml new file mode 100644 index 000000000..2354b059a --- /dev/null +++ b/.github/workflows/master_webapp-200kip.yml @@ -0,0 +1,63 @@ +# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy +# More GitHub Actions for Azure: https://github.com/Azure/actions +# More info on Python, GitHub Actions, and Azure App Service: https://aka.ms/python-webapps-actions + +name: Build and deploy Python app to Azure Web App - webapp-200kip + +on: + push: + branches: + - master + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Set up Python version + uses: actions/setup-python@v1 + with: + python-version: '3.8' + + - name: Create and start virtual environment + run: | + python -m venv venv + source venv/bin/activate + + - name: Install dependencies + run: pip install -r requirements.txt + + # Optional: Add step to run tests here (PyTest, Django test suites, etc.) + + - name: Upload artifact for deployment jobs + uses: actions/upload-artifact@v2 + with: + name: python-app + path: | + . + !venv/ + + deploy: + runs-on: ubuntu-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: python-app + path: . + + - name: 'Deploy to Azure Web App' + uses: azure/webapps-deploy@v2 + id: deploy-to-webapp + with: + app-name: 'webapp-200kip' + slot-name: 'Production' + publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_81F0CAFA171F43B5AFB2BE079F7EEA05 }} From 430dd89662eecadeecc8584cb8193f1bc825b1f7 Mon Sep 17 00:00:00 2001 From: taminta <50441508+taminta@users.noreply.github.com> Date: Mon, 13 Dec 2021 22:18:01 +0900 Subject: [PATCH 06/11] add no cache config --- app.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app.py b/app.py index 7f8a1f2e8..4fda7d182 100644 --- a/app.py +++ b/app.py @@ -4,3 +4,15 @@ @app.route("/") def hello(): return "Hello, World!" + +@app.after_request +def add_header(r): + """ + Add headers to both force latest IE rendering engine or Chrome Frame, + and also to cache the rendered page for 10 minutes. + """ + r.headers["Cache-Control"] = "no-cache, no-store, must-revalidate" + r.headers["Pragma"] = "no-cache" + r.headers["Expires"] = "0" + r.headers['Cache-Control'] = 'public, max-age=0' + return r From b79ae09453b523411acc2b616ff005eaa33ceee9 Mon Sep 17 00:00:00 2001 From: taminta <50441508+taminta@users.noreply.github.com> Date: Mon, 13 Dec 2021 22:23:10 +0900 Subject: [PATCH 07/11] Update app.py --- app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app.py b/app.py index 4fda7d182..55b310f77 100644 --- a/app.py +++ b/app.py @@ -11,8 +11,8 @@ def add_header(r): Add headers to both force latest IE rendering engine or Chrome Frame, and also to cache the rendered page for 10 minutes. """ - r.headers["Cache-Control"] = "no-cache, no-store, must-revalidate" + r.headers["Cache-Control"] = "no-store" r.headers["Pragma"] = "no-cache" r.headers["Expires"] = "0" - r.headers['Cache-Control'] = 'public, max-age=0' + r.headers['CheckHeader'] = 'Check' return r From 32d82fe7fbd8be7554106186d512ff23c7450acf Mon Sep 17 00:00:00 2001 From: taminta <50441508+taminta@users.noreply.github.com> Date: Mon, 31 Jan 2022 17:12:00 +0900 Subject: [PATCH 08/11] Add or update the Azure App Service build and deployment workflow config --- .../workflows/taminta-nocache_200appgwwaf.yml | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 .github/workflows/taminta-nocache_200appgwwaf.yml diff --git a/.github/workflows/taminta-nocache_200appgwwaf.yml b/.github/workflows/taminta-nocache_200appgwwaf.yml new file mode 100644 index 000000000..bc3a214ee --- /dev/null +++ b/.github/workflows/taminta-nocache_200appgwwaf.yml @@ -0,0 +1,63 @@ +# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy +# More GitHub Actions for Azure: https://github.com/Azure/actions +# More info on Python, GitHub Actions, and Azure App Service: https://aka.ms/python-webapps-actions + +name: Build and deploy Python app to Azure Web App - 200appgwwaf + +on: + push: + branches: + - taminta-noCache + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Set up Python version + uses: actions/setup-python@v1 + with: + python-version: '3.8' + + - name: Create and start virtual environment + run: | + python -m venv venv + source venv/bin/activate + + - name: Install dependencies + run: pip install -r requirements.txt + + # Optional: Add step to run tests here (PyTest, Django test suites, etc.) + + - name: Upload artifact for deployment jobs + uses: actions/upload-artifact@v2 + with: + name: python-app + path: | + . + !venv/ + + deploy: + runs-on: ubuntu-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: python-app + path: . + + - name: 'Deploy to Azure Web App' + uses: azure/webapps-deploy@v2 + id: deploy-to-webapp + with: + app-name: '200appgwwaf' + slot-name: 'Production' + publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_C6CE6365F80B42E38514348B1E37AF0D }} From 770176a68e860c8aaf3d9b8e21c714bd4702f089 Mon Sep 17 00:00:00 2001 From: taminta <50441508+taminta@users.noreply.github.com> Date: Mon, 21 Feb 2022 12:51:16 +0900 Subject: [PATCH 09/11] Add or update the Azure App Service build and deployment workflow config --- .../taminta-nocache_webapp100azfw.yml | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 .github/workflows/taminta-nocache_webapp100azfw.yml diff --git a/.github/workflows/taminta-nocache_webapp100azfw.yml b/.github/workflows/taminta-nocache_webapp100azfw.yml new file mode 100644 index 000000000..d5bf0ffcc --- /dev/null +++ b/.github/workflows/taminta-nocache_webapp100azfw.yml @@ -0,0 +1,63 @@ +# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy +# More GitHub Actions for Azure: https://github.com/Azure/actions +# More info on Python, GitHub Actions, and Azure App Service: https://aka.ms/python-webapps-actions + +name: Build and deploy Python app to Azure Web App - webapp100azfw + +on: + push: + branches: + - taminta-noCache + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Set up Python version + uses: actions/setup-python@v1 + with: + python-version: '3.9' + + - name: Create and start virtual environment + run: | + python -m venv venv + source venv/bin/activate + + - name: Install dependencies + run: pip install -r requirements.txt + + # Optional: Add step to run tests here (PyTest, Django test suites, etc.) + + - name: Upload artifact for deployment jobs + uses: actions/upload-artifact@v2 + with: + name: python-app + path: | + . + !venv/ + + deploy: + runs-on: ubuntu-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: python-app + path: . + + - name: 'Deploy to Azure Web App' + uses: azure/webapps-deploy@v2 + id: deploy-to-webapp + with: + app-name: 'webapp100azfw' + slot-name: 'Production' + publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_34D67174CD3B4B109E9201724DD8A49D }} From c73ad8ada96b3391a03feefec1e6dfd59f836dcb Mon Sep 17 00:00:00 2001 From: taminta <50441508+taminta@users.noreply.github.com> Date: Tue, 14 Jun 2022 12:54:17 +0900 Subject: [PATCH 10/11] Add or update the Azure App Service build and deployment workflow config --- .../taminta-nocache_taminowa20220614.yml | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 .github/workflows/taminta-nocache_taminowa20220614.yml diff --git a/.github/workflows/taminta-nocache_taminowa20220614.yml b/.github/workflows/taminta-nocache_taminowa20220614.yml new file mode 100644 index 000000000..fd32f9fd4 --- /dev/null +++ b/.github/workflows/taminta-nocache_taminowa20220614.yml @@ -0,0 +1,63 @@ +# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy +# More GitHub Actions for Azure: https://github.com/Azure/actions +# More info on Python, GitHub Actions, and Azure App Service: https://aka.ms/python-webapps-actions + +name: Build and deploy Python app to Azure Web App - taminowa20220614 + +on: + push: + branches: + - taminta-noCache + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Set up Python version + uses: actions/setup-python@v1 + with: + python-version: '3.8' + + - name: Create and start virtual environment + run: | + python -m venv venv + source venv/bin/activate + + - name: Install dependencies + run: pip install -r requirements.txt + + # Optional: Add step to run tests here (PyTest, Django test suites, etc.) + + - name: Upload artifact for deployment jobs + uses: actions/upload-artifact@v2 + with: + name: python-app + path: | + . + !venv/ + + deploy: + runs-on: ubuntu-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: python-app + path: . + + - name: 'Deploy to Azure Web App' + uses: azure/webapps-deploy@v2 + id: deploy-to-webapp + with: + app-name: 'taminowa20220614' + slot-name: 'Production' + publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_AC19CDC0931F4051ADE41E31D0B5E201 }} From df81f42b23f4fc8d2c447219bdfa36f246f858e6 Mon Sep 17 00:00:00 2001 From: taminta <50441508+taminta@users.noreply.github.com> Date: Tue, 21 Jun 2022 12:25:59 +0900 Subject: [PATCH 11/11] Add or update the Azure App Service build and deployment workflow config --- .../taminta-nocache_taminowa20220621.yml | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 .github/workflows/taminta-nocache_taminowa20220621.yml diff --git a/.github/workflows/taminta-nocache_taminowa20220621.yml b/.github/workflows/taminta-nocache_taminowa20220621.yml new file mode 100644 index 000000000..4b31be68c --- /dev/null +++ b/.github/workflows/taminta-nocache_taminowa20220621.yml @@ -0,0 +1,63 @@ +# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy +# More GitHub Actions for Azure: https://github.com/Azure/actions +# More info on Python, GitHub Actions, and Azure App Service: https://aka.ms/python-webapps-actions + +name: Build and deploy Python app to Azure Web App - taminowa20220621 + +on: + push: + branches: + - taminta-noCache + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Set up Python version + uses: actions/setup-python@v1 + with: + python-version: '3.8' + + - name: Create and start virtual environment + run: | + python -m venv venv + source venv/bin/activate + + - name: Install dependencies + run: pip install -r requirements.txt + + # Optional: Add step to run tests here (PyTest, Django test suites, etc.) + + - name: Upload artifact for deployment jobs + uses: actions/upload-artifact@v2 + with: + name: python-app + path: | + . + !venv/ + + deploy: + runs-on: ubuntu-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: python-app + path: . + + - name: 'Deploy to Azure Web App' + uses: azure/webapps-deploy@v2 + id: deploy-to-webapp + with: + app-name: 'taminowa20220621' + slot-name: 'Production' + publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_00CD9BF66D3449C3898D329CC7A4BE2D }}