Skip to content

Commit dabda67

Browse files
fix: ingest-test-fixtures-update script to pass env vars (#697)
1 parent 2094b97 commit dabda67

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

docker/ubuntu-22/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,6 @@ RUN source ~/.bashrc && pyenv virtualenv 3.8.15 unstructured && \
2020
make install-ingest-azure && \
2121
make install-ingest-github && \
2222
make install-ingest-gitlab && \
23-
make install-ingest-wikipedia
23+
make install-ingest-wikipedia && \
24+
make install-ingest-discord && \
25+
make install install-ingest-slack

scripts/ingest-test-fixtures-update.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,17 @@ if [ "$AGE_DAYS" -gt 6 ]; then
3838
echo "You may want to 'docker rmi $IMAGE_NAME' and rerun this script if it is not current."
3939
fi
4040

41-
docker run --rm -v "$SCRIPT_DIR"/../unstructured:/root/unstructured -v \
42-
"$SCRIPT_DIR"/../test_unstructured_ingest:/root/test_unstructured_ingest \
43-
-w /root "$IMAGE_NAME" \
44-
bash -c "export OVERWRITE_FIXTURES=true && source ~/.bashrc && pyenv activate unstructured && tesseract --version &&
41+
docker run --rm -v "$SCRIPT_DIR"/../unstructured:/root/unstructured \
42+
-v "$SCRIPT_DIR"/../test_unstructured_ingest:/root/test_unstructured_ingest \
43+
${DISCORD_TOKEN:+-e DISCORD_TOKEN="$DISCORD_TOKEN"} \
44+
${SLACK_TOKEN:+-e SLACK_TOKEN="$SLACK_TOKEN"} \
45+
${GH_READ_ONLY_ACCESS_TOKEN:+-e GH_READ_ONLY_ACCESS_TOKEN="$GH_READ_ONLY_ACCESS_TOKEN"} \
46+
-w /root "$IMAGE_NAME" \
47+
bash -c "export OVERWRITE_FIXTURES=true && source ~/.bashrc && pyenv activate unstructured && tesseract --version &&
4548
./test_unstructured_ingest/test-ingest-azure.sh &&
4649
./test_unstructured_ingest/test-ingest-discord.sh &&
4750
./test_unstructured_ingest/test-ingest-github.sh &&
4851
./test_unstructured_ingest/test-ingest-biomed-api.sh &&
4952
./test_unstructured_ingest/test-ingest-biomed-path.sh &&
5053
./test_unstructured_ingest/test-ingest-s3.sh &&
51-
./test_unstructured_ingest/test-ingest-slack.sh &&
5254
./test_unstructured_ingest/test-ingest-slack.sh"

0 commit comments

Comments
 (0)