Fakultas Ilmu Komputer UI

.gitlab-ci.yml 842 Bytes
Newer Older
Zamil Majdy's avatar
Zamil Majdy committed
1
2
test:
  script:
Zamil Majdy's avatar
Zamil Majdy committed
3
  - apt-get update -qy
4
5
  - apt-get install -y python-dev python-pip sudo postgresql postgresql-client libpq-dev
  - service postgresql start
6
7
  - sudo -u postgres psql -c "CREATE USER kape WITH PASSWORD 'kape' CREATEDB"
  - sudo -u postgres psql -c "CREATE DATABASE kape OWNER kape"
Zamil Majdy's avatar
Zamil Majdy committed
8
  - pip install -r requirements.txt
9
  - python manage.py migrate
Zamil Majdy's avatar
Zamil Majdy committed
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
  - python manage.py test

staging:
  type: deploy
  script:
  - apt-get update -qy
  - apt-get install -y ruby-dev
  - gem install dpl
  - dpl --provider=heroku --app=gitlab-ci-python-test-staging --api-key=$HEROKU_STAGING_API_KEY
  only:
  - develop

production:
  type: deploy
  script:
  - apt-get update -qy
  - apt-get install -y ruby-dev
  - gem install dpl
  - dpl --provider=heroku --app=gitlab-ci-python-test-prod --api-key=$HEROKU_PRODUCTION_API_KEY
  only:
  - master