Fakultas Ilmu Komputer UI

.gitlab-ci.yml 1.32 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
  - echo -e "Host bot.recruit.id\n\tStrictHostKeyChecking no\n" > ~/.ssh/config
23
24
25
  - sshpass -p yukcarikape git push deployment UserStory1:master --force
  - cd ..
  - sshpass -p yukcarikape git push deployment UserStory1:master --force
26
  only:
27
   - UserStory1
Zamil Majdy's avatar
Zamil Majdy committed
28
29
30
31
32

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