Commit 9ffd4d93 authored by Konstantin Pavlov's avatar Konstantin Pavlov

Added Gitlab CI.

parent e204f585
Pipeline #3369 passed with stage
.build-images: &build-images |
set -x
echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
DIRS=""
CHANGED=$(for i in `git log --name-only --pretty=oneline --full-index $CI_COMMIT_BEFORE_SHA..$CI_COMMIT_SHA | grep -vE '^[0-9a-f]{40} '`; do echo `dirname $i`; done | sort | uniq)
for dir in $CHANGED; do
case "$dir" in
".")
;;
*)
DIRS="$DIRS $dir"
;;
esac
done
echo "Changed images: '$DIRS'"
for d in $DIRS; do
[ -d "$d" ] || continue
DATE=`date +'%Y%m%d%H%M%S'`
/kaniko/executor --context $d --dockerfile Dockerfile --destination registry.videolan.org:5000/$d:$DATE
done
build:
stage: build
image:
name: registry.videolan.org:5000/videolan-kaniko:20181207114741
entrypoint: [""]
script:
- *build-images
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment