You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Updating MavenAuthenticateV0 to allow new service connection type (#20229)
* Updating MavenAuthenticateV0 to allow new service connection type
* Updated task.loc.json to not use str literals
* Updated L0 tests to be compatible with mockery and generated wif version
* Updated username for service connection and task version
* Wrapping wif code
* Reorganized code to authenticate federated connection first and then other connections if there is none
* Specifying os type even for empty input test
* Using additional feedName input for auth id and checked task works with new service connection
* Parsing url for feed name
* Added example feed url and check for both feed url and entra connection
* Matching task.loc.json files
* Updated task str's
* Updated maven auth for cfs compliance
* Updated other task components since removing feedUrl
* task.loc.json needs full string
* Updated task version for BuildConfigGen
* Trying to match task.loc.json files for WIF
* Updated str's
* Matched task.loc.json strings
* Using dependency range and sp guid for wif username
* Reusing utils method for wif registries
* Going back one commit
---------
Co-authored-by: Abby Powell <[email protected]>
Copy file name to clipboardExpand all lines: Tasks/MavenAuthenticateV0/Strings/resources.resjson/en-US/resources.resjson
+7-1Lines changed: 7 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -3,17 +3,23 @@
3
3
"loc.helpMarkDown": "[Learn more about this task](https://docs.microsoft.com/azure/devops/pipelines/tasks/package/maven-authenticate)",
4
4
"loc.description": "Provides credentials for Azure Artifacts feeds and external maven repositories",
5
5
"loc.instanceNameFormat": "Maven Authenticate",
6
+
"loc.input.label.workloadIdentityServiceConnection": "'Entra Workload ID-backed Azure DevOps user' Service Connection",
7
+
"loc.input.help.workloadIdentityServiceConnection": "This is an Entra Workload ID-backed Azure DevOps user Service Connection. If this is set, the input mavenServiceConnections will be ignored.",
6
8
"loc.input.label.artifactsFeeds": "Feeds",
7
9
"loc.input.label.mavenServiceConnections": "Credentials for repositories outside this organization/collection",
8
10
"loc.input.help.mavenServiceConnections": "Credentials to use for external repositories located in the project's pom.xml.",
9
11
"loc.messages.Warning_FeedEntryAlreadyExists": "The settings for the feed or repository '%s' already exists in the users settings.xml file.",
10
12
"loc.messages.Warning_NoEndpointsToAuth": "No repositories were selected to authenticate, please check your task configuration.",
13
+
"loc.messages.Warning_TokenNotGenerated": "Unable to use a federated token",
11
14
"loc.messages.Info_GeneratingExternalRepositories": "Generating configs for %s external repositories.",
12
15
"loc.messages.Info_GeneratingInternalFeeds": "Generating configs for %s internal feeds.",
13
16
"loc.messages.Info_M2FolderDoesntExist": ".m2 folder not found at location %s, creating new folder.",
14
17
"loc.messages.Info_SettingsXmlRead": "Adding authentication to settings file %s.",
15
18
"loc.messages.Info_CreatingSettingsXml": "Creating new settings.xml at path %s.",
16
19
"loc.messages.Info_WritingToSettingsXml": "Writing new settings.xml with added authentication.",
20
+
"loc.messages.Info_AddingFederatedFeedAuth": "Adding auth information from federated service connection %s for feed %s",
21
+
"loc.messages.Info_SuccessAddingFederatedFeedAuth": "Successfully added auth for feed %s with federated credentials.",
17
22
"loc.messages.Error_InvalidServiceConnection": "The service connection for %s is invalid.",
18
-
"loc.messages.Error_FailedCleanupM2": "Failed to delete credentials from the user settings.xml file: %s"
23
+
"loc.messages.Error_FailedCleanupM2": "Failed to delete credentials from the user settings.xml file: %s",
24
+
"loc.messages.Error_FailedToGetServiceConnectionAuth": "Unable to get federated credentials from service connection: %s."
assert.equal(data.match(/<id>feedName1<\/id>/gi).length,1,"Only one id entry should be present.");
113
109
114
110
assert(tr.stderr.length===0,"should not have written to stderr");
115
-
assert(tr.stdOutContained("vso[task.issue type=warning;]loc_mock_Warning_FeedEntryAlreadyExists"),"Entry already exists warning should be displayed");
111
+
assert(tr.stdOutContained("vso[task.issue type=warning;source=TaskInternal;]loc_mock_Warning_FeedEntryAlreadyExists"),"Entry already exists warning should be displayed");
116
112
assert(tr.succeeded,"task should have succeeded");
117
-
118
-
done();
119
113
});
120
114
121
-
it("it should create a new settings.xml in the .m2 folder and add auth for 3 different types of service connections.",(done: Mocha.Done)=>{
115
+
it("it should create a new settings.xml in the .m2 folder and add auth for 3 different types of service connections.",async()=>{
assert.equal(tl.ls(null,[m2DirPath]).length,0,"Settings.xml file should not be created.");
168
160
169
161
assert(tr.stderr.length===0,"should not have written to stderr");
170
162
assert(tr.succeeded,"task should have succeeded");
171
-
assert(tr.stdOutContained("vso[task.issue type=warning;]loc_mock_Warning_NoEndpointsToAuth"),"No endpoints warning should be displayed");
172
-
173
-
done();
163
+
assert(tr.stdOutContained("vso[task.issue type=warning;source=TaskInternal;]loc_mock_Warning_NoEndpointsToAuth"),"The no endpoints warning should be displayed");
0 commit comments