Commit 2762b320 authored by Benavides Ontiveros's avatar Benavides Ontiveros
Browse files

update output directory

parent 2043d6f0
Pipeline #12255 canceled with stages
in 2 minutes and 13 seconds
......@@ -19,7 +19,7 @@ variables:
tags:
- ubuntu
- vm
- reddit # Added Reddit VM tag
- reddit
image: docker:24.0.9
before_script:
- echo "Using host Docker daemon"
......@@ -82,19 +82,19 @@ generate:
REDDIT_CLIENT_ID: "${REDDIT_CLIENT_ID}"
REDDIT_CLIENT_SECRET: "${REDDIT_CLIENT_SECRET}"
SUBREDDITS: "${SUBREDDITS}"
OUTPUT_DIR: "/generated" # <- added shared VM folder
OUTPUT_DIR: "/reddit_output"
before_script:
- pip install -r requirements.txt
- mkdir -p /generated
- mkdir -p /reddit_output
script:
- echo "Running data generator..."
- python app.py
- echo "--- GENERATED FILES INSIDE JOB ---"
- echo "--- GENERATED (local container folder) ---"
- ls -Ra generated/ || echo "No files generated"
- echo "Copying all files (including .meta) to VM..."
- cp -R generated/. /generated/ || echo "Copy failed!"
- echo "--- FILES NOW IN VM ---"
- ls -Ra /generated/
- echo "Copying to VM mapped folder..."
- cp -R generated/. /reddit_output/ || echo "Copy failed!"
- echo "--- VM FOLDER CONTENTS ---"
- ls -Ra /reddit_output/
# =====================================================================
# INGEST
......@@ -113,11 +113,11 @@ ingest:
- apt-get update && apt-get install -y gettext jq
- cp tools/filesystem-plugin-2.1.0.jar plugin.jar
- envsubst < tools/user-config.json > user-config.json
- echo "--- GENERATED FILES ON VM ---"
- ls -Ra /generated/ || echo "No files found!"
- echo "--- READING FROM VM FOLDER ---"
- ls -Ra /reddit_output/ || echo "No files found!"
script:
- echo "Running ingestion..."
- java -jar plugin.jar "/generated"
- java -jar plugin.jar "/reddit_output"
- echo "Ingestion done."
# =====================================================================
......@@ -139,9 +139,6 @@ build:
after_script:
- echo "Docker image built successfully!"
# =====================================================================
# DEPLOY
# =====================================================================
# =====================================================================
# DEPLOY
# =====================================================================
......@@ -152,9 +149,6 @@ deploy:
- ubuntu
- vm
- reddit
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"' # Run on MRs
- when: always
script:
- echo "$DOCKER_TOKEN" | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker push $DOCKERHUB_REPO:$CI_COMMIT_SHORT_SHA
......
......@@ -11,7 +11,7 @@
},
"filesystem": {
"sourcePaths": [
"/generated"
"/reddit_output"
]
}
}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment