Commit 71bc3921 authored by Benavides Ontiveros's avatar Benavides Ontiveros
Browse files

modify ingest pipelines

parent 8700c0c9
Pipeline #12281 failed
...@@ -4,9 +4,7 @@ ...@@ -4,9 +4,7 @@
workflow: workflow:
rules: rules:
- if: '$CI_PIPELINE_SOURCE == "web"' - when: always # REQUIRED so GitLab Free loads this pipeline
when: always
- when: never
stages: stages:
- ingest - ingest
...@@ -21,7 +19,7 @@ ingest: ...@@ -21,7 +19,7 @@ ingest:
- reddit - reddit
rules: rules:
- when: manual - when: manual # must click the Play button
before_script: before_script:
- apt-get update && apt-get install -y gettext jq - apt-get update && apt-get install -y gettext jq
......
...@@ -4,6 +4,12 @@ workflow: ...@@ -4,6 +4,12 @@ workflow:
when: always when: always
- when: never - when: never
# REQUIRED so GitLab Free recognizes the second pipeline file
include:
- local: '.gitlab-ci-ingest.yml'
rules:
- when: never # Do not run automatically
stages: stages:
- lint - lint
- test - test
...@@ -19,7 +25,7 @@ variables: ...@@ -19,7 +25,7 @@ variables:
DOCKERHUB_REPO: "$DOCKER_USERNAME/reddit_data_fetcher" DOCKERHUB_REPO: "$DOCKER_USERNAME/reddit_data_fetcher"
# ===================================================================== # =====================================================================
# BASE JOB TEMPLATE # BASE JOB TEMPLATE
# ===================================================================== # =====================================================================
.build_template: .build_template:
tags: tags:
...@@ -32,7 +38,7 @@ variables: ...@@ -32,7 +38,7 @@ variables:
- docker info || true - docker info || true
# ===================================================================== # =====================================================================
# LINT # LINT
# ===================================================================== # =====================================================================
lint: lint:
stage: lint stage: lint
...@@ -48,7 +54,7 @@ lint: ...@@ -48,7 +54,7 @@ lint:
- flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
# ===================================================================== # =====================================================================
# TEST # TEST
# ===================================================================== # =====================================================================
test: test:
stage: test stage: test
...@@ -63,7 +69,7 @@ test: ...@@ -63,7 +69,7 @@ test:
- pytest -q || echo "No tests found" - pytest -q || echo "No tests found"
# ===================================================================== # =====================================================================
# DIAG # DIAG
# ===================================================================== # =====================================================================
diag: diag:
stage: diag stage: diag
...@@ -75,7 +81,7 @@ diag: ...@@ -75,7 +81,7 @@ diag:
- docker info || true - docker info || true
# ===================================================================== # =====================================================================
# GENERATE # GENERATE
# ===================================================================== # =====================================================================
generate: generate:
stage: generate stage: generate
...@@ -95,15 +101,12 @@ generate: ...@@ -95,15 +101,12 @@ generate:
script: script:
- echo "Running data generator..." - echo "Running data generator..."
- python app.py - python app.py
- echo "--- GENERATED (local container folder) ---"
- ls -Ra generated/ || echo "No files generated" - ls -Ra generated/ || echo "No files generated"
- echo "Copying to VM mapped folder..."
- cp -R generated/. /reddit_output/ || echo "Copy failed!" - cp -R generated/. /reddit_output/ || echo "Copy failed!"
- echo "--- VM FOLDER CONTENTS ---"
- ls -Ra /reddit_output/ - ls -Ra /reddit_output/
# ===================================================================== # =====================================================================
# INGEST # INGEST
# ===================================================================== # =====================================================================
ingest: ingest:
stage: ingest stage: ingest
...@@ -115,22 +118,16 @@ ingest: ...@@ -115,22 +118,16 @@ ingest:
- reddit - reddit
needs: needs:
- job: generate - job: generate
before_script: before_script:
- apt-get update && apt-get install -y gettext jq - apt-get update && apt-get install -y gettext jq
- cp tools/filesystem-plugin-2.1.0.jar plugin.jar - cp tools/filesystem-plugin-2.1.0.jar plugin.jar
- envsubst < tools/user-config.json > user-config.json - envsubst < tools/user-config.json > user-config.json
- echo "--- Listing files in /reddit_output ---"
- ls -Ra /reddit_output/ || echo "No files found!" - ls -Ra /reddit_output/ || echo "No files found!"
- echo "--- Listing files in /reddit_output/.meta ---"
- ls -Ra /reddit_output/.meta || echo ".meta folder not found!" - ls -Ra /reddit_output/.meta || echo ".meta folder not found!"
script: script:
- echo "Running ingestion..."
- java -jar plugin.jar "/reddit_output" - java -jar plugin.jar "/reddit_output"
- echo "Ingestion done."
# ===================================================================== # =====================================================================
# BUILD # BUILD
......
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