-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.gitlab-ci.yml
41 lines (38 loc) · 1021 Bytes
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
variables:
REGISTRY_HOST: example
IMAGE: $REGISTRY_HOST/$CI_PROJECT_PATH
PROJECT_NAME: sharetribe
SERVICE_NAME: app
RAILS_ENV: production
NODE_ENV: production
RS_GIT_BRANCH: sharetribe
RS_GIT_REMOTE_URL: https://gitlab-ci-token:${CI_JOB_TOKEN}@g${REGISTRY_HOST}/example/example1.git
stages:
- build
# - deploy
build:
stage: build
before_script:
- docker info
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $REGISTRY_HOST
script:
- docker build \
--pull \
--build-arg ${RAILS_ENV} \
--build-arg ${NODE_ENV} \
--build-arg ${RS_GIT_BRANCH} \
--build-arg ${RS_GIT_REMOTE_URL} \
--tag $IMAGE \
.
- docker push $IMAGE
#deploy_development:
# stage: deploy
# image: kre100/rancher-cli-tools
# script:
# - rancher-compose --project-name ${PROJECT_NAME} up -d --upgrade --force-upgrade --pull ${SERVICE_NAME}
# environment:
# name: development
# url: http://localhost/
# only:
# - sharetribe
# when: manual