Loading .gitlab-ci.yml 0 → 100644 +16 −0 Original line number Diff line number Diff line image: docker:latest services: - name: docker:dind stages: - build build5610: stage: build only: refs: - master script: - /bin/sh build.sh 5.6.10 5.6.10/Dockerfile 0 → 100644 +5 −0 Original line number Diff line number Diff line 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 README.md 0 → 100644 +7 −0 Original line number Diff line number Diff line # 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 build.sh 0 → 100755 +36 −0 Original line number Diff line number Diff line #!/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 Loading
.gitlab-ci.yml 0 → 100644 +16 −0 Original line number Diff line number Diff line image: docker:latest services: - name: docker:dind stages: - build build5610: stage: build only: refs: - master script: - /bin/sh build.sh 5.6.10
5.6.10/Dockerfile 0 → 100644 +5 −0 Original line number Diff line number Diff line 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
README.md 0 → 100644 +7 −0 Original line number Diff line number Diff line # 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
build.sh 0 → 100755 +36 −0 Original line number Diff line number Diff line #!/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