Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding buildctl task #11549

Merged
merged 15 commits into from
Oct 21, 2019
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ Tasks/CondaEnvironmentV0/* @leantk

Tasks/CondaEnvironmentV1/* @leantk

Tasks/ContainerBuildV0/* @vithati @prebansa

Tasks/CopyFilesV2/* @jtpetty

Tasks/CopyFilesOverSSHV0/* @leantk
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzureFunctionOnKubernetesV0/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"version": {
"Major": 0,
"Minor": 160,
"Patch": 2
"Patch": 3
},
"demands": [],
"groups": [
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzureFunctionOnKubernetesV0/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"version": {
"Major": 0,
"Minor": 160,
"Patch": 2
"Patch": 3
},
"demands": [],
"groups": [
Expand Down
8 changes: 7 additions & 1 deletion Tasks/Common/docker-common-v2/containerconnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,13 @@ export default class ContainerConnection {
private oldDockerConfigContent: string;
prebansa marked this conversation as resolved.
Show resolved Hide resolved

constructor() {
this.dockerPath = tl.which("docker", true);
if(process.env["RUNNING_ON"] == "KUBERNETES") {
prebansa marked this conversation as resolved.
Show resolved Hide resolved
this.dockerPath = tl.which("img", true);
prebansa marked this conversation as resolved.
Show resolved Hide resolved
}
else {
this.dockerPath = tl.which("docker", true);
}

}

public createCommand(): tr.ToolRunner {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"loc.friendlyName": "Container Build",
"loc.helpMarkDown": "[Learn more about this task](https://go.microsoft.com/fwlink/?linkid=2107300)",
"loc.description": "Container Build Task",
"loc.instanceNameFormat": "Container Build Task",
"loc.input.label.poolService": "Pool Service (applicable when running on Kubernetes)",
"loc.input.help.poolService": "Name of the service applicable when running on Kubernetes.",
"loc.input.label.dockerRegistryServiceConnection": "Docker registry service connection",
"loc.input.help.dockerRegistryServiceConnection": "Select a Docker registry service connection.",
"loc.input.label.repository": "Container repository",
"loc.input.help.repository": "Name of the repository within the container registry.",
"loc.input.label.Dockerfile": "Dockerfile",
"loc.input.help.Dockerfile": "Path to Dockerfile.",
"loc.input.label.buildContext": "Build context",
"loc.input.help.buildContext": "Path to Build context.",
"loc.input.label.tags": "Tags",
"loc.input.help.tags": "A list of tags in separate lines. Tags are used while building and pushing the image to container registry.",
"loc.messages.ContainerPatternNotFound": "No pattern found in Docker filepath parameter",
"loc.messages.CouldNotFindDockerConfig": "Could not find Docker Config. Either DOCKER_CONFIG variable is not set, or the config file is outside the temp directory, or the file does not exist. DOCKER_CONFIG: %s",
"loc.messages.BuildctlLatestNotKnown": "Cannot get the latest Buildctl info from %s. Error %s. Using default Buildctl version %s.",
"loc.messages.BuildctlDownloadFailed": "Failed to download Buildctl from location %s. Error %s",
"loc.messages.BuildctlNotFoundInFolder": "Buildctl executable not found in path %s",
"loc.messages.FileContentSynced": "Synced the file content to the disk. The content is %s.",
"loc.messages.VerifyBuildctlInstallation": "Verifying Buildctl installation...",
"loc.messages.WritingDockerConfigToTempFile": "Writing Docker config to temp file. File path: %s, Docker config: %s"
}
1,098 changes: 1,098 additions & 0 deletions Tasks/ContainerBuildV0/ThirdPartyNotices.txt

Large diffs are not rendered by default.

Binary file added Tasks/ContainerBuildV0/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions Tasks/ContainerBuildV0/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 26 additions & 0 deletions Tasks/ContainerBuildV0/make.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"common": [
{
"module": "../Common/docker-common-v2",
"type": "node",
"dest" : "./",
"compile" : true
},
{
"module": "../Common/azure-arm-rest-v2",
"type": "node",
"dest": "./",
"compile": true
}
],
"rm": [
{
"items": [
"node_modules/azure-arm-rest/node_modules/vsts-task-lib",
"node_modules/buildctl-common/node_modules/azure-pipelines-task-lib",
"node_modules/docker-common-v2/node_modules/azure-pipelines-task-lib"
],
"options": "-Rf"
}
]
}
Loading