From 6a2154156605bf72b7154a3e88f66f39159cb56d Mon Sep 17 00:00:00 2001 From: Matthias Mair <66015116+matmair@users.noreply.github.com> Date: Sat, 30 Oct 2021 01:27:31 +0200 Subject: [PATCH] get inventree-data at startup (#26) * Gitpod (#25) * Create .gitpod.yml * split up command * monolythic may be better * set envs per export * use dev for data * trying the split again * added sync command * cleanup * Update .gitpod.yml settings for prebuilds * add dataset import * remove check - might block PRs * switch execution flow * do not block in execution * for deletion in script * Update .gitpod.yml added in github RSA fingerprint * Update .gitpod.yml update key format * Update .gitpod.yml maybe https will work? * Update .gitpod.yml move dataset-update into init * Update .gitpod.yml a dir needs a -r flag :-) --- .gitpod.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.gitpod.yml b/.gitpod.yml index 33c7d62097..33389c5960 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -1,4 +1,3 @@ -# Below the RSA fingerprint for github is hard-encoded. If that does not match in the next few years GH had a bad day. tasks: - name: Setup django before: | @@ -12,13 +11,8 @@ tasks: source venv/bin/activate pip install invoke inv install - echo 'nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8' >> ~/.ssh/known_hosts - git clone git@github.com:inventree/demo-dataset.git /workspace/InvenTree/inventree-data mkdir dev inv update - invoke delete-data -f - invoke import-records -f /workspace/InvenTree/inventree-data/inventree_data.json - gp sync-done setup_server - name: Start server @@ -31,6 +25,11 @@ tasks: export INVENTREE_STATIC_ROOT='/workspace/InvenTree/dev/static' source venv/bin/activate + rm /workspace/InvenTree/inventree-data -r + git clone https://github.com/inventree/demo-dataset /workspace/InvenTree/inventree-data + invoke delete-data -f + invoke import-records -f /workspace/InvenTree/inventree-data/inventree_data.json + inv server # List the ports to expose. Learn more https://www.gitpod.io/docs/config-ports/