Skip to content

Commit 10b6bbb

Browse files
committed
ADFA-2602: Take debug ingredients from the GreenGeeks candidate staging area
Reuse the transit the project already has: dev-assets can scp to GreenGeeks and this workflow already sets up the same key for the site path, so an unpublished asset set needs no new credential and no manual upload. asset_source: candidate scps from candidate_path (printed in the dev-assets asset-set run summary) instead of the live dev-assets directory. Candidates land under TMP_ASSETS_PATH, which is separate from public_html/dev-assets, so nothing overwrites the assets the nightly release depends on -- important because localMvnRepository.zip, core.cgt, documentation.db, android-sdk-* and bootstrap-* have identical filenames across toolchains. Claude-Session: https://claude.ai/code/session_017HGpMsUzZ5wxCfMtDZ2HGP
1 parent 8d4ffe8 commit 10b6bbb

1 file changed

Lines changed: 24 additions & 2 deletions

File tree

.github/workflows/generate_assets.yml

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,12 @@ on:
1919
type: choice
2020
options:
2121
- site
22+
- candidate
2223
- release
24+
candidate_path:
25+
description: 'GreenGeeks candidate staging path (asset_source: candidate), e.g. tmp/assets/candidates/42'
26+
required: false
27+
default: ''
2328
asset_release_tag:
2429
description: 'Release tag holding the debug ingredients (asset_source: release)'
2530
required: false
@@ -77,7 +82,7 @@ jobs:
7782
access_token_scopes: 'https://www.googleapis.com/auth/drive'
7883

7984
- name: Set up SSH key
80-
if: inputs.asset_source == 'site'
85+
if: inputs.asset_source == 'site' || inputs.asset_source == 'candidate'
8186
env:
8287
GREENGEEKS_HOST: ${{ vars.GREENGEEKS_SSH_HOST }}
8388
GREENGEEKS_KEY: ${{ secrets.GREENGEEKS_SSH_PRIVATE_KEY }}
@@ -141,6 +146,23 @@ jobs:
141146
-Dorg.gradle.workers.max=1 \
142147
-Dorg.gradle.parallel=false
143148
149+
- name: Download debug assets from the candidate staging area
150+
if: inputs.asset_source == 'candidate'
151+
env:
152+
GREENGEEKS_HOST: ${{ vars.GREENGEEKS_SSH_HOST }}
153+
CANDIDATE_PATH: ${{ inputs.candidate_path }}
154+
run: |
155+
set -euo pipefail
156+
if [ -z "$CANDIDATE_PATH" ]; then
157+
echo "ERROR: asset_source is 'candidate' but candidate_path is empty."
158+
echo " Take the path from the dev-assets asset-set run summary."
159+
exit 1
160+
fi
161+
mkdir -p assets
162+
scp "$GREENGEEKS_HOST:$CANDIDATE_PATH/debug/*" assets/
163+
rm -f assets/*.md5
164+
ls -la assets/
165+
144166
- name: Download debug assets from a release
145167
if: inputs.asset_source == 'release'
146168
env:
@@ -232,7 +254,7 @@ jobs:
232254
echo "google-services.json cleaned up successfully"
233255
234256
- name: Cleanup ssh
235-
if: always() && inputs.asset_source == 'site'
257+
if: always() && (inputs.asset_source == 'site' || inputs.asset_source == 'candidate')
236258
run: |
237259
# Remove SSH key
238260
rm -f ~/.ssh/id_rsa

0 commit comments

Comments
 (0)