This commit is contained in:
2025-10-12 18:16:36 +08:00
parent c9412702df
commit 1b65c1de45

View File

@@ -22,9 +22,15 @@ steps:
commands: commands:
- | - |
set -e set -e
echo "=== 调试信息 ==="
echo "AWS_ACCESS_KEY_ID is set: $([[ -n "$AWS_ACCESS_KEY_ID" ]] && echo 'YES' || echo 'NO')"
echo "AWS_SECRET_ACCESS_KEY is set: $([[ -n "$AWS_SECRET_ACCESS_KEY" ]] && echo 'YES' || echo 'NO')"
echo "S3_BUCKET is set: $([[ -n "$S3_BUCKET" ]] && echo 'YES' || echo 'NO')"
echo "S3_ENDPOINT value: ${S3_ENDPOINT:-'NOT SET'}"
echo "================"
if [[ -n "$AWS_ACCESS_KEY_ID" && -n "$AWS_SECRET_ACCESS_KEY" && -n "$S3_BUCKET" ]]; then if [[ -n "$AWS_ACCESS_KEY_ID" && -n "$AWS_SECRET_ACCESS_KEY" && -n "$S3_BUCKET" ]]; then
echo "Uploading hello.txt to S3..." echo "Uploading hello.txt to S3..."
# 设置 plugin-s3 环境变量
export PLUGIN_SOURCE="hello.txt" export PLUGIN_SOURCE="hello.txt"
export PLUGIN_BUCKET="$S3_BUCKET" export PLUGIN_BUCKET="$S3_BUCKET"
export PLUGIN_TARGET="woodpecker-test/" export PLUGIN_TARGET="woodpecker-test/"