Skip to content

Commit

Permalink
Merge pull request #157 from stuartleeks/sl/fix-azdo-simple
Browse files Browse the repository at this point in the history
Fix builds
  • Loading branch information
stuartleeks authored Jul 29, 2022
2 parents f218281 + 998b153 commit 7431d9c
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 10 deletions.
5 changes: 3 additions & 2 deletions azdo-task/DevcontainersCi/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ function runPost() {
if (!imageName) {
if (pushOption) {
// pushOption was set (and not to "never") - give an error that imageName is required
task.setResult(task.TaskResult.Failed, 'imageName input is required to push images');
task.setResult(task.TaskResult.Failed, `imageName input is required to push images (push: ${pushOption})`);
}
return;
}
Expand Down Expand Up @@ -16886,6 +16886,7 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume



const cliVersion = "0.7.1";
function getSpecCliInfo() {
// // TODO - this is temporary until the CLI is installed via npm
// // TODO - ^ could consider an `npm install` from the folder
Expand Down Expand Up @@ -16930,7 +16931,7 @@ function installCli(exec) {
return exitCode === 0;
}
console.log('** Installing @devcontainers/cli');
const { exitCode, stdout, stderr } = yield exec('bash', ['-c', 'npm install -g @devcontainers/cli'], {});
const { exitCode, stdout, stderr } = yield exec('bash', ['-c', `npm install -g @devcontainers/cli@${cliVersion}`], {});
if (exitCode != 0) {
console.log(stdout);
console.error(stderr);
Expand Down
2 changes: 1 addition & 1 deletion azdo-task/DevcontainersCi/dist/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion azdo-task/DevcontainersCi/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ function runPost() {
if (!imageName) {
if (pushOption) {
// pushOption was set (and not to "never") - give an error that imageName is required
task.setResult(task.TaskResult.Failed, 'imageName input is required to push images');
task.setResult(task.TaskResult.Failed, `imageName input is required to push images (push: ${pushOption})`);
}
return;
}
Expand Down
2 changes: 1 addition & 1 deletion azdo-task/DevcontainersCi/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ export async function runPost(): Promise<void> {
// pushOption was set (and not to "never") - give an error that imageName is required
task.setResult(
task.TaskResult.Failed,
'imageName input is required to push images',
`imageName input is required to push images (push: ${pushOption})`,
);
}
return;
Expand Down
1 change: 0 additions & 1 deletion azdo-task/DevcontainersCi/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
"filter": "Push if buildReasonsForPush, sourceBranchFilterForPush, and pushOnFailedBuild conditions are met",
"always": "Always push"
},
"defaultValue": "filter",
"required": false,
"label": "Control when images are pushed to the registry"
},
Expand Down
5 changes: 4 additions & 1 deletion common/src/dev-container-cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ import path from 'path';
import {env} from 'process';
import {promisify} from 'util';
import {ExecFunction} from './exec';

const cliVersion = "0.7.1";

export interface DevContainerCliError {
outcome: 'error';
code: number;
Expand Down Expand Up @@ -50,7 +53,7 @@ async function installCli(exec: ExecFunction): Promise<boolean> {
return exitCode === 0;
}
console.log('** Installing @devcontainers/cli');
const {exitCode, stdout, stderr} = await exec('bash', ['-c', 'npm install -g @devcontainers/cli'], {});
const {exitCode, stdout, stderr} = await exec('bash', ['-c', `npm install -g @devcontainers/cli@${cliVersion}`], {});
if (exitCode != 0) {
console.log(stdout);
console.error(stderr);
Expand Down
3 changes: 2 additions & 1 deletion common_lib/dev-container-cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ exports.devcontainer = void 0;
const child_process_1 = require("child_process");
const fs_1 = __importDefault(require("fs"));
const util_1 = require("util");
const cliVersion = "0.7.1";
function getSpecCliInfo() {
// // TODO - this is temporary until the CLI is installed via npm
// // TODO - ^ could consider an `npm install` from the folder
Expand Down Expand Up @@ -60,7 +61,7 @@ function installCli(exec) {
return exitCode === 0;
}
console.log('** Installing @devcontainers/cli');
const { exitCode, stdout, stderr } = yield exec('bash', ['-c', 'npm install -g @devcontainers/cli'], {});
const { exitCode, stdout, stderr } = yield exec('bash', ['-c', `npm install -g @devcontainers/cli@${cliVersion}`], {});
if (exitCode != 0) {
console.log(stdout);
console.error(stderr);
Expand Down
3 changes: 2 additions & 1 deletion github-action/dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion github-action/dist/index.js.map

Large diffs are not rendered by default.

0 comments on commit 7431d9c

Please sign in to comment.