feat(ci): setup static on s3 (#4075)

This commit is contained in:
Mikołaj Młodzikowski 2023-06-13 13:29:05 +02:00 committed by GitHub
parent 8f966a4ba6
commit 17ba3eb351
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 5 deletions

View File

@ -136,19 +136,28 @@ jobs:
preview_explorer=$(printf "https://%s.%s.vega.rocks" "explorer" "$branch_slug") preview_explorer=$(printf "https://%s.%s.vega.rocks" "explorer" "$branch_slug")
fi fi
projects="$(echo $projects_e2e | sed 's|-e2e||g')" projects="$(echo $projects_e2e | sed 's|-e2e||g')"
if echo "$affected" | grep -q multisig-signer; then if [[ "${{ github.event_name }}" = "pull_request" ]]; then
echo "Tools are affected" if echo "$affected" | grep -q multisig-signer; then
# tools are only applicable to check previews or deploy from develop to mainnet echo "Tools are affected"
if [[ "${{ github.event_name }}" = "pull_request" ]]; then # tools are only applicable to check previews or deploy from develop to mainnet
echo "Deploying tools on preview" echo "Deploying tools on preview"
preview_tools=$(printf "https://%s.%s.vega.rocks" "tools" "$branch_slug") preview_tools=$(printf "https://%s.%s.vega.rocks" "tools" "$branch_slug")
projects+=' "multisig-signer" ' projects+=' "multisig-signer" '
fi fi
if [[ "${{ github.ref }}" =~ .*develop$ ]]; then elif [[ "${{ github.ref }}" =~ .*develop$ ]]; then
if echo "$affected" | grep -q multisig-signer; then
echo "Tools are affected"
# tools are only applicable to check previews or deploy from develop to mainnet
echo "Deploying tools on s3" echo "Deploying tools on s3"
projects+=' "multisig-signer" ' projects+=' "multisig-signer" '
fi fi
if echo "$affected" | grep -q static; then
echo "Static are affected"
echo "Deploying static on s3"
projects+=' "static" '
fi
fi fi
projects_e2e=${projects_e2e%?} projects_e2e=${projects_e2e%?}
projects_e2e=[${projects_e2e// /,}] projects_e2e=[${projects_e2e// /,}]
projects=[${projects// /,}] projects=[${projects// /,}]

View File

@ -74,6 +74,10 @@ jobs:
envName="mainnet" envName="mainnet"
bucketName="tools.vega.xyz" bucketName="tools.vega.xyz"
fi fi
if [[ "${{ matrix.app }}" = "static" ]]; then
envName="mainnet"
bucketName="static.vega.xyz"
fi
elif [[ "${{ github.ref }}" =~ .*main$ ]]; then elif [[ "${{ github.ref }}" =~ .*main$ ]]; then
envName="mainnet" envName="mainnet"
elif [[ "${{ matrix.app}}" = "trading" ]] && [[ "${{ startsWith(github.ref, 'refs/tags/v') && 'true' || 'false' }}" = "true" ]]; then elif [[ "${{ matrix.app}}" = "trading" ]] && [[ "${{ startsWith(github.ref, 'refs/tags/v') && 'true' || 'false' }}" = "true" ]]; then