diff --git a/test-assets/.gitignore b/test-assets/.gitignore new file mode 100644 index 00000000000..74e9fff7f53 --- /dev/null +++ b/test-assets/.gitignore @@ -0,0 +1,4 @@ +* + +!/run.sh +!/.gitignore diff --git a/test-assets/run.sh b/test-assets/run.sh new file mode 100755 index 00000000000..eb71957fe34 --- /dev/null +++ b/test-assets/run.sh @@ -0,0 +1,35 @@ +#!/usr/bin/env bash + +set -eou pipefail +set -x + +output="test-assets/output_$(date +"%Y-%m-%d_%H-%M-%S")" +mkdir "$output" + +test_paths=( + "/openedx/edx-platform" + "/openedx/staticfiles" + "/openedx/static" + "/openedx/themes" +) + +test_mode ( ) { + mode="$1" + mkdir "$output/$mode" + for path in "${test_paths[@]}" ; do + outpath="$output/${mode}${path}" + mkdir -p "$(dirname "$output")" + 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 +