test label
This commit is contained in:
parent
c58f301c91
commit
9423cf6f23
@ -9,7 +9,11 @@ before_script:
|
|||||||
build-master:
|
build-master:
|
||||||
stage: "build"
|
stage: "build"
|
||||||
script:
|
script:
|
||||||
- "docker build --pull -t \"$CI_REGISTRY_IMAGE\" ."
|
- "docker build --pull \
|
||||||
|
--build-arg VCS_REF=`git rev-parse HEAD` \
|
||||||
|
--build-arg BUILD_DATE=`date -u +”%Y-%m-%dT%H:%M:%SZ”` \
|
||||||
|
--build-arg VERSION=`git describe --tags --exact-match || git rev-parse HEAD` \
|
||||||
|
-t \"$CI_REGISTRY_IMAGE\" ."
|
||||||
- "docker push \"$CI_REGISTRY_IMAGE\""
|
- "docker push \"$CI_REGISTRY_IMAGE\""
|
||||||
only:
|
only:
|
||||||
- "master"
|
- "master"
|
||||||
@ -17,7 +21,11 @@ build-master:
|
|||||||
build:
|
build:
|
||||||
stage: "build"
|
stage: "build"
|
||||||
script:
|
script:
|
||||||
- "docker build --pull -t \"$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG\" ."
|
- "docker build --pull \
|
||||||
|
--build-arg VCS_REF=`git rev-parse HEAD` \
|
||||||
|
--build-arg BUILD_DATE=`date -u +”%Y-%m-%dT%H:%M:%SZ”` \
|
||||||
|
--build-arg VERSION=`git describe --tags --exact-match || git rev-parse HEAD` \
|
||||||
|
-t \"$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG\" ."
|
||||||
- "docker push \"$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG\""
|
- "docker push \"$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG\""
|
||||||
except:
|
except:
|
||||||
- "master"
|
- "master"
|
||||||
|
|||||||
23
Dockerfile
23
Dockerfile
@ -1,7 +1,26 @@
|
|||||||
FROM "python:3.7-alpine"
|
FROM "python:3.7-alpine"
|
||||||
MAINTAINER "Julien Cabillot <julien@sdv.fr>"
|
LABEL maintainer="Julien Cabillot <dockerimages@cabillot.eu>"
|
||||||
|
|
||||||
|
ARG BUILD_DATE
|
||||||
|
ARG VCS_REF
|
||||||
|
ARG VERSION
|
||||||
|
|
||||||
RUN apk --no-cache add --virtual build-dependencies \
|
RUN apk --no-cache add --virtual build-dependencies \
|
||||||
build-base libffi-dev libressl-dev && \
|
build-base libffi-dev libressl-dev && \
|
||||||
pip install --no-cache-dir ansible-lint ansible-lint-junit && \
|
pip install --no-cache-dir ansible-lint ansible-lint-junit && \
|
||||||
apk del build-dependencies
|
apk del build-dependencies
|
||||||
|
|
||||||
|
LABEL "maintainer"="dockerimages@cabillot.eu" \
|
||||||
|
"org.label-schema.name"="ansible-lint" \
|
||||||
|
"org.label-schema.base-image.name"="docker.io/library/python" \
|
||||||
|
"org.label-schema.base-image.version"="3.7-alpine" \
|
||||||
|
"org.label-schema.description"="Ansible-lint in a container" \
|
||||||
|
"org.label-schema.url"="https://github.com/ansible/ansible-lint" \
|
||||||
|
"org.label-schema.vcs-url"="https://gitlab.cabillot.eu/jcabillot/ansible-lint/" \
|
||||||
|
"org.label-schema.vendor"="Julien Cabillot" \
|
||||||
|
"org.label-schema.schema-version"="1.0" \
|
||||||
|
"org.label-schema.applications.ansiblelint.version"="latest" \
|
||||||
|
"org.label-schema.vcs-ref"=$VCS_REF \
|
||||||
|
"org.label-schema.version"=$VERSION \
|
||||||
|
"org.label-schema.build-date"=$BUILD_DATE \
|
||||||
|
"org.label-schema.usage"="docker run --rm -v $(pwd):/data registry.cabillot.eu/jcabillot/ansible-lint -p ."
|
||||||
Loading…
x
Reference in New Issue
Block a user