Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
epm-docker-test
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
epm-docker-test
Commits
e2b69b04
Commit
e2b69b04
authored
May 09, 2026
by
Ivan Mazhukin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add parallel run action and systems picker
parent
1f8ce112
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
79 additions
and
9 deletions
+79
-9
README.md
vscode-extension/README.md
+1
-0
extension.js
vscode-extension/extension.js
+73
-9
package.json
vscode-extension/package.json
+5
-0
No files found.
vscode-extension/README.md
View file @
e2b69b04
...
...
@@ -36,6 +36,7 @@ The same VSIX can be installed from the VS Code command `Extensions: Install fro
## Actions
-
`Run app on systems`
: asks for an app and target systems.
-
`Run app on systems parallel`
: asks for an app and target systems, then passes
`--parallel`
.
-
`Run app preset`
: asks for an app and
`main`
,
`russian`
, or
`all`
.
-
`Run exec command`
: asks for a shell command and target systems or preset.
-
`./bin/epm play <app>`
: runs a local play command outside Docker.
...
...
vscode-extension/extension.js
View file @
e2b69b04
...
...
@@ -25,7 +25,8 @@ function activate(context) {
context
.
subscriptions
.
push
(
status
,
vscode
.
commands
.
registerCommand
(
'epmDockerTest.runQuick'
,
runQuick
),
vscode
.
commands
.
registerCommand
(
'epmDockerTest.runApp'
,
runApp
),
vscode
.
commands
.
registerCommand
(
'epmDockerTest.runApp'
,
()
=>
runApp
(
false
)),
vscode
.
commands
.
registerCommand
(
'epmDockerTest.runAppParallel'
,
()
=>
runApp
(
true
)),
vscode
.
commands
.
registerCommand
(
'epmDockerTest.runPreset'
,
runPreset
),
vscode
.
commands
.
registerCommand
(
'epmDockerTest.runExec'
,
runExec
),
vscode
.
commands
.
registerCommand
(
'epmDockerTest.runLocalPlay'
,
()
=>
runLocalPlay
(
false
)),
...
...
@@ -78,6 +79,7 @@ class ActionsProvider {
const
builtIns
=
[
commandItem
(
'Run app on systems'
,
'epmDockerTest.runApp'
,
undefined
,
new
vscode
.
ThemeIcon
(
'run'
)),
commandItem
(
'Run app on systems parallel'
,
'epmDockerTest.runAppParallel'
,
undefined
,
new
vscode
.
ThemeIcon
(
'run-all'
)),
commandItem
(
'Run app preset'
,
'epmDockerTest.runPreset'
,
undefined
,
new
vscode
.
ThemeIcon
(
'list-selection'
)),
commandItem
(
'Run exec command'
,
'epmDockerTest.runExec'
,
undefined
,
new
vscode
.
ThemeIcon
(
'terminal'
)),
separatorItem
(
'Local EPM'
),
...
...
@@ -113,6 +115,7 @@ function separatorItem(label) {
async
function
runQuick
()
{
const
choice
=
await
vscode
.
window
.
showQuickPick
([
{
label
:
'$(run) Run app on systems'
,
command
:
'epmDockerTest.runApp'
},
{
label
:
'$(run-all) Run app on systems parallel'
,
command
:
'epmDockerTest.runAppParallel'
},
{
label
:
'$(list-selection) Run app preset'
,
command
:
'epmDockerTest.runPreset'
},
{
label
:
'$(terminal) Run exec command'
,
command
:
'epmDockerTest.runExec'
},
{
label
:
'$(play) Local ./bin/epm play'
,
command
:
'epmDockerTest.runLocalPlay'
},
...
...
@@ -128,9 +131,9 @@ async function runQuick() {
}
}
async
function
runApp
()
{
async
function
runApp
(
parallel
)
{
const
app
=
await
promptForApp
({
title
:
'EPM Docker Test'
,
title
:
parallel
?
'EPM Docker Test Parallel'
:
'EPM Docker Test'
,
prompt
:
'Application name for epm play'
,
fallbackKey
:
'lastApp'
});
...
...
@@ -138,10 +141,10 @@ async function runApp() {
return
;
}
const
systems
=
await
vscode
.
window
.
showInputBox
({
title
:
'EPM Docker Test'
,
const
systems
=
await
promptForSystems
({
title
:
parallel
?
'EPM Docker Test Parallel'
:
'EPM Docker Test'
,
prompt
:
'Target systems separated by spaces'
,
value
:
getWorkspaceState
(
'lastSystems'
,
getConfig
().
get
(
'defaultSystems'
,
'fedora'
))
fallback
:
getWorkspaceState
(
'lastSystems'
,
getConfig
().
get
(
'defaultSystems'
,
'fedora'
))
});
if
(
!
systems
)
{
return
;
...
...
@@ -149,7 +152,7 @@ async function runApp() {
await
setWorkspaceState
(
'lastApp'
,
app
);
await
setWorkspaceState
(
'lastSystems'
,
systems
);
await
executeTest
({
app
,
systems
:
splitArgs
(
systems
)
});
await
executeTest
({
app
,
systems
:
splitArgs
(
systems
)
,
parallel
});
}
async
function
runPreset
()
{
...
...
@@ -203,10 +206,10 @@ async function runExec() {
return
;
}
const
systems
=
await
vscode
.
window
.
showInputBox
({
const
systems
=
await
promptForSystems
({
title
:
'EPM Docker Test'
,
prompt
:
'Target systems separated by spaces'
,
value
:
getWorkspaceState
(
'lastSystems'
,
getConfig
().
get
(
'defaultSystems'
,
'fedora'
))
fallback
:
getWorkspaceState
(
'lastSystems'
,
getConfig
().
get
(
'defaultSystems'
,
'fedora'
))
});
if
(
systems
)
{
await
setWorkspaceState
(
'lastSystems'
,
systems
);
...
...
@@ -323,6 +326,64 @@ function promptForInferredApp(options, inferred) {
});
}
function
promptForSystems
(
options
)
{
return
promptForEditableValue
({
title
:
options
.
title
,
prompt
:
options
.
prompt
,
value
:
options
.
fallback
,
fallback
:
'fedora'
,
okLabel
:
'OK'
,
cancelLabel
:
'Отмена'
});
}
function
promptForEditableValue
(
options
)
{
return
new
Promise
((
resolve
)
=>
{
const
quickPick
=
vscode
.
window
.
createQuickPick
();
const
okItem
=
{
label
:
''
,
action
:
'ok'
};
const
cancelItem
=
{
label
:
`$(close)
${
options
.
cancelLabel
}
`
,
action
:
'cancel'
};
let
settled
=
false
;
const
finish
=
(
value
)
=>
{
if
(
settled
)
{
return
;
}
settled
=
true
;
resolve
(
value
);
};
const
currentValue
=
()
=>
quickPick
.
value
.
trim
()
||
options
.
fallback
;
const
updateOkItem
=
()
=>
{
okItem
.
label
=
`$(check)
${
options
.
okLabel
}
:
${
currentValue
()}
`
;
quickPick
.
items
=
[
okItem
,
cancelItem
];
};
quickPick
.
title
=
options
.
title
;
quickPick
.
placeholder
=
options
.
prompt
;
quickPick
.
value
=
options
.
value
||
options
.
fallback
;
updateOkItem
();
quickPick
.
onDidChangeValue
(
updateOkItem
);
quickPick
.
onDidAccept
(()
=>
{
const
selected
=
quickPick
.
selectedItems
[
0
];
if
(
selected
?.
action
===
'cancel'
)
{
quickPick
.
hide
();
finish
(
undefined
);
return
;
}
quickPick
.
hide
();
finish
(
currentValue
());
});
quickPick
.
onDidHide
(()
=>
{
quickPick
.
dispose
();
finish
(
undefined
);
});
quickPick
.
show
();
});
}
async
function
rerunLast
()
{
const
command
=
getWorkspaceState
(
'lastCommand'
,
lastRun
);
if
(
!
command
)
{
...
...
@@ -368,6 +429,9 @@ async function executeTest(request) {
if
(
Array
.
isArray
(
request
.
favoriteArgs
))
{
args
.
push
(...
request
.
favoriteArgs
);
}
if
(
request
.
parallel
&&
!
args
.
includes
(
'--parallel'
)
&&
!
args
.
includes
(
'-j'
))
{
args
.
push
(
'--parallel'
);
}
if
(
request
.
exec
)
{
args
.
push
(
'--exec'
,
request
.
exec
);
...
...
vscode-extension/package.json
View file @
e2b69b04
...
...
@@ -15,6 +15,7 @@
"onView:epmDockerTest.actions"
,
"onCommand:epmDockerTest.runQuick"
,
"onCommand:epmDockerTest.runApp"
,
"onCommand:epmDockerTest.runAppParallel"
,
"onCommand:epmDockerTest.runPreset"
,
"onCommand:epmDockerTest.runExec"
,
"onCommand:epmDockerTest.rerunLast"
,
...
...
@@ -33,6 +34,10 @@
"title"
:
"EPM Docker Test: Run App on Systems"
},
{
"command"
:
"epmDockerTest.runAppParallel"
,
"title"
:
"EPM Docker Test: Run App on Systems in Parallel"
},
{
"command"
:
"epmDockerTest.runPreset"
,
"title"
:
"EPM Docker Test: Run App Preset"
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment