Skip to content

Commit

Permalink
Merge branch 'master' into releases/v1
Browse files Browse the repository at this point in the history
  • Loading branch information
patelchandni committed Apr 21, 2023
2 parents f438ecc + 0db7cd7 commit 292da48
Show file tree
Hide file tree
Showing 25 changed files with 3,202 additions and 397 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/run-e2e-tests-dotnet3-lcon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,17 @@ jobs:
echo "$env:GITHUB_SHA" > ./output/sha.txt
popd
- name: 'Login via Azure CLI'
uses: azure/login@v1
with:
creds: ${{ secrets.RBAC_GAE_FA_DOTNET3_LCON }}

- name: E2E Run Azure Functions Action
uses: ./
id: fa
with:
app-name: ${{ env.AZURE_FUNCTIONAPP_NAME }}
package: '${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}/output'
publish-profile: ${{ secrets.GAE_FA_DOTNET3_LCON }}

- name: E2E Check HttpTrigger Result
shell: pwsh
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/run-e2e-tests-dotnet3-wcon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,17 @@ jobs:
echo "$env:GITHUB_SHA" > ./output/sha.txt
popd
- name: 'Login via Azure CLI'
uses: azure/login@v1
with:
creds: ${{ secrets.RBAC_GAE_FA_DOTNET3_WCON }}

- name: E2E Run Azure Functions Action
uses: ./
id: fa
with:
app-name: ${{ env.AZURE_FUNCTIONAPP_NAME }}
package: '${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}/output'
publish-profile: ${{ secrets.GAE_FA_DOTNET3_WCON }}

- name: E2E Check HttpTrigger Result
shell: pwsh
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/run-e2e-tests-java8-lcon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,17 @@ jobs:
mvn azure-functions:package
popd
- name: 'Login via Azure CLI'
uses: azure/login@v1
with:
creds: ${{ secrets.RBAC_GAE_FA_JAVA8_LCON }}

- name: E2E Run Azure Functions Action
uses: ./
id: fa
with:
app-name: ${{ env.AZURE_FUNCTIONAPP_NAME }}
package: './${{ env.POM_XML_DIRECTORY }}'
publish-profile: ${{ secrets.GAE_FA_JAVA8_LCON }}
respect-pom-xml: true

- name: E2E Check HttpTrigger Result
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/run-e2e-tests-java8-wcon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,17 @@ jobs:
mvn azure-functions:package
popd
- name: 'Login via Azure CLI'
uses: azure/login@v1
with:
creds: ${{ secrets.RBAC_GAE_FA_JAVA8_WCON }}

- name: E2E Run Azure Functions Action
uses: ./
id: fa
with:
app-name: ${{ env.AZURE_FUNCTIONAPP_NAME }}
package: './${{ env.POM_XML_DIRECTORY }}'
publish-profile: ${{ secrets.GAE_FA_JAVA8_WCON }}
respect-pom-xml: true

- name: E2E Check HttpTrigger Result
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/run-e2e-tests-node16-lcon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,17 @@ jobs:
echo "$GITHUB_SHA" > sha.txt
popd
- name: 'Login via Azure CLI'
uses: azure/login@v1
with:
creds: ${{ secrets.RBAC_GAE_FA_NODE16_LCON }}

- name: E2E Run Azure Functions Action
uses: ./
id: fa
with:
app-name: ${{ env.AZURE_FUNCTIONAPP_NAME }}
package: ${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}
publish-profile: ${{ secrets.GAE_FA_NODE16_LCON }}

- name: E2E Check HttpTrigger Result
shell: pwsh
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/run-e2e-tests-node16-wcon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,18 @@ jobs:
echo "$GITHUB_SHA" > sha.txt
popd
- name: 'Login via Azure CLI'
uses: azure/login@v1
with:
creds: ${{ secrets.RBAC_GAE_FA_NODE16_WCON }}

- name: E2E Run Azure Functions Action
uses: ./
id: fa
with:
app-name: ${{ env.AZURE_FUNCTIONAPP_NAME }}
package: ${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}
publish-profile: ${{ secrets.GAE_FA_NODE16_WCON }}
scm-do-build-during-deployment: true

- name: E2E Check HttpTrigger Result
shell: pwsh
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/run-e2e-tests-powershell6-wcon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,17 @@ jobs:
echo "$GITHUB_SHA" > sha.txt
popd
- name: 'Login via Azure CLI'
uses: azure/login@v1
with:
creds: ${{ secrets.RBAC_GAE_FA_POWERSHELL6_WCON }}

- name: E2E Run Azure Functions Action
uses: ./
id: fa
with:
app-name: ${{ env.AZURE_FUNCTIONAPP_NAME }}
package: ${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}
publish-profile: ${{ secrets.GAE_FA_POWERSHELL6_WCON }}

- name: E2E Check HttpTrigger Result
shell: pwsh
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/run-e2e-tests-python37-lcon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ env:
jobs:
run:
name: Run E2E Tests
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down Expand Up @@ -49,13 +49,17 @@ jobs:
echo "$GITHUB_SHA" > sha.txt
popd
- name: 'Login via Azure CLI'
uses: azure/login@v1
with:
creds: ${{ secrets.RBAC_GAE_FA_PYTHON37_LCON }}

- name: E2E Run Azure Functions Action
uses: ./
id: fa
with:
app-name: ${{ env.AZURE_FUNCTIONAPP_NAME }}
package: ${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}
publish-profile: ${{ secrets.GAE_FA_PYTHON37_LCON }}

- name: E2E Check HttpTrigger Result
shell: pwsh
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ Alternatively, you can add a `- run: dotnet build --output ./bin` step **before*
## Using Publish Profile as Deployment Credential (recommended)
Using publish profile as deployment credential is recommended if you are not the owner of your Azure subscription. Follow these steps to configure your workflow to use the publish profile from your function app.

**NOTE:** If you are using a Custom handler with the Linux consumption SKU, this deployment process *will not work* . You must use a Service Principal and authenticate with the `azure/login` action.

1. In Azure portal, go to your function app.
2. Click **Get publish profile** and download **.PublishSettings** file.
3. Open the **.PublishSettings** file and copy the content.
Expand All @@ -59,8 +61,7 @@ Using publish profile as deployment credential is recommended if you are not the

## Using Azure Service Principal for RBAC as Deployment Credential

Note:
If you want to deploy to Linux Consumption plan and your app contains executable file(custom handler, `chrome` in [Puppeteer](https://github.com/puppeteer/puppeteer)/[Playwright](https://github.com/microsoft/playwright) etc), you need to use this way in order to keep executable permission.
**NOTE:** If you want to deploy to Linux Consumption plan and your app contains executable file(custom handler, `chrome` in [Puppeteer](https://github.com/puppeteer/puppeteer)/[Playwright](https://github.com/microsoft/playwright) etc), you need to use this way in order to keep executable permission.

Follow these steps to configure your workflow to use an [Azure Service Principal for RBAC](https://docs.microsoft.com/en-us/azure/role-based-access-control/overview) and add them as a GitHub Secret in your repository.

Expand All @@ -83,7 +84,7 @@ Follow these steps to configure your workflow to use an [Azure Service Principal
}
```
3. Copy and paste the json response from above Azure CLI to your GitHub Repository > Settings > Secrets > Add a new secret > **AZURE_RBAC_CREDENTIALS**
4. Use [Windows DotNet Function App RBAC](https://github.com/Azure/actions-workflow-samples/blob/master/FunctionApp/windows-dotnet-functionapp-on-azure-rbac.yml) template as a reference to build your workflow in `.github/workflows/` directory.
4. Use [Windows DotNet Function App RBAC](https://github.com/Azure/actions-workflow-samples/blob/master/FunctionApp/windows-dotnet-functionapp-on-azure-rbac.yml) template as a reference to build your workflow in `.github/workflows/` directory. Ensure that you use `azure/login` action and that you _are not_ using the `publish-profile` parameter
5. Change variable values in `env:` section according to your function app.
6. Commit and push your project to GitHub repository, you should see a new GitHub workflow initiated in **Actions** tab.

Expand Down
Loading

0 comments on commit 292da48

Please sign in to comment.