Commit e7fbb386 authored by Manuel Munz's avatar Manuel Munz
Browse files

build yamllint image

parent 3bbb879a
Pipeline #55825 passed with stage
in 36 seconds
image: docker:latest
services:
- name: docker:dind
command: ["--experimental"]
stages:
- build
build:
stage: build
only:
refs:
- master
script:
- /bin/sh build.sh
FROM python:alpine3.7
RUN pip install yamllint==1.25.0
\ No newline at end of file
# yamllint
# yammlint
yamllint, see https://github.com/adrienverge/yamllint
\ No newline at end of file
Containerized yamllint, see https://github.com/adrienverge/yamllint
## Supported tags and respective Dockerfile links
* `1.25.0`: [Dockerfile](1.25.0/Dockerfile)
* `latest`: see `1.25.0`
#!/bin/bash
# Configuration
VERSIONS="1.25.0"
LATEST_VERSION="1.25.0"
# Let's do it
set -o errexit
set -o pipefail
if [ -z "$CI_REGISTRY" ]
then # outside gitlab ci runner
docker login docker.team23.de
BUILD_PROJECT_NAME=$( basename $( pwd ) )
BUILD_IMAGE_BASE="docker.team23.de/docker/$BUILD_PROJECT_NAME"
else # inside gitlab ci runner
docker login -u gitlab-ci-token -p "$CI_JOB_TOKEN" "$CI_REGISTRY"
BUILD_IMAGE_BASE="$CI_REGISTRY/$CI_PROJECT_PATH"
fi
for VERSION in $VERSIONS
do
# Build Image
docker build --pull -t "$BUILD_IMAGE_BASE:$VERSION" "$VERSION"
# only CI should be allowed push images
[ -n "$CI_REGISTRY" ] && docker push "$BUILD_IMAGE_BASE:$VERSION"
done
# Build latest image
docker build --pull -t "$BUILD_IMAGE_BASE:latest" "$LATEST_VERSION"
[ -n "$CI_REGISTRY" ] && docker push "$BUILD_IMAGE_BASE:latest"
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