Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Backend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Arkindex
Backend
Commits
13fb5af4
Commit
13fb5af4
authored
8 months ago
by
Valentin Rigal
Browse files
Options
Downloads
Patches
Plain Diff
Download extra files before running task's container
parent
766ba3a3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!2397
Download extra files before running task's container
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
arkindex/ponos/tasks.py
+14
-14
14 additions, 14 deletions
arkindex/ponos/tasks.py
with
14 additions
and
14 deletions
arkindex/ponos/tasks.py
+
14
−
14
View file @
13fb5af4
...
...
@@ -148,7 +148,20 @@ def run_docker_task(client, task, temp_dir):
assert
str
(
folder
.
resolve
())
in
str
(
path
.
resolve
()),
"
Invalid artifact path: {artifact.path}.
"
artifact
.
download_to
(
str
(
path
))
# 3. Do run the container asynchronously
# 3. Download extra_files
if
task
.
extra_files
:
logger
.
info
(
f
"
Downloading extra_files for task
{
task
!s}
"
)
try
:
download_extra_files
(
task
,
temp_dir
)
except
Exception
as
e
:
logger
.
warning
(
f
"
Failed downloading extra_files for task
{
task
!s}
:
{
e
!s}
"
)
task
.
state
=
State
.
Error
task
.
save
()
return
# 4. Do run the container asynchronously
logger
.
debug
(
"
Running container
"
)
kwargs
=
{
"
environment
"
:
{
...
...
@@ -179,19 +192,6 @@ def run_docker_task(client, task, temp_dir):
task
.
state
=
State
.
Running
task
.
save
()
# 4. Download extra_files
if
task
.
extra_files
:
logger
.
info
(
f
"
Downloading extra_files for task
{
task
!s}
"
)
try
:
download_extra_files
(
task
,
temp_dir
)
except
Exception
as
e
:
logger
.
warning
(
f
"
Failed downloading extra_files for task
{
task
!s}
:
{
e
!s}
"
)
task
.
state
=
State
.
Error
task
.
save
()
return
# 5. Read logs
logger
.
debug
(
"
Reading logs from the docker container
"
)
previous_logs
=
b
""
...
...
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