-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy path.travis.yml
32 lines (32 loc) · 1 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
language: generic
env:
global:
- MODEL_DIR=scikit-nlp-model PROD_VERSION="v2" PATH=$HOME/google-cloud-sdk/bin:$HOME/miniconda3/bin:$PATH CLOUDSDK_CORE_DISABLE_PROMPTS=1
cache:
directories:
- "$HOME/google-cloud-sdk"
- "$HOME/miniconda3"
- "$HOME/miniconda3_installer"
timeout: 1000
before_install:
- openssl aes-256-cbc -K $encrypted_64a1b7c39bac_key -iv $encrypted_64a1b7c39bac_iv
-in client_secret.json.enc -out ./client_secret.json -d
- ./bin/setup.sh
jobs:
include:
- stage: train and evaluate model
if: branch = deploy-to-staging
script:
- ./bin/run_unit_tests.sh ${MODEL_DIR}
- ./bin/get_data.sh ${MODEL_DIR}
- ./bin/train.sh ${MODEL_DIR}
- ./bin/evaluate.sh ${MODEL_DIR}
- ./bin/upload_artifact.sh ${MODEL_DIR}
- stage: deploy candidate model to staging
if: branch = deploy-to-staging
script:
- ./bin/deploy_to_staging.sh ${MODEL_DIR}
- stage: deploy model to prod
if: branch = deploy-to-prod
script:
- ./bin/deploy_to_prod.sh ${PROD_VERSION}