forked from kubeflow/spark-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
30 lines (28 loc) · 1.06 KB
/
.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
stages:
- build
variables:
DEP_VERSION: "0.5.3"
build:
stage: build
image: docker:stable
services:
- docker:dind
before_script:
- apk --no-cache add git
variables:
DOCKER_HOST: tcp://docker:2375
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY ;
- >
if [ "${SPARK_REGISTRY}" != "" -a "${SPARK_VERSION}" != "" ] ; then
tagStamp=$(git describe --dirty)_${SPARK_VERSION}
echo Using SPARK_IMAGE ${SPARK_REGISTRY}:${SPARK_VERSION}
echo CI_REGISTRY_IMAGE_TAG is ${CI_REGISTRY_IMAGE}/spark-operator:${tagStamp}
docker build --build-arg SPARK_IMAGE=${SPARK_REGISTRY}:${SPARK_VERSION} -t ${CI_REGISTRY_IMAGE}/spark-operator:${tagStamp} .
else
tagStamp=$(git describe --dirty) ; echo tagStamp is ${tagStamp} ;
echo CI_REGISTRY_IMAGE_TAG is ${CI_REGISTRY_IMAGE}/spark-operator:${tagStamp}
docker build -t ${CI_REGISTRY_IMAGE}/spark-operator:${tagStamp} .
fi
- time docker push ${CI_REGISTRY_IMAGE}/spark-operator:${tagStamp}
- docker images