Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
2b40e262
Commit
2b40e262
authored
Aug 14, 2014
by
Ben Patterson
Committed by
benrobot
Oct 22, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge PR#3. Solano: Add post worker hook for copying artifacts.
parent
7b5e5794
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
0 deletions
+32
-0
scripts/post_worker.py
+31
-0
tddium.yml
+1
-0
No files found.
scripts/post_worker.py
0 → 100644
View file @
2b40e262
import
tarfile
import
os
import
shutil
full_path
=
os
.
path
.
realpath
(
__file__
)
source_dir
=
full_path
.
replace
(
"scripts/post_worker.py"
,
"reports/"
)
output_filename
=
full_path
.
replace
(
"post_worker.py"
,
"reports.tar.gz"
)
print
"source dir:"
,
source_dir
count
=
0
# walk through every subdirectory & add the folder if it is not empty
with
tarfile
.
open
(
output_filename
,
"w:gz"
)
as
tar
:
for
(
path
,
dirs
,
files
)
in
os
.
walk
(
source_dir
):
if
len
(
files
)
>
0
:
print
"tarring:"
,
path
tar
.
add
(
path
,
arcname
=
os
.
path
.
basename
(
path
))
count
+=
1
tar
.
close
()
file_dest
=
os
.
environ
[
'HOME'
]
+
'/results/'
+
os
.
environ
[
'TDDIUM_SESSION_ID'
]
+
'/session/reports.tar.gz'
# if the tar file is not empty, copy it to the proper place
if
count
>
0
:
shutil
.
copyfile
(
output_filename
,
file_dest
)
print
"done copying file"
print
"TDDIUM_SESSION_ID:"
,
os
.
environ
[
'TDDIUM_SESSION_ID'
]
\ No newline at end of file
tddium.yml
View file @
2b40e262
...
...
@@ -9,6 +9,7 @@ tddium:
:pre_setup
:
"
virtualenv
$HOME/python-env
&&
$HOME/python-env/bin/pip
install
-r
requirements/edx/paver.txt
&&
$HOME/python-env/bin/pip
install
-r
requirements/edx/pre.txt
&&
$HOME/python-env/bin/pip
install
-r
requirements/edx/base.txt
&&
$HOME/python-env/bin/pip
install
-r
requirements/edx/github.txt
&&
$HOME/python-env/bin/pip
install
-r
requirements/edx/local.txt
&&
$HOME/python-env/bin/pip
install
-r
requirements/edx/post.txt"
:post_build
:
'
for
i
in
$(find
test_root/log
-name
*.png);
do
cp
-R
$i
$HOME/results/$TDDIUM_SESSION_ID/session/;
echo
"copying
file
$i";
done'
# :post_build: "paver coverage; paver bokchoy_coverage; for i in $(find reports -name cover); do cp -R $i $HOME/results/$TDDIUM_SESSION_ID/session/; done"
:post_worker
:
'
python
./scripts/post_worker.py'
:cache
:
:key_paths
:
-
requirements/edx/paver.txt
...
...
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