From ac7b55f42066a3a8a28ff5296a772bae27b35de6 Mon Sep 17 00:00:00 2001 From: Kyle McCormick Date: Thu, 9 Feb 2023 15:55:33 -0500 Subject: [PATCH] temp: add asset test script --- test-assets/.gitignore | 4 ++++ test-assets/run.sh | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 test-assets/.gitignore create mode 100755 test-assets/run.sh 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..64ec2397697 --- /dev/null +++ b/test-assets/run.sh @@ -0,0 +1,33 @@ +#!/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 + tutor "$mode" copyfrom lms "$path" "$output/${mode}${path}" + 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 +