Skip to content

Commit 572997f

Browse files
authored
[TT-16285] add s3 assets fetch step before dashboard image build in gateway (#431)
add s3 assets fetch step before dashboard image build in gateway
1 parent 1489de1 commit 572997f

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

policy/templates/releng/.github/workflows/release.yml.d/tyk-dashboard-resolver.gotmpl

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,26 @@
238238
echo "✅ Updated go.mod:"
239239
grep "github.com/TykTechnologies/tyk" go.mod
240240

241+
- name: Fetch pre-built UI assets from S3
242+
env:
243+
AWS_ACCESS_KEY_ID: {{`${{ secrets.AWS_BINDATA_ACCESS_KEY_ID }}`}}
244+
AWS_SECRET_ACCESS_KEY: {{`${{ secrets.AWS_BINDATA_SECRET_ACCESS_KEY }}`}}
245+
AWS_REGION: eu-central-1
246+
AWS_SESSION_TOKEN: ""
247+
run: |
248+
# Read the vendored commit SHA
249+
ASSETS_COMMIT=$(cat .assets_vendor | head -n 1 | tr -d '\n')
250+
251+
echo "Fetching UI assets for commit: ${ASSETS_COMMIT}"
252+
aws s3 sync s3://tyk-dashboard-assets-ci/commits/${ASSETS_COMMIT}/ internal/uiassets/dist/
253+
254+
if [ ! -f internal/uiassets/dist/_index.html ]; then
255+
echo "❌ Failed to fetch assets: _index.html not found"
256+
exit 1
257+
fi
258+
259+
echo "✓ Assets fetched successfully to internal/uiassets/dist/"
260+
241261
- name: Configure AWS credentials
242262
uses: aws-actions/configure-aws-credentials@v4
243263
with:

0 commit comments

Comments
 (0)