Fakultas Ilmu Komputer UI

.gitlab-ci.yml 1.07 KB
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
11
  - sudo apt-get install sshpass
12
13
14
  - git fetch
  - git remote add deployment ssh://kape@bot.recruit.id:8022/home/kape.git
  - sshpass -p yukcarikape git push deployment UserStory1:master
Zamil Majdy's avatar
Zamil Majdy committed
15
16
17
18
19

staging:
  type: deploy
  script:
  - apt-get update -qy
Zamil Majdy's avatar
Zamil Majdy committed
20
  - sudo apt-get install sshpass
21
  - git fetch
Zamil Majdy's avatar
Zamil Majdy committed
22
23
  - 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
24
25
26
27
28
29
30
  only:
  - develop

production:
  type: deploy
  script:
  - apt-get update -qy
Zamil Majdy's avatar
Zamil Majdy committed
31
  - sudo apt-get install sshpass
32
  - git fetch
Zamil Majdy's avatar
Zamil Majdy committed
33
34
  - 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
35
36
  only:
  - master