2019-11-25 13:11:18 +01:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
# /opt/lxd-executor/base.sh
|
|
|
|
|
|
|
|
#CUSTOM_ENV_CI_BUILD_REF_NAME=stretch-unstable
|
|
|
|
#CUSTOM_ENV_CI_BUILD_REF_SLUG=stretch-unstable
|
|
|
|
#CUSTOM_ENV_CI_DEFAULT_BRANCH=stretch-unstable
|
|
|
|
#CUSTOM_ENV_CI_JOB_NAME=build1
|
|
|
|
#CUSTOM_ENV_CI_COMMIT_REF_SLUG=stretch-unstable
|
|
|
|
#CUSTOM_ENV_CI_BUILD_STAGE=pre-postinstall
|
|
|
|
#CUSTOM_ENV_CI_JOB_STAGE=pre-postinstall
|
|
|
|
#CUSTOM_ENV_CI_BUILD_REF_NAME=stretch-unstable
|
|
|
|
#CUSTOM_ENV_CI_BUILD_NAME=build1
|
|
|
|
#CUSTOM_ENV_CI_PROJECT_TITLE=yunohost
|
|
|
|
#CUSTOM_ENV_CI_RUNNER_EXECUTABLE_ARCH=linux/amd64
|
|
|
|
#CUSTOM_ENV_CI_PROJECT_NAMESPACE=yunohost
|
|
|
|
#CUSTOM_ENV_CI_COMMIT_REF_NAME=stretch-unstable
|
|
|
|
#CUSTOM_ENV_CI_PROJECT_NAME=yunohost
|
|
|
|
#CUSTOM_ENV_CI_PROJECT_DIR=/builds/yunohost/yunohost
|
2019-11-26 14:01:29 +01:00
|
|
|
CONTAINER_ID="runner-$CUSTOM_ENV_CI_RUNNER_ID-project-$CUSTOM_ENV_CI_PROJECT_ID-concurrent-$CUSTOM_ENV_CI_CONCURRENT_PROJECT_ID-$CUSTOM_ENV_CI_JOB_ID"
|
|
|
|
DEBIAN_VERSION="$CUSTOM_ENV_DEBIAN_VERSION"
|
2019-12-23 06:11:29 +01:00
|
|
|
DEBIAN_VERSION=$(echo $CUSTOM_ENV_CI_JOB_IMAGE | cut -d':' -f1)
|
2019-11-26 14:01:29 +01:00
|
|
|
if [ -z "$DEBIAN_VERSION" ]
|
|
|
|
then
|
|
|
|
DEBIAN_VERSION="stretch"
|
|
|
|
fi
|
2019-12-23 06:11:29 +01:00
|
|
|
SNAPSHOT_NAME=$(echo $CUSTOM_ENV_CI_JOB_IMAGE | cut -d':' -f2)
|
2019-11-25 13:11:18 +01:00
|
|
|
if [ -z "$SNAPSHOT_NAME" ]
|
|
|
|
then
|
|
|
|
SNAPSHOT_NAME="after-postinstall"
|
2019-12-23 06:11:29 +01:00
|
|
|
fi
|
|
|
|
PROJECT_DIR="$CUSTOM_ENV_CI_PROJECT_DIR"
|
|
|
|
PROJECT_NAME="$CUSTOM_ENV_CI_PROJECT_NAME"
|