Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
be811c1
phase1 changes for cicd improvements.
mohitpavan Feb 20, 2025
d367912
deleting js files.
mohitpavan Feb 20, 2025
481a6a1
adding js files to git ignore.
mohitpavan Feb 20, 2025
b8bfb4f
Your commit message
mohitpavan Feb 20, 2025
efaebc8
adding tsc in the pipeline.
mohitpavan Feb 20, 2025
10a8e48
adding the npm install typescript seperately.
mohitpavan Feb 20, 2025
9ffdb35
adding a commment.
mohitpavan Feb 20, 2025
d2b3468
reverting the print statements from portal to normal prints.
mohitpavan Feb 20, 2025
9746ca2
phase2 changes for app components and server metricss config.
mohitpavan Feb 20, 2025
da21f25
[phase3: CICD] adding over-ride params and outputVar support in the P…
mohitpavan Feb 21, 2025
059935e
[phase4: CICD] adding the post process job for cancellation.
mohitpavan Feb 21, 2025
271bb43
pr comments.
mohitpavan Feb 21, 2025
0e6bb61
corrections for errors.
mohitpavan Feb 21, 2025
07dcb62
commit to trigger workflow.
mohitpavan Feb 21, 2025
215b418
some fix.
mohitpavan Feb 21, 2025
deb0a07
try.
mohitpavan Feb 21, 2025
6567d10
adding checks on empty strings.
mohitpavan Feb 21, 2025
a0df7c4
Merge branch 'main' of https://github.com/Azure/load-testing into use…
mohitpavan Feb 21, 2025
76dd23e
pr comments.
mohitpavan Feb 21, 2025
e3aa8e3
tsc
mohitpavan Feb 21, 2025
a50b8db
adding check for empty string too.
mohitpavan Feb 21, 2025
67651b3
tsc
mohitpavan Feb 21, 2025
b96fdf8
treiggering workflow to check postprocess.
mohitpavan Feb 21, 2025
d73b517
adding baseUri to env's
mohitpavan Feb 21, 2025
0bc788c
tsc
mohitpavan Feb 21, 2025
9e564f5
trry override params.
mohitpavan Feb 21, 2025
9927b05
try
mohitpavan Feb 21, 2025
6ca7212
printing over-rde params.
mohitpavan Feb 21, 2025
94bab56
iosolating the over-ride params.
mohitpavan Feb 21, 2025
86864ca
changing the way to interpret over-ride params
mohitpavan Feb 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 9 additions & 13 deletions .github/workflows/pr_check_load_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,7 @@ jobs:
run: |
npm install --include=dev -f
npm ci
npm install typescript -g
tsc
# (note:mohit) - generally typescript is ignored somehow in the installation and now we want to ignore the js files for main branch hence we need tsc and npm install seperately.

- name: Azure authentication
uses: azure/login@v1
continue-on-error: false
Expand All @@ -73,23 +71,21 @@ jobs:
echo "::set-output name=GUID::$(uuidgen)"
fi
shell : bash

- name: Set up testName
shell: bash
run: |
# copying the files to a new file and editing the testId for each file in the copied file.
# replacing 'testId'(the thing present in the file.) with the new testId ('${{ steps.guid.outputs.GUID }}') in the copied file.
cp ${{ matrix.configFile }} test-config-${{ steps.guid.outputs.GUID }}.yaml
sed -i 's/testId/${{ steps.guid.outputs.GUID }}/g' test-config-${{ steps.guid.outputs.GUID }}.yaml


- name: 'Azure Load Testing'
uses: ./
id: alt
with:
loadTestConfigFile: test-config-${{ steps.guid.outputs.GUID }}.yaml
loadTestConfigFile: ${{ matrix.configFile }}
loadTestResource: ${{ env.LOAD_TEST_RESOURCE }}
resourceGroup: ${{ env.LOAD_TEST_RESOURCE_GROUP }}
overRideParameters: "{\"testId\":\"${{ steps.guid.outputs.GUID }}\"}"
outputVariableName: 'loadTestRunId'
continue-on-error: true

- name: Print the Output
run: echo "The Test ID is ${{ steps.alt.outputs['loadTestRunId.testRunId'] }}"

- name: Check for results and report files
run: |
if [[ -d "./loadTest" ]]; then
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -334,4 +334,3 @@ node_modules/
.vscode
TmpFiles
loadTest
lib
8 changes: 8 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,17 @@ inputs:
env:
description: 'Enter env in JSON'
required: false
overrideParameters:
description: 'Override parameters in the YAML config file using the JSON format with testId, displayName, description, engineInstances, autoStop supported.'
required: false
outputVariableName:
description: 'Name of the output variable that stores the test run ID for use in subsequent tasks.'
required: false

branding:
icon: 'extension-icon.svg'
color: 'blue'
runs:
using: 'node20'
main: 'lib/main.js'
post: 'lib/postProcessJob.js'
67 changes: 67 additions & 0 deletions lib/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
const util = __importStar(require("./models/FileUtils"));
const UtilModels_1 = require("./models/UtilModels");
const fs = __importStar(require("fs"));
const core = __importStar(require("@actions/core"));
const AuthenticationUtils_1 = require("./models/AuthenticationUtils");
const TaskModels_1 = require("./models/TaskModels");
const APISupport_1 = require("./models/APISupport");
function run() {
return __awaiter(this, void 0, void 0, function* () {
try {
let authContext = new AuthenticationUtils_1.AuthenticationUtils();
let yamlConfig = new TaskModels_1.YamlConfig();
let apiSupport = new APISupport_1.APISupport(authContext, yamlConfig);
yield authContext.authorize();
yield apiSupport.getResource();
core.exportVariable(UtilModels_1.PostTaskParameters.baseUri, apiSupport.baseURL);
yield apiSupport.getTestAPI(false);
if (fs.existsSync(UtilModels_1.resultFolder)) {
util.deleteFile(UtilModels_1.resultFolder);
}
fs.mkdirSync(UtilModels_1.resultFolder);
yield apiSupport.createTestAPI();
let outputVar = {
testRunId: yamlConfig.runTimeParams.testRunId
};
core.setOutput(`${yamlConfig.outputVariableName}.${UtilModels_1.OutPutVariablesConstants.testRunId}`, outputVar.testRunId);
}
catch (err) {
core.setFailed(err.message);
}
});
}
run();
2 changes: 2 additions & 0 deletions lib/models/APIResponseModel.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
Loading
Loading