Fakultas Ilmu Komputer UI

Commit 69ba36a8 authored by Zamil Majdy's avatar Zamil Majdy
Browse files

#140382397 #4 finalize gitlab-ci

parent bf71c66c
#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
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
staging:
type: deploy
......@@ -16,16 +16,14 @@ staging:
- apt-get install sshpass
- git clone https://gitlab.com/PPL2017csui/PPLA1.git
- cd PPLA1
- git checkout UserStory1
- git checkout develop
- git pull
- git remote add deployment ssh://kape@bot.recruit.id:8022/home/kape.git
- mkdir ~/.ssh
- echo -e "Host bot.recruit.id\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
- sshpass -p yukcarikape git push deployment UserStory1:master --force
- cd ..
- sshpass -p yukcarikape git push deployment UserStory1:master --force
- sshpass -p yukcarikape git push deployment develop:master --force
only:
- UserStory1
- develop
production:
type: deploy
......@@ -35,7 +33,9 @@ production:
- git clone https://gitlab.com/PPL2017csui/PPLA1.git
- cd PPLA1
- git checkout master
- git pull
- git remote add deployment ssh://kape@bot.recruit.id:8022/home/kape.git
- mkdir ~/.ssh
- echo -e "Host bot.recruit.id\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
- sshpass -p yukcarikape git push deployment master:master --force
only:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment