Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
workspaces
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ssa
workspaces
Commits
df79a180
Commit
df79a180
authored
4 years ago
by
Nathan Hertz
Browse files
Options
Downloads
Patches
Plain Diff
More setup for running download capability; nothing of consequence
parent
b3969d54
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!67
SWS-7: download workflow template
Pipeline
#463
passed
4 years ago
Stage: build-dev
Stage: unit-test-dev
Stage: push-dev
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
schema/versions/e50583fc2a8e_ssa_6391_add_download_capability_and_.py
+1
-1
1 addition, 1 deletion
...ons/e50583fc2a8e_ssa_6391_add_download_capability_and_.py
shared/workspaces/workspaces/capability/helpers.py
+14
-1
14 additions, 1 deletion
shared/workspaces/workspaces/capability/helpers.py
with
15 additions
and
2 deletions
schema/versions/e50583fc2a8e_ssa_6391_add_download_capability_and_.py
+
1
−
1
View file @
df79a180
...
...
@@ -18,7 +18,7 @@ depends_on = None
def
upgrade
():
op
.
execute
(
"
INSERT INTO capabilities (capability_name, capability_steps, max_jobs)
"
"
VALUES (
'
test_download
'
,
'
prepare-and-run-workflow deliver -r,-l
\n
await-workflow
'
, 2)
"
"
VALUES (
'
test_download
'
,
'
prepare-and-run-workflow deliver
[
-r,
-l
]
\n
await-workflow
'
, 2)
"
)
op
.
execute
(
"
INSERT INTO workflows (workflow_name) VALUES (
'
test_download
'
)
"
)
op
.
execute
(
...
...
This diff is collapsed.
Click to expand it.
shared/workspaces/workspaces/capability/helpers.py
+
14
−
1
View file @
df79a180
...
...
@@ -155,8 +155,19 @@ class CapabilitySequence(CapabilitySequenceIF):
class
PrepareAndRunWorkflow
(
CapabilityStep
):
"""
Class representing a prepare-and-run-workflow capability step
"""
def
execute
(
self
,
engine
:
CapabilityEngineIF
,
execution
:
CapabilityExecutionIF
):
"""
Execute a workflow within an engine
:param engine: Engine that will execute the workflow
:param execution: Execution record for executing capability
"""
workflow_name
=
self
.
step_value
workflow_args
=
None
parameters
=
execution
.
capability_request
.
parameters
# FIXME: Add support for files
files
=
[]
...
...
@@ -165,7 +176,9 @@ class PrepareAndRunWorkflow(CapabilityStep):
# DO NOT TAKE THIS OUT! Python will yell at you.
parameters
=
json
.
dumps
(
parameters
)
workflow_args
=
json
.
loads
(
parameters
)
engine
.
submit_workflow_request
(
execution
.
id
,
workflow_name
,
workflow_args
,
files
)
engine
.
submit_workflow_request
(
execution
.
id
,
workflow_name
,
workflow_args
,
files
)
class
AwaitQa
(
CapabilityStep
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment