Commit 5f885d71 authored by Manuel Christlieb's avatar Manuel Christlieb
Browse files

let this work

parent 8d2b7e78
Pipeline #21761 passed with stage
in 59 seconds
......@@ -2,7 +2,6 @@ image: docker:latest
services:
- name: docker:dind
command: ["--experimental"]
stages:
- build
......@@ -13,4 +12,5 @@ build:
refs:
- master
script:
- /bin/sh build.sh
- /bin/sh build.sh 0.6.5
......@@ -10,4 +10,4 @@ RUN apk add --update ruby ruby-dev ruby-bigdecimal sqlite sqlite-dev build-base
apk del --purge ruby-dev build-base && \
rm -rf /var/cache/apk/*
CMD mailcatcher -f --ip=0.0.0.0 --smtp-port=$SMTP_PORT --http-port=$HTTP_PORT
\ No newline at end of file
CMD mailcatcher -f --ip=0.0.0.0 --smtp-port=$SMTP_PORT --http-port=$HTTP_PORT
#!/bin/bash
# Configuration
VERSIONS="0.6.5"
LATEST_VERSION="0.6.5"
# Let's do it
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
......@@ -20,13 +22,15 @@ else # inside gitlab ci runner
BUILD_IMAGE_BASE="$CI_REGISTRY/$CI_PROJECT_PATH"
fi
for VERSION in $VERSIONS
do
# Build Image
docker build --squash --pull -t "$BUILD_IMAGE_BASE:$VERSION" "$VERSION"
docker push "$BUILD_IMAGE_BASE:$VERSION"
done
# Build latest image
docker build --squash --pull -t "$BUILD_IMAGE_BASE:latest" "$LATEST_VERSION"
docker push "$BUILD_IMAGE_BASE:latest"
# 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