Page MenuHomePhorge

build.sh
No OneTemporary

Authored By
Unknown
Size
2 KB
Referenced Files
None
Subscribers
None

build.sh

#!/bin/bash
set -e
REGISTRY=${REGISTRY:-"quay.io/apheleiait/kolab"}
SKIP_CHECKS=0
if [[ "$1" == "--nochecks" ]]; then
SKIP_CHECKS=1
shift
fi
# git ls-remote --exit-code -h "https://git.kolab.org/source/kolab" refs/heads/master
GIT_REF="${GIT_REF:-master}"
GIT_REMOTE="${GIT_REMOTE:-https://git.kolab.org/source/kolab}"
if [ -e "$LOCAL_DIR" ]; then
echo "Building from local directory $LOCAL_DIR"
pushd build
pushd "$LOCAL_DIR"
else
pushd build
rm -rf kolab
git clone --branch $GIT_REF $GIT_REMOTE kolab
pushd kolab
git reset --hard $GIT_REF
fi
function pin_commit() {
git ls-remote --exit-code -h "$1" "refs/heads/$2" | awk '{print $1}'
}
export KOLAB_GIT_REMOTE=https://git.kolab.org/source/kolab
export KOLAB_GIT_REF=$(pin_commit "$KOLAB_GIT_REMOTE" "master")
export GIT_REMOTE_ROUNDCUBEMAIL=https://git.kolab.org/source/roundcubemail.git
export GIT_REF_ROUNDCUBEMAIL=$(pin_commit "$GIT_REMOTE_ROUNDCUBEMAIL" "dev/kolab-1.6")
export GIT_REMOTE_ROUNDCUBEMAIL_PLUGINS=https://git.kolab.org/diffusion/RPK/roundcubemail-plugins-kolab.git
export GIT_REF_ROUNDCUBEMAIL_PLUGINS=$(pin_commit "$GIT_REMOTE_ROUNDCUBEMAIL_PLUGINS" "master")
export GIT_REMOTE_CHWALA=https://git.kolab.org/diffusion/C/chwala.git
export GIT_REF_CHWALA=$(pin_commit "$GIT_REMOTE_CHWALA" "master")
export GIT_REMOTE_SYNCROTON=https://git.kolab.org/diffusion/S/syncroton.git
export GIT_REF_SYNCROTON=$(pin_commit "$GIT_REMOTE_SYNCROTON" "master")
export GIT_REMOTE_AUTOCONF=https://git.kolab.org/diffusion/AC/autoconf.git
export GIT_REF_AUTOCONF=$(pin_commit "$GIT_REMOTE_AUTOCONF" "master")
export GIT_REMOTE_IRONY=https://git.kolab.org/source/iRony.git
export GIT_REF_IRONY=$(pin_commit "$GIT_REMOTE_IRONY" "master")
export GIT_REMOTE_FREEBUSY=https://git.kolab.org/diffusion/F/freebusy.git
export GIT_REF_FREEBUSY=$(pin_commit "$GIT_REMOTE_FREEBUSY" "master")
# Build containers and run the testsuite
if [[ ! $SKIP_CHECKS ]]; then
ci/testctl testrun
fi
./kolabctl build
./kolabctl build vector
popd
popd
if [[ ! $SKIP_CHECKS ]]; then
# Now do a k3s setup validate
./kolabctl deploy
./kolabctl selfcheck
./kolabctl reset --force
fi
if [[ "$1" == "--release" ]]; then
shift
env REGISTRY=$REGISTRY build/publish.sh --tag $@
# We don't pin digests and rely on the tag for now
# env REGISTRY=$REGISTRY build/pin_image_digests.sh --version "$1"
# Already done by helm release
# sed -i "s/appVersion:.*/appVersion: $1/" kolab/Chart.yaml
else
build/publish.sh
fi

File Metadata

Mime Type
text/x-shellscript
Expires
Sat, Apr 4, 1:01 AM (3 w, 2 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
55/04/9d1f1d0ac468b4a7d0a8588a32a9
Default Alt Text
build.sh (2 KB)

Event Timeline