Fakultas Ilmu Komputer UI
Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
PMPL
Collection of Practice
2019
1606837915-practice
Commits
74e9b480
Commit
74e9b480
authored
Sep 24, 2019
by
Izzatul Muttaqin
Browse files
Change deploy ci
parent
3d91dbea
Pipeline
#20639
failed
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
74e9b480
...
...
@@ -7,13 +7,13 @@ UnitTest:
image
:
python:3.6
stage
:
test
before_script
:
-
pip install -r requirements.txt
-
pip install requests
-
pip install django-environ
-
python manage.py makemigrations
-
python manage.py migrate
-
python manage.py collectstatic --no-input
-
python manage.py runserver 8000 &
-
pip
3
install -r requirements.txt
-
pip
3
install requests
-
pip
3
install django-environ
-
python
3
manage.py makemigrations
-
python
3
manage.py migrate
-
python
3
manage.py collectstatic --no-input
-
python
3
manage.py runserver 8000 &
when
:
on_success
script
:
-
coverage run --include='personal_*' manage.py test
...
...
@@ -28,7 +28,8 @@ Deployment:
script
:
-
dpl --provider=heroku --app=$HEROKU_APPNAME --api-key=$HEROKU_APIKEY
-
export HEROKU_API_KEY=$HEROKU_APIKEY
-
heroku run --app $HEROKU_APPNAME migrate
-
heroku ps:scale web=1 migrate=1 --app $HEROKU_APPNAME
-
heroku ps:restart --app=$HEROKU_APPNAME
environment
:
name
:
production
url
:
$HEROKU_APP_HOST
...
...
@@ -42,12 +43,15 @@ TestFunctional:
-
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
-
echo "deb http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google.list
-
pip3 install -r requirements.txt
-
pip3 install requests
-
pip3 install django-environ
-
apt-get update -qq && apt-get install -y -qq unzip
-
apt-get install -y google-chrome-stable
-
apt-get install -y xvfb
-
wget https://chromedriver.storage.googleapis.com/2.41/chromedriver_linux64.zip
-
unzip chromedriver_linux64.zip
-
python manage.py runserver 8000 &
when
:
on_success
script
:
-
python3 functional_tests.py
only
:
-
master
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment