Fakultas Ilmu Komputer UI

.gitlab-ci.yml 1022 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
  - python manage.py test
Zamil Majdy's avatar
Zamil Majdy committed
11
12
  - git remote add deployment ssh://kape@bot.recruit.id:8022/home/kape.git
  - sshpass -p yukcarikape git push deployment develop:master
Zamil Majdy's avatar
Zamil Majdy committed
13
14
15
16
17

staging:
  type: deploy
  script:
  - apt-get update -qy
Zamil Majdy's avatar
Zamil Majdy committed
18
19
20
  - sudo apt-get install sshpass
  - git remote add deployment ssh://kape@bot.recruit.id:8022/home/kape.git
  - sshpass -p yukcarikape git push deployment develop:master
Zamil Majdy's avatar
Zamil Majdy committed
21
22
23
24
25
26
27
  only:
  - develop

production:
  type: deploy
  script:
  - apt-get update -qy
Zamil Majdy's avatar
Zamil Majdy committed
28
29
30
  - sudo apt-get install sshpass
  - git remote add deployment ssh://kape@bot.recruit.id:8022/home/kape.git
  - sshpass -p yukcarikape git push deployment master:master
Zamil Majdy's avatar
Zamil Majdy committed
31
32
  only:
  - master