-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Docker imagename fix * docker image name and telemetry changes * kubernetes recompile with new docker-common * changed ui * rename task input
- Loading branch information
Showing
19 changed files
with
86 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
Tasks/Common/docker-common/registryauthenticationprovider/authenticationtokenprovider.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,23 @@ | ||
"use strict"; | ||
|
||
import * as tl from "vsts-task-lib/task"; | ||
import * as url from "url"; | ||
|
||
import RegistryAuthenticationToken from "./registryauthenticationtoken" | ||
|
||
export abstract class AuthenticationTokenProvider { | ||
// get registry login creds | ||
public abstract getAuthenticationToken(): RegistryAuthenticationToken | ||
|
||
protected getXMetaSourceClient(): string { | ||
var collectionUri: string = tl.getVariable('System.TeamFoundationCollectionUri'); | ||
var collectionUrlObject = url.parse(collectionUri); | ||
if(collectionUrlObject.hostname.toUpperCase().endsWith(".VISUALSTUDIO.COM")) { | ||
return "VSTS"; | ||
} | ||
|
||
return "TFS"; | ||
} | ||
} | ||
|
||
export default AuthenticationTokenProvider; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,11 +22,13 @@ tr.setInput('qualifyImageName', process.env[shared.TestEnvVars.qualifyImageName] | |
tr.setInput('azureSubscriptionEndpoint', 'AzureRMSpn'); | ||
tr.setInput('azureContainerRegistry', '{"loginServer":"ajgtestacr1.azurecr.io", "id" : "/subscriptions/c00d16c7-6c1f-4c03-9be1-6934a4c49682/resourcegroups/ajgtestacr1rg/providers/Microsoft.ContainerRegistry/registries/ajgtestacr1"}') | ||
tr.setInput('additionalImageTags', process.env[shared.TestEnvVars.additionalImageTags] || ''); | ||
tr.setInput('enforceDockerNamingConvention', process.env[shared.TestEnvVars.enforceDockerNamingConvention]); | ||
|
||
console.log("Inputs have been set"); | ||
|
||
process.env["RELEASE_RELEASENAME"] = "Release-1"; | ||
process.env["SYSTEM_DEFAULTWORKINGDIRECTORY"] = DefaultWorkingDirectory; | ||
process.env["SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"] = "https://abc.visualstudio.com/"; | ||
process.env["ENDPOINT_AUTH_dockerhubendpoint"] = "{\"parameters\":{\"username\":\"test\", \"password\":\"regpassword\", \"email\":\"[email protected]\",\"registry\":\"https://index.docker.io/v1/\"},\"scheme\":\"UsernamePassword\"}"; | ||
process.env["ENDPOINT_AUTH_SCHEME_AzureRMSpn"] = "ServicePrincipal"; | ||
process.env["ENDPOINT_AUTH_PARAMETER_AzureRMSpn_SERVICEPRINCIPALID"] = "spId"; | ||
|
@@ -72,6 +74,10 @@ a.exec[`docker build -f ${DockerFilePath} -t test/test:2`] = { | |
"code": 0, | ||
"stdout": "successfully build test/test:2 image" | ||
}; | ||
a.exec[`docker build -f ${DockerFilePath} -t test/Te st:2`] = { | ||
"code": 1, | ||
"stdout": "test/Te st:2 not valid imagename" | ||
}; | ||
a.exec[`docker build -f ${DockerFilePath} -t test/test:2 -t test/test`] = { | ||
"code": 0, | ||
"stdout": "successfully build test/test image with latest tag" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,7 @@ console.log("Inputs have been set"); | |
|
||
process.env["RELEASE_RELEASENAME"] = "Release-1"; | ||
process.env["SYSTEM_DEFAULTWORKINGDIRECTORY"] = DefaultWorkingDirectory; | ||
process.env["SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"] = "https://abc.visualstudio.com/"; | ||
process.env["ENDPOINT_AUTH_dockerhubendpoint"] = "{\"parameters\":{\"username\":\"test\", \"password\":\"regpassword\", \"email\":\"[email protected]\",\"registry\":\"https://index.docker.io/v1/\"},\"scheme\":\"UsernamePassword\"}"; | ||
process.env["ENDPOINT_AUTH_SCHEME_AzureRMSpn"] = "ServicePrincipal"; | ||
process.env["ENDPOINT_AUTH_PARAMETER_AzureRMSpn_SERVICEPRINCIPALID"] = "spId"; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,7 @@ console.log("Inputs have been set"); | |
|
||
process.env["RELEASE_RELEASENAME"] = "Release-1"; | ||
process.env["SYSTEM_DEFAULTWORKINGDIRECTORY"] = DefaultWorkingDirectory; | ||
process.env["SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"] = "https://abc.visualstudio.com/"; | ||
process.env["ENDPOINT_AUTH_dockerhubendpoint"] = "{\"parameters\":{\"username\":\"test\", \"password\":\"regpassword\", \"email\":\"[email protected]\",\"registry\":\"https://index.docker.io/v1/\"},\"scheme\":\"UsernamePassword\"}"; | ||
process.env["ENDPOINT_AUTH_SCHEME_AzureRMSpn"] = "ServicePrincipal"; | ||
process.env["ENDPOINT_AUTH_PARAMETER_AzureRMSpn_SERVICEPRINCIPALID"] = "spId"; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ | |
"version": { | ||
"Major": 0, | ||
"Minor": 4, | ||
"Patch": 11 | ||
"Patch": 12 | ||
}, | ||
"demands": [], | ||
"preview": "false", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ | |
"version": { | ||
"Major": 0, | ||
"Minor": 1, | ||
"Patch": 10 | ||
"Patch": 11 | ||
}, | ||
"demands": [], | ||
"preview": "false", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ | |
"version": { | ||
"Major": 0, | ||
"Minor": 1, | ||
"Patch": 10 | ||
"Patch": 11 | ||
}, | ||
"demands": [], | ||
"preview": "false", | ||
|