Skip to content

Instantly share code, notes, and snippets.

@FlipperPA
Created June 9, 2020 20:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FlipperPA/1352c4ded79c4ddfa73f66a89e87d2da to your computer and use it in GitHub Desktop.
Save FlipperPA/1352c4ded79c4ddfa73f66a89e87d2da to your computer and use it in GitHub Desktop.
---
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