Skip to content

Commit

Permalink
temp: add asset test script
Browse files Browse the repository at this point in the history
  • Loading branch information
kdmccormick committed Feb 9, 2023
1 parent c5adba1 commit a245d77
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test-assets/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*

!/run.sh
!/.gitignore
36 changes: 36 additions & 0 deletions test-assets/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/usr/bin/env bash

set -eou pipefail
set -x

output_id="$1"
output="test-assets/output_$output_id"
rm -rf "$output"
mkdir "$output"

test_paths=(
"/openedx/edx-platform"
"/openedx/staticfiles"
"/openedx/themes"
)

test_mode ( ) {
mode="$1"
mkdir "$output/$mode"
for path in "${test_paths[@]}" ; do
outpath="$output/${mode}${path}"
mkdir -p "$(dirname "$outpath")"
tutor "$mode" copyfrom lms "$path" "$outpath"
done
}


tutor config save \
--set EDX_PLATFORM_REPOSITORY=https://github.com/kdmccormick/edx-platform \
--set EDX_PLATFORM_VERSION=kdmccormick/assets-build-sh
tutor images build openedx
tutor dev dc build lms
test_mode local
test_mode dev
#test_mode k8s # TODO

0 comments on commit a245d77

Please sign in to comment.