-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
27 lines (24 loc) · 899 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
services:
- docker:dind
variables:
APP: "zeppelin"
APP_VERSION: "0.8.0-SNAPSHOT"
REPOSITORY_NAME: "${APP}"
SCALA_VER: "2.11"
SPARK_VER: "2.2"
BRANCH: "branch-0.8"
DOCKER_DRIVER: overlay
DOCKER_HOST: tcp://localhost:2375
stages:
- docker
docker:
stage: docker
only:
- master
script:
- export BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"`
- docker build --build-arg BRANCH=${BRANCH} --build-arg SCALA_VER=${SCALA_VER} --build-arg SPARK_VER=${SPARK_VER} --build-arg VCS_REF=${CI_COMMIT_SHA} --build-arg BUILD_DATE=${BUILD_DATE} -t ${APP}:latest .
- docker login -u ${DOCKER_REGISTRY_USER} -p ${DOCKER_REGISTRY_PASS} "https://${DOCKER_REGISTRY}"
- docker tag ${APP}:latest ${DOCKER_REGISTRY}/${REPOSITORY_NAME}:latest
- docker tag ${APP}:latest ${DOCKER_REGISTRY}/${REPOSITORY_NAME}:${APP_VERSION}
- docker push ${DOCKER_REGISTRY}/${REPOSITORY_NAME}