Fakultas Ilmu Komputer UI

.gitlab-ci.yml 1.34 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
#test:
#  script:
#  - apt-get update -qy
#  - apt-get install -y python-dev python-pip sudo postgresql postgresql-client libpq-dev
#  - service postgresql start
#  - sudo -u postgres psql -c "CREATE USER kape WITH PASSWORD 'kape' CREATEDB"
#  - sudo -u postgres psql -c "CREATE DATABASE kape OWNER kape"
#  - pip install -r requirements.txt
#  - python manage.py migrate
#  - python manage.py test
Zamil Majdy's avatar
Zamil Majdy committed
11
12
13
14
15

staging:
  type: deploy
  script:
  - apt-get update -qy
16
  - apt-get install sshpass
17
18
19
20
  - git clone https://gitlab.com/PPL2017csui/PPLA1.git
  - cd PPLA1
  - git checkout UserStory1
  - git pull
Zamil Majdy's avatar
Zamil Majdy committed
21
  - git remote add deployment ssh://kape@bot.recruit.id:8022/home/kape.git
Zamil Majdy's avatar
Zamil Majdy committed
22
23
  - mkdir ~/.ssh
  - echo -e "Host bot.recruit.id\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
24
25
26
  - sshpass -p yukcarikape git push deployment UserStory1:master --force
  - cd ..
  - sshpass -p yukcarikape git push deployment UserStory1:master --force
27
  only:
28
   - UserStory1
Zamil Majdy's avatar
Zamil Majdy committed
29
30
31
32
33

production:
  type: deploy
  script:
  - apt-get update -qy
34
  - apt-get install sshpass
35
36
37
  - git clone https://gitlab.com/PPL2017csui/PPLA1.git
  - cd PPLA1
  - git checkout master
Zamil Majdy's avatar
Zamil Majdy committed
38
  - git remote add deployment ssh://kape@bot.recruit.id:8022/home/kape.git
39
  - echo -e "Host bot.recruit.id\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
40
  - sshpass -p yukcarikape git push deployment master:master --force
Zamil Majdy's avatar
Zamil Majdy committed
41
42
  only:
  - master