Commit 7e00c0ea authored by Manuel Christlieb's avatar Manuel Christlieb

git init

parents
Pipeline #21778 passed with stage
in 29 seconds
image: docker:latest
services:
- name: docker:dind
stages:
- build
build5610:
stage: build
only:
refs:
- master
script:
- /bin/sh build.sh 5.6.10
FROM docker.elastic.co/elasticsearch/elasticsearch:5.6.10
RUN /usr/share/elasticsearch/bin/elasticsearch-plugin install analysis-phonetic
RUN /usr/share/elasticsearch/bin/elasticsearch-plugin install analysis-icu
RUN /usr/share/elasticsearch/bin/elasticsearch-plugin remove x-pack
# Supported tags and respective Dockerfile links
* `5.6.10`: [Dockerfile](5.6.10/Dockerfile)
# Quick reference
Elasticsearch image which we are using in our Magento 2 projects
#!/bin/bash
VERSION="${1:-}"
ADDITIONAL="${2:-}"
if [ -z "$VERSION" ]
then
echo "Error: No version supplied"
echo "Usage: $0 <version> [additional]"
exit 1
fi
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
# 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"
if [ ! -z "$ADDITIONAL" ]
then
# Build additional image (usually latest)
docker build --pull -t "$BUILD_IMAGE_BASE:$ADDITIONAL" "$VERSION"
[ -n "$CI_REGISTRY" ] && docker push "$BUILD_IMAGE_BASE:$ADDITIONAL"
fi
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