chain gateway build fix
Some checks failed
ci/woodpecker/push/db Pipeline was successful
ci/woodpecker/push/chain_gateway Pipeline failed
ci/woodpecker/push/fees Pipeline failed
ci/woodpecker/push/fx/1 Pipeline failed
ci/woodpecker/push/fx/2 Pipeline failed
ci/woodpecker/push/nats Pipeline was successful
Some checks failed
ci/woodpecker/push/db Pipeline was successful
ci/woodpecker/push/chain_gateway Pipeline failed
ci/woodpecker/push/fees Pipeline failed
ci/woodpecker/push/fx/1 Pipeline failed
ci/woodpecker/push/fx/2 Pipeline failed
ci/woodpecker/push/nats Pipeline was successful
This commit is contained in:
@@ -46,7 +46,7 @@ normalize_env_file ./.env.version
|
||||
load_env_file "${RUNTIME_ENV_FILE}"
|
||||
load_env_file ./.env.version
|
||||
|
||||
CHAIN_GATEWAY_MONGO_SECRET_PATH="${CHAIN_GATEWAY_MONGO_SECRET_PATH:?missing CHAIN_GATEWAY_MONGO_SECRET_PATH}"
|
||||
CHAIN_GATEWAY_MONGO_SECRET_PATH="${CHAIN_GATEWAY_MONGO_SECRET_PATH:?missing CHAIsN_GATEWAY_MONGO_SECRET_PATH}"
|
||||
CHAIN_GATEWAY_RUNTIME_SECRET_PATH="${CHAIN_GATEWAY_RUNTIME_SECRET_PATH:?missing CHAIN_GATEWAY_RUNTIME_SECRET_PATH}"
|
||||
: "${NATS_HOST:?missing NATS_HOST}"
|
||||
: "${NATS_PORT:?missing NATS_PORT}"
|
||||
|
||||
@@ -3,30 +3,38 @@ set -eu
|
||||
|
||||
echo "[fx-pipeline] rewriting .env.version" >&2
|
||||
|
||||
if [ -f ./.env.version ]; then
|
||||
# shellcheck disable=SC1091
|
||||
. ./.env.version || true
|
||||
fi
|
||||
|
||||
if [ -n "${WOODPECKER_COMMIT:-}" ]; then
|
||||
GIT_REV="$(printf '%s' "${WOODPECKER_COMMIT}" | cut -c1-7)"
|
||||
elif command -v git >/dev/null 2>&1; then
|
||||
GIT_REV="$(git rev-parse --short HEAD 2>/dev/null || echo dev)"
|
||||
else
|
||||
GIT_REV="dev"
|
||||
GIT_REV="$(git rev-parse --short HEAD 2>/dev/null || true)"
|
||||
fi
|
||||
: "${GIT_REV:=dev}"
|
||||
|
||||
if [ -n "${WOODPECKER_BRANCH:-}" ]; then
|
||||
BUILD_BRANCH="${WOODPECKER_BRANCH}"
|
||||
elif command -v git >/dev/null 2>&1; then
|
||||
BUILD_BRANCH="$(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo local)"
|
||||
else
|
||||
BUILD_BRANCH="local"
|
||||
BUILD_BRANCH="$(git rev-parse --abbrev-ref HEAD 2>/dev/null || true)"
|
||||
fi
|
||||
: "${BUILD_BRANCH:=local}"
|
||||
|
||||
if [ -f version ]; then
|
||||
APP_V="$(cat version 2>/dev/null || echo dev)"
|
||||
else
|
||||
APP_V="dev"
|
||||
APP_V="$(cat version 2>/dev/null || true)"
|
||||
fi
|
||||
: "${APP_V:=dev}"
|
||||
|
||||
if [ -z "${BUILD_DATE:-}" ]; then
|
||||
BUILD_DATE="$(date -u +%Y-%m-%dT%H:%M:%SZ 2>/dev/null || echo unknown)"
|
||||
fi
|
||||
|
||||
BUILD_DATE="$(date -u +%Y-%m-%dT%H:%M:%SZ 2>/dev/null || echo unknown)"
|
||||
BUILD_USER="${WOODPECKER_MACHINE:-woodpecker}"
|
||||
: "${WOODPECKER_MACHINE:=woodpecker}"
|
||||
if [ -z "${BUILD_USER:-}" ]; then
|
||||
BUILD_USER="${WOODPECKER_MACHINE}"
|
||||
fi
|
||||
|
||||
cat > .env.version <<EOF
|
||||
GIT_REV=${GIT_REV}
|
||||
|
||||
Reference in New Issue
Block a user