import
This commit is contained in:
commit
f94208dbaa
31
.gitlab-ci.yml
Normal file
31
.gitlab-ci.yml
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
image: "docker:latest"
|
||||||
|
|
||||||
|
services:
|
||||||
|
- "docker:dind"
|
||||||
|
|
||||||
|
before_script:
|
||||||
|
- "docker login -u \"$CI_REGISTRY_USER\" -p \"$CI_REGISTRY_PASSWORD\" $CI_REGISTRY"
|
||||||
|
|
||||||
|
build-master:
|
||||||
|
stage: "build"
|
||||||
|
script:
|
||||||
|
- "docker build --pull \
|
||||||
|
--build-arg VCS_REF=\"${CI_COMMIT_SHA}\" \
|
||||||
|
--build-arg BUILD_DATE=`date -u +”%Y-%m-%dT%H:%M:%SZ”` \
|
||||||
|
--build-arg VERSION=\"NotAvailable\" \
|
||||||
|
-t \"$CI_REGISTRY_IMAGE\" ."
|
||||||
|
- "docker push \"$CI_REGISTRY_IMAGE\""
|
||||||
|
only:
|
||||||
|
- "master"
|
||||||
|
|
||||||
|
build:
|
||||||
|
stage: "build"
|
||||||
|
script:
|
||||||
|
- "docker build --pull \
|
||||||
|
--build-arg VCS_REF=\"${CI_COMMIT_SHA}\" \
|
||||||
|
--build-arg BUILD_DATE=`date -u +”%Y-%m-%dT%H:%M:%SZ”` \
|
||||||
|
--build-arg VERSION=\"NotAvailable\" \
|
||||||
|
-t \"$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG\" ."
|
||||||
|
- "docker push \"$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG\""
|
||||||
|
except:
|
||||||
|
- "master"
|
||||||
27
Dockerfile
Normal file
27
Dockerfile
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
FROM "python:3.7-alpine"
|
||||||
|
LABEL maintainer="Julien Cabillot <dockerimages@cabillot.eu>"
|
||||||
|
|
||||||
|
ARG BUILD_DATE
|
||||||
|
ARG VCS_REF
|
||||||
|
ARG VERSION
|
||||||
|
|
||||||
|
RUN apk --no-cache add --virtual build-dependencies \
|
||||||
|
build-base libffi-dev libressl-dev && \
|
||||||
|
pip install --no-cache-dir ansible-review && \
|
||||||
|
apk del build-dependencies
|
||||||
|
|
||||||
|
LABEL "maintainer"="dockerimages@cabillot.eu" \
|
||||||
|
"org.label-schema.name"="ansible-review" \
|
||||||
|
"org.label-schema.base-image.name"="docker.io/library/python" \
|
||||||
|
"org.label-schema.base-image.version"="3.7-alpine" \
|
||||||
|
"org.label-schema.description"="Ansible-review in a container" \
|
||||||
|
"org.label-schema.url"="https://github.com/willthames/ansible-review" \
|
||||||
|
"org.label-schema.vcs-url"="https://gitlab.cabillot.eu/jcabillot/ansible-review/" \
|
||||||
|
"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-review -p ."
|
||||||
|
# TODO: fix this last line
|
||||||
Loading…
x
Reference in New Issue
Block a user