Commit 9f05651b authored by David Danier's avatar David Danier

multi-threaded build test

parent b86f8890
Pipeline #11063 failed with stages
in 1 minute and 15 seconds
......@@ -4,12 +4,45 @@ services:
- docker:dind
stages:
- login
- build
build:
stage: login
only:
refs:
- master
script:
- /bin/sh build/ci/login.sh
build56:
stage: build
only:
refs:
- master
script:
- /bin/sh build/ci/build.sh 5.6
build70:
stage: build
only:
refs:
- master
script:
- /bin/sh build/ci/build.sh 7.0
build71:
stage: build
only:
refs:
- master
script:
- /bin/sh build/ci/build.sh 7.1
build72:
stage: build
only:
refs:
- master
script:
- /bin/sh build.sh
- /bin/sh build/ci/build.sh 7.2 latest
#!/bin/bash
set -o errexit
set -o pipefail
VERSION="${1:-}"
ADDITIONAL="${2:-}"
if [ -z "$VERSION" ]
then
echo "Error: No version supplied"
echo "Usage: $0 <version> [additional]"
exit 1
fi
# Copy shared files
cp -rp shared/*.sh "$VERSION/"
cp -rp shared/php.ini "$VERSION/"
# Copy version specific versions of shared scripts
if [ -d shared/$VERSION ]
then
cp -rp shared/$VERSION/*.sh "$VERSION/"
fi
# Build Image
docker build --pull -t "$BUILD_IMAGE_BASE:$VERSION" "$VERSION"
docker push "$BUILD_IMAGE_BASE:$VERSION"
if [ ! -z "$ADDITIONAL" ]
then
# Build additional image (usually latest)
docker build --pull -t "$BUILD_IMAGE_BASE:$ADDITIONAL" "$VERSION"
docker push "$BUILD_IMAGE_BASE:$ADDITIONAL"
fi
#!/bin/bash
# Configuration
VERSIONS="5.6 7.0 7.1 7.2"
LATEST_VERSION="7.2"
# Let's do it
set -o errexit
set -o pipefail
......@@ -19,22 +12,3 @@ 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
# Copy shared files
cp -rp shared/*.sh "$VERSION/"
cp -rp shared/php.ini "$VERSION/"
# Copy version specific versions of shared scripts
if [ -d shared/$VERSION ]
then
cp -rp shared/$VERSION/*.sh "$VERSION/"
fi
# Build Image
docker build --pull -t "$BUILD_IMAGE_BASE:$VERSION" "$VERSION"
docker push "$BUILD_IMAGE_BASE:$VERSION"
done
# Build latest image
docker build --pull -t "$BUILD_IMAGE_BASE:latest" "$LATEST_VERSION"
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