Fakultas Ilmu Komputer UI

Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
1 merge request!66[#91] Docker Deployment
Pipeline #59953 passed
......@@ -16,6 +16,32 @@ pylint:
paths:
- ./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:
services:
- postgres:alpine
......@@ -68,3 +94,14 @@ Deployment:
environment:
name: 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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment