build fix
This commit is contained in:
@@ -9,10 +9,24 @@ sh ci/pipelines/fx/ensure_env_version.sh
|
|||||||
sed -i 's/\r$//' ./ci/prod/.env.runtime
|
sed -i 's/\r$//' ./ci/prod/.env.runtime
|
||||||
sed -i 's/\r$//' ./.env.version
|
sed -i 's/\r$//' ./.env.version
|
||||||
|
|
||||||
set -a
|
lc_load_env_file() {
|
||||||
. ./ci/prod/.env.runtime
|
file="$1"
|
||||||
. ./.env.version
|
while IFS= read -r line || [ -n "$line" ]; do
|
||||||
set +a
|
case "$line" in
|
||||||
|
''|\#*) continue ;;
|
||||||
|
esac
|
||||||
|
key="${line%%=*}"
|
||||||
|
value="${line#*=}"
|
||||||
|
key="$(printf '%s' "$key" | tr -d '[:space:]')"
|
||||||
|
value="${value#"${value%%[![:space:]]*}"}"
|
||||||
|
value="${value%"${value##*[![:space:]]}"}"
|
||||||
|
value="${value%$'\r'}"
|
||||||
|
export "$key=$value"
|
||||||
|
done <"$file"
|
||||||
|
}
|
||||||
|
|
||||||
|
lc_load_env_file ./ci/prod/.env.runtime
|
||||||
|
lc_load_env_file ./.env.version
|
||||||
|
|
||||||
REGISTRY_URL="${REGISTRY_URL:?missing REGISTRY_URL}"
|
REGISTRY_URL="${REGISTRY_URL:?missing REGISTRY_URL}"
|
||||||
APP_V="${APP_V:?missing APP_V}"
|
APP_V="${APP_V:?missing APP_V}"
|
||||||
@@ -37,7 +51,6 @@ cat <<EOF >/kaniko/.docker/config.json
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
/kaniko/executor \
|
/kaniko/executor \
|
||||||
--context "${PWD}" \
|
|
||||||
--dockerfile "${FX_DOCKERFILE}" \
|
--dockerfile "${FX_DOCKERFILE}" \
|
||||||
--destination "${REGISTRY_URL}/${FX_IMAGE_PATH}:${APP_V}" \
|
--destination "${REGISTRY_URL}/${FX_IMAGE_PATH}:${APP_V}" \
|
||||||
--build-arg APP_VERSION="${APP_V}" \
|
--build-arg APP_VERSION="${APP_V}" \
|
||||||
|
|||||||
@@ -7,11 +7,26 @@ fi
|
|||||||
|
|
||||||
sh ci/pipelines/fx/ensure_env_version.sh
|
sh ci/pipelines/fx/ensure_env_version.sh
|
||||||
sed -i 's/\r$//' ./ci/prod/.env.runtime
|
sed -i 's/\r$//' ./ci/prod/.env.runtime
|
||||||
|
sed -i 's/\r$//' ./.env.version
|
||||||
|
|
||||||
set -a
|
lc_load_env_file() {
|
||||||
. ./ci/prod/.env.runtime
|
file="$1"
|
||||||
. ./.env.version
|
while IFS= read -r line || [ -n "$line" ]; do
|
||||||
set +a
|
case "$line" in
|
||||||
|
''|\#*) continue ;;
|
||||||
|
esac
|
||||||
|
key="${line%%=*}"
|
||||||
|
value="${line#*=}"
|
||||||
|
key="$(printf '%s' "$key" | tr -d '[:space:]')"
|
||||||
|
value="${value#"${value%%[![:space:]]*}"}"
|
||||||
|
value="${value%"${value##*[![:space:]]}"}"
|
||||||
|
value="${value%$'\r'}"
|
||||||
|
export "$key=$value"
|
||||||
|
done <"$file"
|
||||||
|
}
|
||||||
|
|
||||||
|
lc_load_env_file ./ci/prod/.env.runtime
|
||||||
|
lc_load_env_file ./.env.version
|
||||||
|
|
||||||
FX_MONGO_SECRET_PATH="${FX_MONGO_SECRET_PATH:?missing FX_MONGO_SECRET_PATH}"
|
FX_MONGO_SECRET_PATH="${FX_MONGO_SECRET_PATH:?missing FX_MONGO_SECRET_PATH}"
|
||||||
FX_DEPLOY_TARGET="${FX_DEPLOY_TARGET:?missing FX_DEPLOY_TARGET}"
|
FX_DEPLOY_TARGET="${FX_DEPLOY_TARGET:?missing FX_DEPLOY_TARGET}"
|
||||||
|
|||||||
Reference in New Issue
Block a user