added labels
This commit is contained in:
parent
3058ad3624
commit
8033fedf18
2 changed files with 3 additions and 1 deletions
|
@ -28,7 +28,7 @@ docker-build:
|
|||
tag=":$CI_COMMIT_REF_SLUG"
|
||||
echo "Running on branch '$CI_COMMIT_BRANCH': tag = $tag"
|
||||
fi
|
||||
- docker build --pull -t "$CI_REGISTRY_IMAGE${tag}" .
|
||||
- docker build --pull --label org.label-schema.build-date=$(date -u +'%FT%H:%M:%SZ') --label org.label-schema.name="${NAME}" --label org.label-schema.vcs-url="${CI_PROJECT_URL}" --label org.label-schema.vcs-ref="${CI_COMMIT_SHA:0:8}" -t "${CI_REGISTRY_IMAGE}/${CI_COMMIT_REF_NAME}:${CI_COMMIT_SHA:0:8}" -t "$CI_REGISTRY_IMAGE${tag}" .
|
||||
- docker push "$CI_REGISTRY_IMAGE${tag}"
|
||||
# Run this job in a branch where a Dockerfile exists
|
||||
rules:
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
FROM alpine
|
||||
|
||||
LABEL org.label-schema.schema-version="1.0.0-rc1"
|
||||
|
||||
RUN apk fix && \
|
||||
apk --no-cache --update add git git-lfs gpg less man-pages openssh patch git-annex && \
|
||||
git lfs install
|
||||
|
|
Loading…
Reference in a new issue