Fakultas Ilmu Komputer UI

Commit 04c1704b authored by Adrika Novrialdi's avatar Adrika Novrialdi
Browse files

Merge branch '2006560806-91' into 'master'

[#91] Docker Deployment

Closes #91

See merge request !66
parents 9f2ac896 c2836019
Pipeline #59953 passed with stages
in 26 minutes and 1 second
...@@ -16,6 +16,32 @@ pylint: ...@@ -16,6 +16,32 @@ pylint:
paths: paths:
- ./pylint/ - ./pylint/
.development:
variables:
IMAGE_SCOPE_TAG: "$CI_COMMIT_BRANCH"
except:
- master
environment: development
.production:
variables:
IMAGE_SCOPE_TAG: stable
only:
- master
environment: production
.docker-image:
stage: deploy
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [ "" ]
variables:
CONTEXT: $CI_PROJECT_DIR
script:
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --context ${CONTEXT} --dockerfile ${CONTEXT}/Dockerfile --destination ${CI_REGISTRY_IMAGE}:${CI_COMMIT_TAG} --destination ${CI_REGISTRY_IMAGE}:${IMAGE_SCOPE_TAG}
UnitTest: UnitTest:
services: services:
- postgres:alpine - postgres:alpine
...@@ -68,3 +94,14 @@ Deployment: ...@@ -68,3 +94,14 @@ Deployment:
environment: environment:
name: staging name: staging
url: $HEROKU_APP_HOST_STAGING url: $HEROKU_APP_HOST_STAGING
Dev Docker Image:
extends:
- .docker-image
- .development
allow_failure: true
Prod Docker Image:
extends:
- .docker-image
- .production
\ No newline at end of file
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