Skip to content

Commit

Permalink
e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
patelchandni committed May 22, 2024
1 parent 0408f97 commit d2718e2
Show file tree
Hide file tree
Showing 15 changed files with 63 additions and 19 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/run-e2e-tests-dotnet3-lcon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ on:
paths-ignore:
- '**.md'

permissions:
id-token: write

env:
AZURE_FUNCTIONAPP_NAME: gae-fa-dotnet3-lcon
AZURE_FUNCTIONAPP_PACKAGE_PATH: './tests/e2e/dotnet3'
Expand Down Expand Up @@ -51,7 +54,9 @@ jobs:
- name: 'Login via Azure CLI'
uses: azure/login@v1
with:
creds: ${{ secrets.RBAC_GAE_FA_DOTNET3_LCON }}
client-id: ${{ secrets.AZURE_CLIENT_ID_FA_DOTNET3_LCON }}
tenant-id: ${{ secrets.AZURE_TENANT_ID_FA_E2E_TESTS }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID_FA_E2E_TESTS }}

- name: E2E Run Azure Functions Action
uses: ./
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/run-e2e-tests-dotnet3-wcon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ on:
paths-ignore:
- '**.md'

permissions:
id-token: write

env:
AZURE_FUNCTIONAPP_NAME: gae-fa-dotnet3-wcon
AZURE_FUNCTIONAPP_PACKAGE_PATH: './tests/e2e/dotnet3'
Expand Down Expand Up @@ -51,7 +54,9 @@ jobs:
- name: 'Login via Azure CLI'
uses: azure/login@v1
with:
creds: ${{ secrets.RBAC_GAE_FA_DOTNET3_WCON }}
client-id: ${{ secrets.AZURE_CLIENT_ID_FA_DOTNET3_WCON }}
tenant-id: ${{ secrets.AZURE_TENANT_ID_FA_E2E_TESTS }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID_FA_E2E_TESTS }}

- name: E2E Run Azure Functions Action
uses: ./
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/run-e2e-tests-java8-lcon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ on:
paths-ignore:
- '**.md'

permissions:
id-token: write

env:
AZURE_FUNCTIONAPP_NAME: gae-fa-java8-lcon
POM_XML_DIRECTORY: './tests/e2e/java8'
Expand Down Expand Up @@ -53,7 +56,9 @@ jobs:
- name: 'Login via Azure CLI'
uses: azure/login@v1
with:
creds: ${{ secrets.RBAC_GAE_FA_JAVA8_LCON }}
client-id: ${{ secrets.AZURE_CLIENT_ID_FA_JAVA8_LCON }}
tenant-id: ${{ secrets.AZURE_TENANT_ID_FA_E2E_TESTS }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID_FA_E2E_TESTS }}

- name: E2E Run Azure Functions Action
uses: ./
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/run-e2e-tests-java8-wcon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ on:
paths-ignore:
- '**.md'

permissions:
id-token: write

env:
AZURE_FUNCTIONAPP_NAME: gae-fa-java8-wcon
POM_XML_DIRECTORY: './tests/e2e/java8'
Expand Down Expand Up @@ -53,7 +56,9 @@ jobs:
- name: 'Login via Azure CLI'
uses: azure/login@v1
with:
creds: ${{ secrets.RBAC_GAE_FA_JAVA8_WCON }}
client-id: ${{ secrets.AZURE_CLIENT_ID_FA_JAVA8_WCON }}
tenant-id: ${{ secrets.AZURE_TENANT_ID_FA_E2E_TESTS }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID_FA_E2E_TESTS }}

- name: E2E Run Azure Functions Action
uses: ./
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/run-e2e-tests-node20-lcon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ on:
paths-ignore:
- '**.md'

permissions:
id-token: write

env:
AZURE_FUNCTIONAPP_NAME: gae-fa-node20-lcon
AZURE_FUNCTIONAPP_PACKAGE_PATH: './tests/e2e/node20'
Expand Down Expand Up @@ -53,7 +56,9 @@ jobs:
- name: 'Login via Azure CLI'
uses: azure/login@v1
with:
creds: ${{ secrets.RBAC_GAE_FA_NODE20_LCON }}
client-id: ${{ secrets.AZURE_CLIENT_ID_FA_NODE20_LCON }}
tenant-id: ${{ secrets.AZURE_TENANT_ID_FA_E2E_TESTS }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID_FA_E2E_TESTS }}

- name: E2E Run Azure Functions Action
uses: ./
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/run-e2e-tests-node20-wcon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ on:
paths-ignore:
- '**.md'

permissions:
id-token: write

env:
AZURE_FUNCTIONAPP_NAME: gae-fa-node20-wcon
AZURE_FUNCTIONAPP_PACKAGE_PATH: './tests/e2e/node20'
Expand Down Expand Up @@ -53,7 +56,9 @@ jobs:
- name: 'Login via Azure CLI'
uses: azure/login@v1
with:
creds: ${{ secrets.RBAC_GAE_FA_NODE20_WCON }}
client-id: ${{ secrets.AZURE_CLIENT_ID_FA_NODE20_WCON }}
tenant-id: ${{ secrets.AZURE_TENANT_ID_FA_E2E_TESTS }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID_FA_E2E_TESTS }}

- name: E2E Run Azure Functions Action
uses: ./
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/run-e2e-tests-powershell6-wcon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ on:
paths-ignore:
- '**.md'

permissions:
id-token: write

env:
AZURE_FUNCTIONAPP_NAME: gae-fa-powershell6-wcon
AZURE_FUNCTIONAPP_PACKAGE_PATH: './tests/e2e/powershell6'
Expand Down Expand Up @@ -44,7 +47,9 @@ jobs:
- name: 'Login via Azure CLI'
uses: azure/login@v1
with:
creds: ${{ secrets.RBAC_GAE_FA_POWERSHELL6_WCON }}
client-id: ${{ secrets.AZURE_CLIENT_ID_FA_POWERSHELL6_WCON }}
tenant-id: ${{ secrets.AZURE_TENANT_ID_FA_E2E_TESTS }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID_FA_E2E_TESTS }}

- name: E2E Run Azure Functions Action
uses: ./
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/run-e2e-tests-python310-flexcon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ on:
paths-ignore:
- '**.md'

permissions:
id-token: write

env:
AZURE_FUNCTIONAPP_NAME: gae-fa-python310-flexcon
AZURE_FUNCTIONAPP_PACKAGE_PATH: './tests/e2e/python310'
Expand Down Expand Up @@ -52,7 +55,9 @@ jobs:
- name: 'Login via Azure CLI'
uses: azure/login@v1
with:
creds: ${{ secrets.RBAC_GAE_FA_PYTHON310_FLEXCON }}
client-id: ${{ secrets.AZURE_CLIENT_ID_FA_PYTHON310_FLEXCON }}
tenant-id: ${{ secrets.AZURE_TENANT_ID_FA_E2E_TESTS }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID_FA_E2E_TESTS }}

- name: E2E Run Azure Functions Action
uses: ./
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/run-e2e-tests-python310-lcon-msi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ jobs:
uses: azure/login@v1
with:
client-id: ${{ secrets.AZURE_CLIENT_ID_FA_PYTHON310_LCON_MSI }}
tenant-id: ${{ secrets.AZURE_TENANT_ID_FA_PYTHON310_LCON_MSI }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID_FA_PYTHON310_LCON_MSI }}
tenant-id: ${{ secrets.AZURE_TENANT_ID_FA_E2E_TESTS }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID_FA_E2E_TESTS }}

- name: E2E Run Azure Functions Action
uses: ./
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/run-e2e-tests-python37-lcon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ on:
paths-ignore:
- '**.md'

permissions:
id-token: write

env:
AZURE_FUNCTIONAPP_NAME: gae-fa-python37-lcon
AZURE_FUNCTIONAPP_PACKAGE_PATH: './tests/e2e/python37'
Expand Down Expand Up @@ -52,7 +55,9 @@ jobs:
- name: 'Login via Azure CLI'
uses: azure/login@v1
with:
creds: ${{ secrets.RBAC_GAE_FA_PYTHON37_LCON }}
client-id: ${{ secrets.AZURE_CLIENT_ID_FA_PYTHON37_LCON }}
tenant-id: ${{ secrets.AZURE_TENANT_ID_FA_E2E_TESTS }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID_FA_E2E_TESTS }}

- name: E2E Run Azure Functions Action
uses: ./
Expand Down
1 change: 0 additions & 1 deletion src/appservice-rest/Kudu/azure-app-kudu-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { KuduServiceClient } from './KuduServiceClient';
import { exists } from '@actions/io/lib/io-util';

import core = require('@actions/core');
import { CANCELLED } from 'dns';

export const KUDU_DEPLOYMENT_CONSTANTS = {
CANCELLED: -1,
Expand Down
2 changes: 1 addition & 1 deletion src/handlers/contentPreparer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ export class ContentPreparer implements IOrchestratable {
"You can use it to exclude files from deployment.")
return
}

FuncIgnore.removeFilesFromFuncIgnore(packagePath, funcignoreParser);
return;
}
Expand Down
6 changes: 3 additions & 3 deletions src/handlers/parameterValidator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ export class ParameterValidator implements IOrchestratable {
private _respectPomXml: string;
private _respectFuncignore: string;
private _scmDoBuildDuringDeployment: string;
private _remoteBuild: string;
private _enableOryxBuild: string;
private _scmCredentials: IScmCredentials
private _sku: string;
private _remoteBuild: string;

constructor() {
this.parseScmCredentials = this.parseScmCredentials.bind(this);
Expand All @@ -44,9 +44,9 @@ export class ParameterValidator implements IOrchestratable {
this._respectPomXml = core.getInput(ConfigurationConstant.ParamInRespectPomXml);
this._respectFuncignore = core.getInput(ConfigurationConstant.ParamInRespectFuncignore);
this._scmDoBuildDuringDeployment = core.getInput(ConfigurationConstant.ParamInScmDoBuildDuringDeployment);
this._remoteBuild = core.getInput(ConfigurationConstant.ParamInRemoteBuild);
this._enableOryxBuild = core.getInput(ConfigurationConstant.ParamInEnableOryxBuild);
this._sku = core.getInput(ConfigurationConstant.ParamInSku);
this._remoteBuild = core.getInput(ConfigurationConstant.ParamInRemoteBuild);

// Validate field
if (this._slot !== undefined && this._slot.trim() === "") {
Expand All @@ -66,9 +66,9 @@ export class ParameterValidator implements IOrchestratable {
params.respectPomXml = Parser.IsTrueLike(this._respectPomXml);
params.respectFuncignore = Parser.IsTrueLike(this._respectFuncignore);
params.scmDoBuildDuringDeployment = ScmBuildUtil.FromString(this._scmDoBuildDuringDeployment);
params.remoteBuild = Parser.IsTrueLike(this._remoteBuild);
params.enableOryxBuild = EnableOryxBuildUtil.FromString(this._enableOryxBuild);
params.sku = this._sku.toLowerCase();
params.remoteBuild = Parser.IsTrueLike(this._remoteBuild);
return params;
}

Expand Down
2 changes: 1 addition & 1 deletion src/interfaces/IActionParameters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export interface IActionParameters {
respectPomXml: boolean;
respectFuncignore: boolean;
scmDoBuildDuringDeployment: ScmBuildConstant;
remoteBuild: boolean;
enableOryxBuild: EnableOryxBuildConstant;
sku: string;
remoteBuild: boolean;
}
4 changes: 2 additions & 2 deletions src/managers/builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ export class Builder {
respectPomXml: false,
respectFuncignore: false,
scmDoBuildDuringDeployment: ScmBuildConstant.Disabled,
remoteBuild: false,
enableOryxBuild: EnableOryxBuildConstant.Disabled,
sku: undefined
sku: undefined,
remoteBuild: false
}
}

Expand Down

0 comments on commit d2718e2

Please sign in to comment.