2016-09-16 00:49:32 +03:00
|
|
|
import vscode = require('vscode');
|
2017-03-02 04:49:54 +03:00
|
|
|
import { ImageItem, quickPickImage } from './utils/quick-pick-image';
|
|
|
|
import { reporter } from '../telemetry/telemetry';
|
2017-03-04 04:13:14 +03:00
|
|
|
const teleCmdId: string = 'vscode-docker.image.push';
|
2016-09-16 00:49:32 +03:00
|
|
|
|
2017-06-06 03:55:05 +03:00
|
|
|
export async function pushImage() {
|
|
|
|
|
|
|
|
const selectedItem: ImageItem = await quickPickImage();
|
|
|
|
if (selectedItem) {
|
|
|
|
const terminal = vscode.window.createTerminal(selectedItem.label);
|
|
|
|
terminal.sendText(`docker push ${selectedItem.label}`);
|
|
|
|
terminal.show();
|
|
|
|
if (reporter) {
|
|
|
|
reporter.sendTelemetryEvent('command', {
|
|
|
|
command: teleCmdId
|
|
|
|
});
|
|
|
|
}
|
|
|
|
};
|
2016-09-20 19:47:56 +03:00
|
|
|
}
|