Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
261 changes: 185 additions & 76 deletions .pipelines/1es-migration/azure-pipelines.yml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Extensions/Ansible/Src/vss-extension.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"id": "vss-services-ansible",
"name": "Ansible",
"publisher": "ms-vscs-rm",
"version": "0.258.1",
"version": "0.261.2",
"public": true,
"description": "This extension executes an Ansible playbook using a specified inventory via command line interface",
"_description.comment": "The below format to define extensions is currently in preview and may change in future.",
Expand Down
2 changes: 1 addition & 1 deletion Extensions/AzureExp/Src/vss-extension.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"description": "Azure Exp feature rollout",
"public": false,
"categories": [
"Build and release"
"Azure Pipelines"
],
"files": [
{
Expand Down
2 changes: 1 addition & 1 deletion Extensions/BitBucket/Src/vss-extension.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"public": true,
"description": "Tools related to connecting with Bitbucket",
"_description.comment": "The below format to define artifact extensions is currently in preview and may change in future.",
"categories": [ "Integrate" ],
"categories": [ "Azure Pipelines" ],
"Tags": [ "Bitbucket", "Release", "DevOps", "Artifacts" ],
"targets": [
{
Expand Down
4 changes: 2 additions & 2 deletions Extensions/CircleCI/Src/vss-extension.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
"id": "vss-services-circleci-extension",
"name": "CircleCI artifacts for Release Pipeline",
"publisher": "ms-vscs-rm",
"version": "0.258.0",
"version": "0.261.0",
"public": true,
"description": "Tool for connecting with CircleCI",
"_description.comment": "The below format to define artifact extensions is currently in preview and may change in future.",
"categories": [ "Build and release", "Azure pipelines" ],
"categories": [ "Azure Pipelines" ],
"Tags": [ "CircleCI", "Release", "DevOps", "Artifacts", "Pipelines" ],
"targets": [
{
Expand Down
2 changes: 1 addition & 1 deletion Extensions/ExternalTfs/Src/vss-extension.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"description": "Deploy external TFS/ Azure DevOps artifacts using Release Management",
"_description.comment": "The below format to define artifact extensions is currently in preview and may change in future.",
"public": true,
"categories": [ "Build and release" ],
"categories": [ "Azure Pipelines" ],
"tags": [ "Artifacts", "DevOps", "Release" ],
"targets": [
{
Expand Down
4 changes: 2 additions & 2 deletions Extensions/IISWebAppDeploy/Src/vss-extension.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifestVersion": 1,
"extensionId": "iiswebapp",
"name": "IIS Web App Deployment Using WinRM",
"version": "1.258.0",
"version": "1.261.1",
"publisher": "ms-vscs-rm",
"description": "Using WinRM connect to the host Computer, to deploy a Web project using Web Deploy or a SQL DB using sqlpackage.exe.",
"public": true,
Expand All @@ -11,7 +11,7 @@
"large": "images/IIS_Web_App_Large.png"
},
"categories": [
"Build and release"
"Azure Pipelines"
],
"tags": [ ],
"links": {
Expand Down
83 changes: 81 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ gulp.task("TaskModuleTest", gulp.series('copy:TaskModuleTest', function() {
}));

gulp.task('prepublish:TaskModulePublish', function (done) {
return del([TaskModulesTestRoot], done);
return del([TaskModulesTestRoot], done);
});

gulp.task('TaskModulePublish', gulp.series('prepublish:TaskModulePublish', function (done) {
Expand Down Expand Up @@ -651,7 +651,86 @@ function compileUIExtensions(extensionRoot) {
};
}

gulp.task("build", gulp.series("compileNode"));
gulp.task("updateTestIds", function(cb) {
if (args.test) {
var buildExtensionsRoot = path.join(_buildRoot, 'Extensions');
if (fs.existsSync(buildExtensionsRoot)) {
var extensionDirs = fs.readdirSync(buildExtensionsRoot).filter(function (file) {
return fs.statSync(path.join(buildExtensionsRoot, file)).isDirectory();
});
extensionDirs.forEach(function (extName) {
// Check multiple possible locations for vss-extension.json
var possiblePaths = [
path.join(buildExtensionsRoot, extName, 'Src', 'vss-extension.json'),
path.join(buildExtensionsRoot, extName, 'src', 'vss-extension.json'),
path.join(buildExtensionsRoot, extName, 'vss-extension.json')
];

var manifestPath = null;
for (var i = 0; i < possiblePaths.length; i++) {
if (fs.existsSync(possiblePaths[i])) {
manifestPath = possiblePaths[i];
break;
}
}

if (manifestPath) {
try {
// Read file and handle potential BOM
var fileContent = fs.readFileSync(manifestPath, 'utf8');
// Remove BOM if present
if (fileContent.charCodeAt(0) === 0xFEFF) {
fileContent = fileContent.slice(1);
}

var manifest = JSON.parse(fileContent);
var updated = false;

// Check for both 'id' and 'extensionId' properties
var idProperty = manifest.id ? 'id' : (manifest.extensionId ? 'extensionId' : null);

if (idProperty && manifest[idProperty] && !manifest[idProperty].endsWith('-test')) {
manifest[idProperty] = manifest[idProperty] + '-test';
updated = true;
}

// Update name property
if (manifest.hasOwnProperty('name')) {
manifest.name = `${manifest.name} (Test)`;
}

// Always set public to false if it exists
if (manifest.hasOwnProperty('public') && manifest.public !== false) {
manifest.public = false;
updated = true;
} else if (!manifest.hasOwnProperty('public')) {
// Add public: false if it doesn't exist
manifest.public = false;
updated = true;
}

if (updated) {
// Write back without BOM
fs.writeFileSync(manifestPath, JSON.stringify(manifest, null, 2));
console.log('Updated manifest for test build: ' + manifestPath);
console.log(' - ' + idProperty + ': ' + manifest[idProperty]);
console.log(' - Public: ' + manifest.public);
} else if (idProperty && manifest[idProperty].endsWith('-test')) {
console.log('Extension already has -test suffix: ' + manifestPath);
}
} catch (e) {
console.error('Failed to update manifest: ' + manifestPath + ' - ' + e.message);
}
} else {
console.log('No vss-extension.json found for extension: ' + extName);
}
});
}
}
cb();
});

gulp.task("build", gulp.series("compileNode", "updateTestIds"));

gulp.task("handoff", function(cb) {
handoff(cb);
Expand Down