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 0ab841f commit 243bab7
Show file tree
Hide file tree
Showing 2 changed files with 39 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
35 changes: 35 additions & 0 deletions test-assets/run.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 243bab7

Please sign in to comment.