mirror of
https://github.com/YunoHost/yunohost-ci.git
synced 2024-09-03 20:05:53 +02:00
rename base into variables
This commit is contained in:
parent
88bd0f6c7e
commit
28993dbd04
4 changed files with 7 additions and 40 deletions
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
current_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
source $current_dir/base.sh # Get variables from base.
|
||||
source $current_dir/variables.sh # Get variables from variables.
|
||||
|
||||
info "Deleting container $CONTAINER_ID"
|
||||
|
||||
|
|
2
run.sh
2
run.sh
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
current_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
source $current_dir/base.sh # Get variables from base.
|
||||
source $current_dir/variables.sh # Get variables from variables.
|
||||
|
||||
case ${2} in
|
||||
prepare_script)
|
||||
|
|
38
utils.sh
38
utils.sh
|
@ -1,43 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
current_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
source $current_dir/base.sh # Get variables from base.
|
||||
|
||||
readonly NORMAL=$(printf '\033[0m')
|
||||
readonly BOLD=$(printf '\033[1m')
|
||||
readonly faint=$(printf '\033[2m')
|
||||
readonly UNDERLINE=$(printf '\033[4m')
|
||||
readonly NEGATIVE=$(printf '\033[7m')
|
||||
readonly RED=$(printf '\033[31m')
|
||||
readonly GREEN=$(printf '\033[32m')
|
||||
readonly ORANGE=$(printf '\033[33m')
|
||||
readonly BLUE=$(printf '\033[34m')
|
||||
readonly YELLOW=$(printf '\033[93m')
|
||||
readonly WHITE=$(printf '\033[39m')
|
||||
|
||||
function success()
|
||||
{
|
||||
local msg=${1}
|
||||
echo "[${BOLD}${GREEN} OK ${NORMAL}] ${msg}"
|
||||
}
|
||||
|
||||
function info()
|
||||
{
|
||||
local msg=${1}
|
||||
echo "[${BOLD}${BLUE}INFO${NORMAL}] ${msg}"
|
||||
}
|
||||
|
||||
function warn()
|
||||
{
|
||||
local msg=${1}
|
||||
echo "[${BOLD}${ORANGE}WARN${NORMAL}] ${msg}" 2>&1
|
||||
}
|
||||
|
||||
function error()
|
||||
{
|
||||
local msg=${1}
|
||||
echo "[${BOLD}${RED}FAIL${NORMAL}] ${msg}" 2>&1
|
||||
}
|
||||
source $current_dir/variables.sh # Get variables from variables.
|
||||
|
||||
clean_containers()
|
||||
{
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
current_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
source $current_dir/prints.sh # Get variables from variables.
|
||||
|
||||
# All Variables here: https://docs.gitlab.com/ee/ci/variables/predefined_variables.html#variables-reference, strating with CUSTOM_ENV_
|
||||
|
||||
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"
|
||||
|
@ -11,7 +14,7 @@ DEBIAN_VERSION=$(echo $CUSTOM_ENV_CI_COMMIT_REF_NAME | cut -d'-' -f1) # CUSTOM_E
|
|||
if [ -z "$DEBIAN_VERSION" ] || [ "$DEBIAN_VERSION" != "stretch" ] && [ "$DEBIAN_VERSION" != "buster" ]
|
||||
then
|
||||
DEBIAN_VERSION="$(echo $CUSTOM_ENV_CI_DEFAULT_BRANCH | cut -d'-' -f1)" # stretch-unstable, buster-unstable...
|
||||
info "Use the default debian version: $DEBIAN_VERSION"
|
||||
echo "Use the default debian version: $DEBIAN_VERSION"
|
||||
fi
|
||||
SNAPSHOT_NAME="$CUSTOM_ENV_CI_JOB_IMAGE"
|
||||
if [ -z "$SNAPSHOT_NAME" ]
|
Loading…
Reference in a new issue