Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
---
variables:
GIT_STRATEGY: clone
image: "python:3.8"
before_script:
- python --version
- pip install -r requirements/prod.txt
except:
refs:
- schedules
stages:
- Code Lint
- Tests
# Routine to populate the Data Dictionary
job:populate_data_dictionary:
script:
- ssh -o StrictHostKeyChecking=no $ssh_user_server "cd $work_dir && . $work_dir/venv/bin/activate && $work_dir/manage.py populate_data_dictionary --settings=$settings"
only:
refs:
- master
- schedules
variables:
- $JOB_NAME == "populate_data_dictionary"
# Routine to populate Salesforce with subscription history from Django
job:sync_pgsql_to_salesforce:
script:
- ssh -o StrictHostKeyChecking=no $ssh_user_server "cd $work_dir && . $work_dir/venv/bin/activate && $work_dir/manage.py sync_pgsql_to_salesforce --settings=$settings"
only:
refs:
- master
- schedules
variables:
- $JOB_NAME == "sync_pgsql_to_salesforce"
code_lint:
stage: Code Lint
script:
- flake8 --max-line-length=88 --ignore=E203,E231,E309,E501,W503 # Black compatibility
except:
refs:
- schedules
unit_test:
stage: Tests
script:
- pytest
except:
refs:
- schedules
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment