Fakultas Ilmu Komputer UI

Commit c5f2ef42 authored by Josh Sudung's avatar Josh Sudung
Browse files

[CHORES] CI script fixes

parent b45491b2
Pipeline #34216 failed with stages
in 14 minutes and 19 seconds
...@@ -7,32 +7,9 @@ test: ...@@ -7,32 +7,9 @@ test:
image: python:3.6.5 image: python:3.6.5
stage: test stage: test
before_script: before_script:
- wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
- pip install -r requirements.txt - pip install -r requirements.txt
- >
if [[ "${CI_COMMIT_REF_NAME}" == "staging" ]];
then
DATABASE_URL=$DATABASE_URL_STAGING
export DATABASE_IS_PSQL=true
export DATABASE_NAME=d2puge2oh9kcgg
export DATABASE_USER=wvkketkmnoishk
export DATABASE_PASSWORD=3a76f9e64591d23ed092961d90beec80889e1788b668fdfc6e897065d20e6b0a
export DATABASE_HOST=ec2-18-213-176-229.compute-1.amazonaws.com
export DATABASE_PORT=5432
elif [[ "${CI_COMMIT_REF_NAME}" == "master" ]];
then
DATABASE_URL=$DATABASE_URL_PRODUCTION
export DATABASE_IS_PSQL=true
export DATABASE_NAME=d16n2kmrcvrd3g
export DATABASE_USER=owrnaqzrbylqzh
export DATABASE_PASSWORD=eee44bfc9b5177f575bb40b363b7539c27625c82e58135f00a5d7df9586bd49a
export DATABASE_HOST=ec2-18-213-176-229.compute-1.amazonaws.com
export DATABASE_PORT=5432
fi
- python manage.py makemigrations - python manage.py makemigrations
- python manage.py migrate - python manage.py migrate
- apt-get update -qq && apt-get install -y -qq unzip
- apt-get install -y xvfb
- python manage.py collectstatic --no-input - python manage.py collectstatic --no-input
- python manage.py runserver 8000 & - python manage.py runserver 8000 &
when: on_success when: on_success
...@@ -55,9 +32,6 @@ SonarScanner: ...@@ -55,9 +32,6 @@ SonarScanner:
-Dsonar.login=$SONARQUBE_TOKEN -Dsonar.login=$SONARQUBE_TOKEN
-Dsonar.branch.name=$CI_COMMIT_REF_NAME -Dsonar.branch.name=$CI_COMMIT_REF_NAME
-Dsonar.projectKey=$SONARQUBE_PROJECT_KEY -Dsonar.projectKey=$SONARQUBE_PROJECT_KEY
only:
- staging
- master
deploy: deploy:
image: ruby:2.4 image: ruby:2.4
...@@ -81,6 +55,7 @@ deploy: ...@@ -81,6 +55,7 @@ deploy:
if [[ "${CI_COMMIT_REF_NAME}" == "staging" ]]; if [[ "${CI_COMMIT_REF_NAME}" == "staging" ]];
then then
DATABASE_URL=$DATABASE_URL_STAGING DATABASE_URL=$DATABASE_URL_STAGING
export DATABASE_IS_PSQL=true
export DATABASE_NAME=d2puge2oh9kcgg export DATABASE_NAME=d2puge2oh9kcgg
export DATABASE_USER=wvkketkmnoishk export DATABASE_USER=wvkketkmnoishk
export DATABASE_PASSWORD=3a76f9e64591d23ed092961d90beec80889e1788b668fdfc6e897065d20e6b0a export DATABASE_PASSWORD=3a76f9e64591d23ed092961d90beec80889e1788b668fdfc6e897065d20e6b0a
...@@ -90,6 +65,7 @@ deploy: ...@@ -90,6 +65,7 @@ deploy:
elif [[ "${CI_COMMIT_REF_NAME}" == "master" ]]; elif [[ "${CI_COMMIT_REF_NAME}" == "master" ]];
then then
DATABASE_URL=$DATABASE_URL_PRODUCTION DATABASE_URL=$DATABASE_URL_PRODUCTION
export DATABASE_IS_PSQL=true
export DATABASE_NAME=d16n2kmrcvrd3g export DATABASE_NAME=d16n2kmrcvrd3g
export DATABASE_USER=owrnaqzrbylqzh export DATABASE_USER=owrnaqzrbylqzh
export DATABASE_PASSWORD=eee44bfc9b5177f575bb40b363b7539c27625c82e58135f00a5d7df9586bd49a export DATABASE_PASSWORD=eee44bfc9b5177f575bb40b363b7539c27625c82e58135f00a5d7df9586bd49a
......
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