Skip to content

Commit 7c19894

Browse files
committed
Merge branch 'master' into pr/11792
2 parents d435d9b + f3a613d commit 7c19894

File tree

299 files changed

+25058
-9695
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

299 files changed

+25058
-9695
lines changed
Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
name: Solution Integration Testing
2+
run-name: Running Solution Integration Testing on ${{ github.ref_name }}
3+
4+
on:
5+
pull_request_target:
6+
types: [opened, edited, reopened, synchronize]
7+
branches:
8+
- master
9+
paths:
10+
- 'Solutions/**/Package/mainTemplate.json'
11+
12+
permissions:
13+
id-token: write
14+
contents: read
15+
pull-requests: write
16+
17+
jobs:
18+
Run-solutionIntegration-Testimio:
19+
name: Solution Integration Testing - Testim.io
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout pull request branch
23+
uses: actions/checkout@v3
24+
with:
25+
ref: ${{ github.event.pull_request.head.ref }}
26+
repository: ${{ github.event.pull_request.head.repo.full_name }}
27+
# persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token.
28+
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
29+
30+
- name: Setup git config
31+
run: |
32+
git config --local user.name "github-actions[bot]"
33+
git config --local user.email "<>"
34+
35+
- name: Azure Login to Dev Account
36+
uses: azure/login@a65d910e8af852a8061c627c456678983e180302
37+
with:
38+
client-id: ${{ secrets.AZURE_SOLUTIONTESTING_DEV_CLIENT_ID }}
39+
tenant-id: ${{ secrets.AZURE_SOLUTIONTESTING_DEV_TENANT_ID }}
40+
allow-no-subscriptions: true
41+
42+
- name: Whitelist Runner IP
43+
run: |
44+
agentIP=$(curl -s https://api.ipify.org/)
45+
az keyvault network-rule add --name e2e-solIntegTesting-KV --ip-address $agentIP --query properties.networkAcls.ipRules
46+
47+
- name: Delete Scripts from branch
48+
run: |
49+
if [ -f "./evaluateAndExtractTemplate.py" ]; then rm ./evaluateAndExtractTemplate.py; fi
50+
if [ -f "./runUITests.py" ]; then rm ./runUITests.py; fi
51+
if [ -f "./requirements.txt" ]; then rm ./requirements.txt; fi
52+
if [ -f "./config.json" ]; then rm ./config.json; fi
53+
54+
- name: Download files from ADO
55+
run: |
56+
curl -u :$(az account get-access-token -o tsv --query accessToken) \
57+
-o evaluateAndExtractTemplate.py \
58+
"https://dev.azure.com/msazure/One/_apis/git/repositories/Sentinel-CATUtilities/items?path=/SolutionIntegrationTesting/.scripts/evaluateAndExtractTemplate.py&api-version=6.0" \
59+
-o runUITests.py \
60+
"https://dev.azure.com/msazure/One/_apis/git/repositories/Sentinel-CATUtilities/items?path=/SolutionIntegrationTesting/.scripts/runUITests.py&api-version=6.0" \
61+
-o requirements.txt \
62+
"https://dev.azure.com/msazure/One/_apis/git/repositories/Sentinel-CATUtilities/items?path=/SolutionIntegrationTesting/requirements.txt&api-version=6.0" \
63+
-o config.json \
64+
"https://dev.azure.com/msazure/One/_apis/git/repositories/Sentinel-CATUtilities/items?path=/SolutionIntegrationTesting/config.json&api-version=6.0"
65+
66+
- name: Setup Python Environment
67+
uses: actions/setup-python@v2
68+
with:
69+
python-version: '3.x'
70+
71+
- name: Install dependencies
72+
run: |
73+
python -m pip install --upgrade pip
74+
pip install -r requirements.txt
75+
76+
- name: Get Test Tenant Client ID and Tenant ID
77+
run: |
78+
echo "AZURE_TEST_CLIENT_ID=$(az keyvault secret show --name ClientId-Test --vault-name e2e-solIntegTesting-KV --query value -o tsv)" >> $GITHUB_ENV
79+
echo "AZURE_TEST_TENANT_ID=$(az keyvault secret show --name TenantId-Test --vault-name e2e-solIntegTesting-KV --query value -o tsv)" >> $GITHUB_ENV
80+
81+
- name: Azure Login to Test Tenant Account
82+
uses: azure/login@a65d910e8af852a8061c627c456678983e180302
83+
with:
84+
client-id: ${{ env.AZURE_TEST_CLIENT_ID }}
85+
tenant-id: ${{ env.AZURE_TEST_TENANT_ID }}
86+
allow-no-subscriptions: true
87+
88+
- name: Get Test Tenant Subscription
89+
run: |
90+
echo "TEST_TENANT_SUBSCRIPTION_ID=$(az account show --query id -o tsv)" >> $GITHUB_ENV
91+
92+
- name: Deploy Solution to Workspace, Evaluate and Extract Template Files
93+
continue-on-error: true # Continues even after failing so as to not block the PR
94+
run: |
95+
filePath="evaluateAndExtractTemplate.py"
96+
python $filePath
97+
98+
- name: Azure Login to Dev Account
99+
uses: azure/login@a65d910e8af852a8061c627c456678983e180302
100+
if: '!cancelled()'
101+
with:
102+
client-id: ${{ secrets.AZURE_SOLUTIONTESTING_DEV_CLIENT_ID }}
103+
tenant-id: ${{ secrets.AZURE_SOLUTIONTESTING_DEV_TENANT_ID }}
104+
allow-no-subscriptions: true
105+
106+
- name: Execute Tests on Testim
107+
env:
108+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
109+
GITHUB_REPOSITORY: ${{ github.repository }}
110+
PR_NUMBER: ${{ github.event.pull_request.number }}
111+
continue-on-error: true # Continues even after failing so as to not block the PR
112+
run: |
113+
filePath="runUITests.py"
114+
python $filePath
115+
116+
- name: Delist Runner IP
117+
if: '!cancelled()'
118+
run: |
119+
agentIP=$(curl -s https://api.ipify.org/)
120+
az keyvault network-rule remove --name e2e-solIntegTesting-KV --ip-address $agentIP --query properties.networkAcls.ipRules
Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
{
2+
"Name":"Confluence_Audit_CL",
3+
"Properties":[
4+
{
5+
"Name":"EventVendor",
6+
"Type":"String"
7+
},
8+
{
9+
"Name":"EventProduct",
10+
"Type":"String"
11+
},
12+
{
13+
"Name":"TimeGenerated",
14+
"Type":"DateTime"
15+
},
16+
{
17+
"Name":"AuthorUsername",
18+
"Type":"String"
19+
},
20+
{
21+
"Name":"AuthorAccountId",
22+
"Type":"String"
23+
},
24+
{
25+
"Name":"UserIdentity",
26+
"Type":"String"
27+
},
28+
{
29+
"Name":"AuthorType",
30+
"Type":"String"
31+
},
32+
{
33+
"Name":"AuthorDisplayName",
34+
"Type":"String"
35+
},
36+
{
37+
"Name":"UserName",
38+
"Type":"String"
39+
},
40+
{
41+
"Name":"AuthorIsExternalCollaborator",
42+
"Type":"Bool"
43+
},
44+
{
45+
"Name":"AuthorUserKey",
46+
"Type":"String"
47+
},
48+
{
49+
"Name":"UserSid",
50+
"Type":"String"
51+
},
52+
{
53+
"Name":"AuthorAccountType",
54+
"Type":"String"
55+
},
56+
{
57+
"Name":"AuthorPublicName",
58+
"Type":"String"
59+
},
60+
{
61+
"Name":"AuthorExternalCollaborator",
62+
"Type":"Bool"
63+
},
64+
{
65+
"Name":"RemoteAddress",
66+
"Type":"String"
67+
},
68+
{
69+
"Name":"SrcIpAddr",
70+
"Type":"String"
71+
},
72+
{
73+
"Name":"CreationDate",
74+
"Type":"Double"
75+
},
76+
{
77+
"Name":"EventCreationTime",
78+
"Type":"Double"
79+
},
80+
{
81+
"Name":"Summary",
82+
"Type":"String"
83+
},
84+
{
85+
"Name":"EventMessage",
86+
"Type":"String"
87+
},
88+
{
89+
"Name":"Description",
90+
"Type":"String"
91+
},
92+
{
93+
"Name":"Category",
94+
"Type":"String"
95+
},
96+
{
97+
"Name":"EventCategoryType",
98+
"Type":"String"
99+
},
100+
{
101+
"Name":"SysAdmin",
102+
"Type":"Bool"
103+
},
104+
{
105+
"Name":"SuperAdmin",
106+
"Type":"Bool"
107+
},
108+
{
109+
"Name":"AffectedObjectName",
110+
"Type":"String"
111+
},
112+
{
113+
"Name":"AffectedObjectObjectType",
114+
"Type":"String"
115+
},
116+
{
117+
"Name":"ChangedValues",
118+
"Type":"String"
119+
},
120+
{
121+
"Name":"AssociatedObjects",
122+
"Type":"String"
123+
}
124+
]
125+
}
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
{
2+
"name": "Confluence_Audit_v2_CL",
3+
"Properties": [
4+
{
5+
"name": "Author",
6+
"type": "dynamic"
7+
},
8+
{
9+
"name": "RemoteAddress",
10+
"type": "string"
11+
},
12+
{
13+
"name": "CreationDate",
14+
"type": "long"
15+
},
16+
{
17+
"name": "EventSummary",
18+
"type": "string"
19+
},
20+
{
21+
"name": "Description",
22+
"type": "string"
23+
},
24+
{
25+
"name": "EventCategory",
26+
"type": "string"
27+
},
28+
{
29+
"name": "SysAdmin",
30+
"type": "boolean"
31+
},
32+
{
33+
"name": "SuperAdmin",
34+
"type": "boolean"
35+
},
36+
{
37+
"name": "AffectedObject",
38+
"type": "dynamic"
39+
},
40+
{
41+
"name": "ChangedValues",
42+
"type": "dynamic"
43+
},
44+
{
45+
"name": "AssociatedObjects",
46+
"type": "dynamic"
47+
},
48+
{
49+
"name": "TimeGenerated",
50+
"type": "datetime"
51+
},
52+
{
53+
"name": "EventVendor",
54+
"type": "string"
55+
},
56+
{
57+
"name": "EventProduct",
58+
"type": "string"
59+
},
60+
{
61+
"name": "AuthorDisplayName",
62+
"type": "string"
63+
},
64+
{
65+
"name": "AuthorType",
66+
"type": "string"
67+
},
68+
{
69+
"name": "AuthorAccountId",
70+
"type": "string"
71+
},
72+
{
73+
"name": "AffectedObjectName",
74+
"type": "string"
75+
},
76+
{
77+
"name": "AffectedObjectType",
78+
"type": "string"
79+
}
80+
]
81+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"Name": "ForescoutComplianceStatus_CL",
3+
"Properties": [
4+
{
5+
"Name": "TimeGenerated",
6+
"Type": "datetime"
7+
},
8+
{
9+
"name": "TimeGenerated",
10+
"type": "datetime"
11+
},
12+
{
13+
"name": "UploadTime",
14+
"type": "datetime"
15+
},
16+
{
17+
"name": "Ipv4Addr",
18+
"type": "string"
19+
},
20+
{
21+
"name": "Ipv6Addr",
22+
"type": "dynamic"
23+
},
24+
{
25+
"name": "MacAddr",
26+
"type": "string"
27+
},
28+
{
29+
"name": "EmIpAddr",
30+
"type": "string"
31+
},
32+
{
33+
"name": "HostProperties",
34+
"type": "dynamic"
35+
}
36+
]
37+
}

0 commit comments

Comments
 (0)