Skip to content

Commit

Permalink
V7 release prep (#296)
Browse files Browse the repository at this point in the history
* Fix imports in the task
* Change the default docker tag to from 0.6 to 0.7
  • Loading branch information
mburumaxwell authored Jun 16, 2022
1 parent 29c6636 commit 47e9574
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 17 deletions.
6 changes: 3 additions & 3 deletions src/extension/task/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import tl = require("azure-pipelines-task-lib/task");
import tr = require("azure-pipelines-task-lib/toolrunner");
import * as tl from "azure-pipelines-task-lib/task"
import { ToolRunner } from "azure-pipelines-task-lib/toolrunner"
import { IDependabotUpdate } from "./models/IDependabotUpdate";
import getConfigFromInputs from "./utils/getConfigFromInputs";
import getSharedVariables from "./utils/getSharedVariables";
Expand All @@ -22,7 +22,7 @@ async function run() {
// For each update run docker container
for (const update of updates) {
// Prepare the docker task
let dockerRunner: tr.ToolRunner = tl.tool(tl.which("docker", true));
let dockerRunner: ToolRunner = tl.tool(tl.which("docker", true));
dockerRunner.arg(["run"]); // run command
dockerRunner.arg(["--rm"]); // remove after execution
dockerRunner.arg(["-i"]); // attach pseudo tty
Expand Down
2 changes: 1 addition & 1 deletion src/extension/task/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@
"groupName": "advanced",
"label": "Tag of the docker image to be pulled.",
"required": false,
"defaultValue": "0.6",
"defaultValue": "0.7",
"helpMarkDown": "The image tag to use when pulling the docker container used by the task. A tag also defines the version. By default, the task decides which tag/version to use. This can be the latest or most stable version. You can also use `major.minor` format to get the latest patch"
},
{
Expand Down
2 changes: 1 addition & 1 deletion src/extension/task/utils/extractOrganization.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { setResult, TaskResult } from "azure-pipelines-task-lib";
import { setResult, TaskResult } from "azure-pipelines-task-lib/task";

/**
* Extract organization name from organization URL
Expand Down
6 changes: 2 additions & 4 deletions src/extension/task/utils/getAzureDevOpsAccessToken.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
debug,
getEndpointAuthorizationParameter,
getInput,
} from "azure-pipelines-task-lib";
} from "azure-pipelines-task-lib/task";

/**
* Prepare the access token for Azure DevOps Repos.
Expand All @@ -15,9 +15,7 @@ import {
export default function getAzureDevOpsAccessToken() {
let systemAccessToken: string = getInput("azureDevOpsAccessToken");
if (!systemAccessToken) {
debug(
"No custom token provided. The SystemVssConnection's AccessToken shall be used."
);
debug("No custom token provided. The SystemVssConnection's AccessToken shall be used.");
systemAccessToken = getEndpointAuthorizationParameter(
"SystemVssConnection",
"AccessToken",
Expand Down
2 changes: 1 addition & 1 deletion src/extension/task/utils/getConfigFromInputs.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getInput, getVariable } from "azure-pipelines-task-lib";
import { getInput } from "azure-pipelines-task-lib/task";
import { IDependabotUpdate } from "../models/IDependabotUpdate";

/**
Expand Down
2 changes: 1 addition & 1 deletion src/extension/task/utils/getGithubAccessToken.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
getEndpointAuthorization,
getInput,
loc,
} from "azure-pipelines-task-lib";
} from "azure-pipelines-task-lib/task";

/**
* Extract access token from Github endpoint
Expand Down
2 changes: 1 addition & 1 deletion src/extension/task/utils/getSharedVariables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
getBoolInput,
getInput,
getDelimitedInput,
} from "azure-pipelines-task-lib";
} from "azure-pipelines-task-lib/task";
import extractHostname from "./extractHostname";
import extractOrganization from "./extractOrganization";
import extractVirtualDirectory from "./extractVirtualDirectory";
Expand Down
6 changes: 2 additions & 4 deletions src/extension/task/utils/getTargetRepository.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { debug, getInput, getVariable } from "azure-pipelines-task-lib";
import { debug, getInput, getVariable } from "azure-pipelines-task-lib/task";

/**
* Extract the target repository from the `targetRepositoryName` input
Expand All @@ -13,9 +13,7 @@ export default function getTargetRepository() {
// Prepare the repository
let repository: string = getInput("targetRepositoryName");
if (!repository) {
debug(
"No custom repository provided. The Pipeline Repository Name shall be used."
);
debug("No custom repository provided. The Pipeline Repository Name shall be used.");
repository = getVariable("Build.Repository.Name");
}

Expand Down
2 changes: 1 addition & 1 deletion src/extension/task/utils/parseConfigFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { IDependabotUpdate } from "../models/IDependabotUpdate";
import { load } from "js-yaml";
import * as fs from "fs";
import * as path from "path";
import { getVariable } from "azure-pipelines-task-lib";
import { getVariable } from "azure-pipelines-task-lib/task";

/**
* Parse the dependabot config YAML file to specify update(s) configuration
Expand Down

0 comments on commit 47e9574

Please sign in to comment.