Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
zoe-apps
zapp-spark
Commits
1b820977
Commit
1b820977
authored
Sep 13, 2017
by
Daniele Venzano
Browse files
Modify gitlab CI
parent
73197082
Pipeline
#4496
failed
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
1b820977
stages
:
-
build
-
test
-
push
-
pull
-
deploy
variables
:
VERSION
:
$CI_BUILD_ID
images
:
image
:
docker:latest
stage
:
deploy
before_script
:
-
mkdir -p /etc/docker/certs.d/$DOCKER_REGISTRY
-
cp /registry-ca.crt /etc/docker/certs.d/$DOCKER_REGISTRY/ca.crt
-
mkdir -p $HOME/.docker
-
echo $DOCKER_AUTH_CONFIG > $HOME/.docker/config.json
-
apk update
-
apk add python findutils bash
script
:
-
bash build_all.sh
image
:
docker:latest
before_script
:
-
mkdir -p /etc/docker/certs.d/$DOCKER_REGISTRY
-
cp /registry-ca.crt /etc/docker/certs.d/$DOCKER_REGISTRY/ca.crt
-
mkdir -p $HOME/.docker
-
echo $DOCKER_AUTH_CONFIG > $HOME/.docker/config.json
build:spark2-jupyter-notebook:
stage
:
build
script
:
-
docker build -t ${DOCKER_REGISTRY}/${REPOSITORY}/spark2-jupyter-notebook:${VERSION} docker/spark2-jupyter-notebook
build:spark2-master:
stage
:
build
script
:
-
docker build -t ${DOCKER_REGISTRY}/${REPOSITORY}/spark2-master:${VERSION} docker/spark2-master
build:spark2-worker:
stage
:
build
script
:
-
docker build -t ${DOCKER_REGISTRY}/${REPOSITORY}/spark2-worker:${VERSION} docker/spark2-worker
build:spark2-submit:
stage
:
build
script
:
-
docker build -t ${DOCKER_REGISTRY}/${REPOSITORY}/spark2-submit:${VERSION} docker/spark2-submit
build:json:
image
:
python:3-alpine
stage
:
build
script
:
-
python gen_json.py
artifacts
:
paths
:
-
"
spark*.json"
test:json:
image
:
python:3-alpine
stage
:
test
before_script
:
-
pip install requests
script
:
-
python validate.py ${VALIDATION_URL} spark*.json
push:all:
stage
:
push
script
:
-
docker push ${DOCKER_REGISTRY}/${REPOSITORY}/spark2-submit:${VERSION}
-
docker push ${DOCKER_REGISTRY}/${REPOSITORY}/spark2-master:${VERSION}
-
docker push ${DOCKER_REGISTRY}/${REPOSITORY}/spark2-worker:${VERSION}
-
docker push ${DOCKER_REGISTRY}/${REPOSITORY}/spark2-jupyter-notebook:${VERSION}
only
:
-
master
pull:all:
stage
:
pull
- docker -H ${SWARM} ${SWARM_TLS_OPTIONS} pull ${DOCKER_REGISTRY}/${REPOSITORY}/spark2-submit:${VERSION}
- docker -H ${SWARM} ${SWARM_TLS_OPTIONS} pull ${DOCKER_REGISTRY}/${REPOSITORY}/spark2-master:${VERSION}
- docker -H ${SWARM} ${SWARM_TLS_OPTIONS} pull ${DOCKER_REGISTRY}/${REPOSITORY}/spark2-worker:${VERSION}
- docker -H ${SWARM} ${SWARM_TLS_OPTIONS} pull ${DOCKER_REGISTRY}/${REPOSITORY}/spark2-jupyter-notebook:${VERSION}
only
:
-
master
deploy:json:
stage
:
deploy
script
:
-
mkdir -p ${ZAPP_SHOP_BASE_PATH}/${CI_PROJECT_NAME}
-
cp "*.json" ${ZAPP_SHOP_BASE_PATH}/${CI_PROJECT_NAME}/
-
cp logo.png ${ZAPP_SHOP_BASE_PATH}/${CI_PROJECT_NAME}/
-
cp README*.md ${ZAPP_SHOP_BASE_PATH}/${CI_PROJECT_NAME}/
artifacts
:
paths
:
-
"
*.json"
-
logo.png
-
"
README*.md"
only
:
-
master
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment