Skip to content
Snippets Groups Projects
Commit adad28da authored by jurgenhaas's avatar jurgenhaas
Browse files

Merge branch 'release/v2.3.1'

parents 2adcc825 c9e4553d
No related branches found
No related tags found
No related merge requests found
......@@ -22,50 +22,13 @@ run:
only:
- tags
php-7.0:
php:
stage: build
parallel:
matrix:
- PHP: ['7.0','7.1','7.2','7.3','7.4','8.0','8.1']
script:
- docker build --pull --build-arg PHP_VERSION=7.0 --build-arg VERSION=${VERSION} -t ${CI_REGISTRY_IMAGE}/php-7.0:${VERSION} .
- docker push ${CI_REGISTRY_IMAGE}/php-7.0:${VERSION}
only:
- tags
php-7.1:
stage: build
script:
- docker build --pull --build-arg PHP_VERSION=7.1 --build-arg VERSION=${VERSION} -t ${CI_REGISTRY_IMAGE}/php-7.1:${VERSION} .
- docker push ${CI_REGISTRY_IMAGE}/php-7.1:${VERSION}
only:
- tags
php-7.2:
stage: build
script:
- docker build --pull --build-arg PHP_VERSION=7.2 --build-arg VERSION=${VERSION} -t ${CI_REGISTRY_IMAGE}/php-7.2:${VERSION} .
- docker push ${CI_REGISTRY_IMAGE}/php-7.2:${VERSION}
only:
- tags
php-7.3:
stage: build
script:
- docker build --pull --build-arg PHP_VERSION=7.3 --build-arg VERSION=${VERSION} -t ${CI_REGISTRY_IMAGE}/php-7.3:${VERSION} .
- docker push ${CI_REGISTRY_IMAGE}/php-7.3:${VERSION}
only:
- tags
php-7.4:
stage: build
script:
- docker build --pull --build-arg PHP_VERSION=7.4 --build-arg VERSION=${VERSION} -t ${CI_REGISTRY_IMAGE}/php-7.4:${VERSION} .
- docker push ${CI_REGISTRY_IMAGE}/php-7.4:${VERSION}
only:
- tags
php-8.0:
stage: build
script:
- docker build --pull --build-arg PHP_VERSION=8.0 --build-arg VERSION=${VERSION} -t ${CI_REGISTRY_IMAGE}/php-8.0:${VERSION} .
- docker push ${CI_REGISTRY_IMAGE}/php-8.0:${VERSION}
- docker build --pull --build-arg PHP_VERSION=${PHP} --build-arg VERSION=${VERSION} -t ${CI_REGISTRY_IMAGE}/php-${PHP}:${VERSION} .
- docker push ${CI_REGISTRY_IMAGE}/php-${PHP}:${VERSION}
only:
- tags
......@@ -17,6 +17,8 @@ export PHP_VERSION=7.4
/usr/local/bin/update
export PHP_VERSION=8.0
/usr/local/bin/update
export PHP_VERSION=8.1
/usr/local/bin/update
echo "Cleaning old container"
docker kill l3drun >/dev/null
......@@ -11,6 +11,7 @@ function getConfig() {
7.3) break ;;
7.4) break ;;
8.0) break ;;
8.1) break ;;
*) echo "Version not supported." ;;
esac
done
......
......@@ -247,9 +247,16 @@ if [[ -d .git ]]; then
echo "#!/bin/sh" > .git/hooks/post-checkout
chmod +x .git/hooks/post-checkout
fi
HOOK_DEFINED=$(grep /usr/local/bin/update-env .git/hooks/post-checkout)
if [[ "$HOOK_DEFINED" = "" ]]; then
echo "docker exec ${COMPOSE_PROJECT_NAME}_l3d /usr/local/bin/update-env" >> .git/hooks/post-checkout
OLDCOMMAND='docker exec '${COMPOSE_PROJECT_NAME}'_l3d /usr/local/bin/update-env'
NEWCOMMAND='RUNNING=$(docker container ls --all -q -f name='${COMPOSE_PROJECT_NAME}'_l3d);if [ "x$RUNNING" != "x" ];then docker exec '${COMPOSE_PROJECT_NAME}'_l3d /usr/local/bin/update-env;fi'
OLD_HOOK_DEFINED=$(grep "$OLDCOMMAND" .git/hooks/post-checkout)
NEW_HOOK_DEFINED=$(grep "$NEWCOMMAND" .git/hooks/post-checkout)
if [[ "x$OLD_HOOK_DEFINED" = "x" ]]; then
echo "$NEWCOMMAND" >> .git/hooks/post-checkout
elif [[ "x$NEW_HOOK_DEFINED" = "x" ]]; then
OLDCOMMAND="${OLDCOMMAND//\//\\/}"
sed -i -e "/${OLDCOMMAND}/d" .git/hooks/post-checkout
echo "$NEWCOMMAND" >> .git/hooks/post-checkout
fi
fi
/usr/local/bin/update-env
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment