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
|
|
|
|
|
|
|
export function pushImage() {
|
2016-10-20 07:25:54 +03:00
|
|
|
quickPickImage(false).then(function (selectedItem: ImageItem) {
|
2016-09-20 19:47:56 +03:00
|
|
|
if (selectedItem) {
|
|
|
|
let terminal = vscode.window.createTerminal(selectedItem.label);
|
|
|
|
terminal.sendText(`docker push ${selectedItem.label}`);
|
|
|
|
terminal.show();
|
2017-03-02 04:49:54 +03:00
|
|
|
if (reporter) {
|
|
|
|
reporter.sendTelemetryEvent('command', {
|
2017-03-04 04:13:14 +03:00
|
|
|
command: teleCmdId
|
2017-03-02 04:49:54 +03:00
|
|
|
});
|
|
|
|
}
|
2016-09-20 19:47:56 +03:00
|
|
|
};
|
2016-09-16 00:49:32 +03:00
|
|
|
});
|
2016-09-20 19:47:56 +03:00
|
|
|
}
|